POV-Ray : Newsgroups : povray.general : What is wrong with this? : {checker Red White} (was Re: What is wrong with this?) Server Time
28 Sep 2024 11:05:00 EDT (-0400)
  {checker Red White} (was Re: What is wrong with this?)  
From: Ron Parker
Date: 2 Sep 1999 12:51:42
Message: <37ceab1e@news.povray.org>
On Thu, 02 Sep 1999 18:00:09 +0200, Fabien Mosen wrote:
>TonyB wrote:
>> 
>> Oooh. This is so exciting. *I* found a bug. Wow... I'm overwhelmed. I must sit
>> down, oh, yeah, I'm already seated. I must faint... (thud...)
>
>Fine.  Now go search for bugs in Win98, and come back when you got them
>all... :)
>
>There is another strange behaviour of pov with colors : 
> pigment {checker Red White} gives the default green/yellow checker !!!
>
>but
> pigment {checker color Red color White} gives white and red, as
>expected...

Crossposted to bugreports, followups to general, as usual.

This was reported a long time ago but never resolved.  It's actually
bigger than you think: any time two or more colors appear in a row with
no intervening commas or other stuff, POV will happily parse them all 
away, keeping only the value of the last one.  This means you COULD say
something like "color Red green 1" to get yellow.  In fact, that usage
is documented (but uncommon in the real world, I suspect.) 

Unfortunately, you can also say "color Red Green" and get green.  This 
is not documented, and is probably a bug (the docs do say COLOUR_IDs 
should come first.)  Parse_Colour should probably UNGET and EXIT when
it gets a second instance of any of COLOUR_ID, rgb, rgbt, rgbf, rgbft, 
or a bare vector expression.  This would make rgb 1 red 0 legal as a 
shortcut for cyan, but make rgb 1 rgb 0 become two separate colors,
suitable for use in checkers or bricks or hexagons.


Post a reply to this message

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