|
![](/i/fill.gif) |
On Thu, 20 Aug 2009 14:08:55 +0200, "bgimeno" <bgimeno[at]persistencia[dot]org>
wrote:
> 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.
/*
Try this extract of your scene. By commenting out some #declare RotNo2's you
will get different results :)
/*
#include "colors.inc"
camera {location <0,150,-150>
look_at <0,0,0>
}
light_source {<50,300,-100> colour White}
light_source {<-150,300,-100> colour White}
#declare Tree = sphere {<0,0,0>2 pigment {White} } ;
#declare Num_Tree = 0 ;
// ------------------------------------------------------
#while (Num_Tree<5000)
#declare rnd_tree = seed (Num_Tree);
object {Tree
#declare rnd_tree = seed (Num_Tree);
translate x*60 // code C
// Comment out the lines below to get different effects
#declare RotNo2 = rand(rnd_tree);
#declare RotNo2 = rand(rnd_tree);
#declare RotNo2 = rand(rnd_tree);
#declare RotNo2 = rand(rnd_tree);
#declare RotNo2 = rand(rnd_tree);
rotate <0,rand(rnd_tree),rand(rnd_tree)>*360
}
#declare Num_Tree = Num_Tree +1 ;
#end
--
Regards
Stephen
Post a reply to this message
|
![](/i/fill.gif) |