POV-Ray : Newsgroups : povray.general : Number of color_map entries Server Time
1 Aug 2024 14:30:40 EDT (-0400)
  Number of color_map entries (Message 1 to 3 of 3)  
From: Sebastian H 
Subject: Number of color_map entries
Date: 29 Sep 2005 05:30:54
Message: <433bb44e$1@news.povray.org>
Greetings
I tried to make a color_map with 256 entries manually.
The docs (2.5.1.3 Color Maps) say 256 entries are possible
but I'm stuck with just 255 entries.

The following code produces an error

   color_map {
     #declare i=0;
     #while(i < 256)

       #debug concat(" ", str(i,2,2), "\n")
       [i/255 rgb i/255]

       #declare i = i + 1;
     #end
   }

<PoV-Message>

    0.00
    .
    .
    .
  250.00
  251.00
  252.00
  253.00
  254.00
  255.00

File: color_maps.inc  Line: 44
File Context (5 lines):
     #while(i < 256)
       #debug concat(" ", str(i,2,2), "\n")
       [i/255 rgb i/255]
Parse Error: Blend_Map too long.

</PoV-Message>

There are 256 entries.
With just 255 as supremum (gives 255 entries) in the while loop
condition it works. So who is wrong me or the docs or is the fault
somewhere else.

PoV: 3.6.1 linux (self compiled gcc 3.4.1)


Regards,
Sebastian H.


Post a reply to this message

From: Christoph Hormann
Subject: Re: Number of color_map entries
Date: 29 Sep 2005 06:10:02
Message: <dhgecr$4f4$2@chho.imagico.de>
Sebastian H. wrote:
> 
> Greetings
> I tried to make a color_map with 256 entries manually.
> The docs (2.5.1.3 Color Maps) say 256 entries are possible
> but I'm stuck with just 255 entries.

See:

Subject: 'Blend_Map too long' - color_map 256 entries bug
Date: Wed, 15 Sep 2004 18:02:01 -0700
Newsgroups: povray.bugreports

Chris Huff's MegaPOV plus contains a patch that removes this limitation.

Christoph

-- 
POV-Ray tutorials, include files, Landscape of the week:
http://www.tu-bs.de/~y0013390/ (Last updated 24 Jul. 2005)
MegaPOV with mechanics simulation: http://megapov.inetart.net/


Post a reply to this message

From: Sebastian H 
Subject: Re: Number of color_map entries
Date: 29 Sep 2005 06:17:37
Message: <433bbf41@news.povray.org>
Christoph Hormann schrieb:
> Sebastian H. wrote:
> 
>>
>> Greetings
>> I tried to make a color_map with 256 entries manually.
>> The docs (2.5.1.3 Color Maps) say 256 entries are possible
>> but I'm stuck with just 255 entries.
> 
> 
> See:
> 
> Subject: 'Blend_Map too long' - color_map 256 entries bug
> Date: Wed, 15 Sep 2004 18:02:01 -0700
> Newsgroups: povray.bugreports
> 
> Chris Huff's MegaPOV plus contains a patch that removes this limitation.
> 
> Christoph
> 

Ah yes.
Thank you very much!

Sebastian


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.