|
|
> I would also add this detail. Although:
>
> sphere {<0,0,0>3
> translate x*60
> rotate x*rand(rnd_tree)*360
> rotate y*rand(rnd_tree)*360
> rotate z*rand(rnd_tree)*360
> pigment {White}
> }
>
> should produce the same result as:
>
> sphere {<0,0,0>3
> translate x*60
> // rotate x*rand(rnd_tree)*360
> rotate y*rand(rnd_tree)*360
> rotate z*rand(rnd_tree)*360
> pigment {White}
> }
> the use of this first superfluous rand() affects the values extracted by
> the 2nd and 3rd rand(). In this case therefore we obtain values that don't
> seem to follow any pattern.
> Be recorded as comment on the peculiarities of the rand () function and
> nothing else.
>
> B. Gimeno
>
>
This should NOT produce the same result.
Although the first random rotate is effectively a "do nothing", it DOES
fetch a number from the random stream.
If you remove the first rotate, the value it would have used will be
used by the second, now first, rotate.
In the first case, you featch 3 random numbers from the stream for each
iteration.
In the second case, you only featch 2.
Any change in the number of values accessed WILL change the end result.
Just adding one #declare Dummy=rand(rnd_tree); will totaly change the
result.
Alain
Post a reply to this message
|
|