POV-Ray : Newsgroups : povray.general : color syntax - request for bug comment Server Time
16 Nov 2024 13:23:56 EST (-0500)
  color syntax - request for bug comment (Message 1 to 4 of 4)  
From: Tom Melly
Subject: color syntax - request for bug comment
Date: 21 Dec 2003 17:30:38
Message: <3fe61f0e@news.povray.org>
According to the docs (6.1.5.5)

"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 the following scene seems to contradict this:

#version 3.5;

#declare MyCol1=  <1,1,0>;
#declare MyCol2=  <0,0,1>;

//Legal
#declare MyCol1a= MyCol1 * MyCol2;

// All non-legal
//#declare MyCol1b= MyCol1 * blue 0.5;
//#declare MyCol1c= MyCol1 blue 0.5;
//#declare MyCol1d= MyCol1 MyCol2;

... so, is this a bug in pov, the docs, or my understanding of them?


Post a reply to this message

From: Francois Labreque
Subject: Re: color syntax - request for bug comment
Date: 21 Dec 2003 22:19:13
Message: <3fe662b1$1@news.povray.org>
Program ended abnormally on 16/12/2003 17:08, Due to a catastrophic Tom
Melly error:

> According to the docs (6.1.5.5)
> 
> "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 the following scene seems to contradict this:
> 
> #version 3.5;
> 
> #declare MyCol1=  <1,1,0>;
> #declare MyCol2=  <0,0,1>;
> 
> //Legal
> #declare MyCol1a= MyCol1 * MyCol2;
> 
> // All non-legal
> //#declare MyCol1b= MyCol1 * blue 0.5;
> //#declare MyCol1c= MyCol1 blue 0.5;
> //#declare MyCol1d= MyCol1 MyCol2;
> 
> ... so, is this a bug in pov, the docs, or my understanding of them?

Hard to say where the bug lies, but the behaviour does contradict the docs.


-- 
/*Francois Labreque*/#local a=x+y;#local b=x+a;#local c=a+b;#macro P(F//
/*    flabreque    */L)polygon{5,F,F+z,L+z,L,F pigment{rgb 9}}#end union
/*        @        */{P(0,a)P(a,b)P(b,c)P(2*a,2*b)P(2*b,b+c)P(b+c,<2,3>)
/*   videotron.ca  */}camera{orthographic location<6,1.25,-6>look_at a }


Post a reply to this message

From: Thorsten Froehlich
Subject: Re: color syntax - request for bug comment
Date: 22 Dec 2003 04:04:34
Message: <3fe6b3a2$1@news.povray.org>
In article <3fe662b1$1@news.povray.org> , Francois Labreque 
<fla### [at] videotronca>  wrote:

>> According to the docs (6.1.5.5)
>>
>> "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 the following scene seems to contradict this:
>>
>> #version 3.5;
>>
>> #declare MyCol1=  <1,1,0>;
>> #declare MyCol2=  <0,0,1>;
>>
>> //Legal
>> #declare MyCol1a= MyCol1 * MyCol2;
>>
>> // All non-legal
>> //#declare MyCol1b= MyCol1 * blue 0.5;
>> //#declare MyCol1c= MyCol1 blue 0.5;
>> //#declare MyCol1d= MyCol1 MyCol2;
>>
>> ... so, is this a bug in pov, the docs, or my understanding of them?
>
> Hard to say where the bug lies, but the behaviour does contradict the docs.

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.

    Thorsten

____________________________________________________
Thorsten Froehlich, Duisburg, Germany
e-mail: tho### [at] trfde

Visit POV-Ray on the web: http://mac.povray.org


Post a reply to this message

From: Tom Melly
Subject: Re: color syntax - request for bug comment
Date: 22 Dec 2003 04:27:22
Message: <3fe6b8fa$1@news.povray.org>
"Thorsten Froehlich" <tho### [at] trfde> wrote in message
news:3fe6b3a2$1@news.povray.org...

>
> 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.
>

Ta - I'll post to docs.


Post a reply to this message

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