POV-Ray : Newsgroups : povray.documentation.inbuilt : Error with 6.1.5.5 : Error with 6.1.5.5 Server Time
28 Apr 2024 13:08:44 EDT (-0400)
  Error with 6.1.5.5  
From: Tom Melly
Date: 22 Dec 2003 05:00:25
Message: <3fe6c0b9@news.povray.org>
... and probably other sections of 6.1.5...


The docs state:

"For example...
color My_Color red 0.5
this substitutes whatever was the red component of My_Color with a red component
of 0.5 however...
color My_Color + red 0.5
adds 0.5 to the red component of My_Color"

But this is contradicted by the following scene:

#version 3.5;

#declare ColTest1 = color <1,1,0,0,0>;
#declare ColTest2 = color <0,0,1,0,0>;

// all illegal
#declare Foo = ColTest1 ColTest2;
#declare Foo = ColTest1 blue 1/2;
#declare Foo = color <1,1,0,0,0> + blue 1;
#declare Foo = color ColTest1 + blue 1;

According to Thorsten:

"The docs are simply outdated.  The above syntax (but with MyCol1 and MyCol2
properly declared as colors, of course!) works in 3.1 most of the time.
However, it is actually incompatible with certain situations were macros are
used.  Consequently, it cannot be used in 3.5 in order to eliminate old 3.1
bugs."

At it's simplest, there appears to be no syntax that allows color substitution
(e.g. Col1 Col2), and no support for color addition/multiplication using
red/blue/green (e.g. Col1 + blue 0.5).

-- 
#macro A(V,B,C,R)#while(B-256)#if(V-128/B>=0)sphere{0,.5translate<C-4R-1,9>
pigment{rgb<1-C/8R/2C/8>}}#local V=V-128/B;#end#local B=B*2;#local C=C+1;#
end#end A(234,1,0,2)A(85,1,0,1)A(81,1,0,0)light_source{-5 1}//Tom Melly


Post a reply to this message

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