|
![](/i/fill.gif) |
I've just come across an unusual bit of behaviour when rendering a large
number of similar isosurfaces.
When I use the code:
> #declare Index = 0;
> #while (Index<29)
> isosurface {
> function {f_rounded_box(x, y, z, 0.1, 1.19, 0.3, 0.4)+f_granite(x+rand(Seed),
> y+rand(Seed), z+rand(Seed))*0.09}
I get the message:
> Parse Error: Expected 'function identifier', } found instead
However, when I use:
> #declare Index = 0;
> #while (Index<29)
> #local RX=rand(Seed);
> #local RY=rand(Seed);
> #local RZ=rand(Seed);
> isosurface {
> function {f_rounded_box(x, y, z, 0.1, 1.19, 0.3, 0.4)+f_granite(x+RX,
> y+RY, z+RZ)*0.09}
Everything works as expected.
What's happening? Surely Pov's only got to look up the next number in
the random stream which can't be much different from looking up the
values of the declared variables.
John (scratching his head in confusion)
--
"Eppur si muove" - Galileo Galilei
Post a reply to this message
|
![](/i/fill.gif) |