|
|
In article <40bb852b$1@news.povray.org> , "Thorsten Froehlich"
<tho### [at] trfde> wrote:
> This is a guess from the top of my head.
Wait, this example can be solved by just determining if there is an even or
odd number of "blue", but I was looking for an example that requires
counting (informal rationale: if counting is required, the language is not
context-free). One needs to use a second color component specifier to
create the need for counting:
#declare sp1 = sphere
{
z*10,1
texture
{
pigment
{
color
#declare blue = 0;
blue
#declare blue = 1;
#declare red = 1;
red
red
red
blue
red
blue
blue
blue
blue
blue
}
}
}
#declare sp2 = sphere
{
z*10,1
texture
{
pigment
{
color
#declare blue = 0;
blue
#declare blue = 1;
#declare red = 1;
blue
red
blue
red
red
blue
red
red
red
blue
blue
blue
blue
red
}
}
}
____________________________________________________
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
|
|