POV-Ray : Newsgroups : povray.general : Number of color_map entries : Number of color_map entries Server Time
1 Aug 2024 12:25:54 EDT (-0400)
  Number of color_map entries  
From: Sebastian H 
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

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