|
![](/i/fill.gif) |
"Tim Nikias" <JUSTTHELOWERCASE:timISNOTnikias(at)gmx.netWARE> schreef in
bericht news:420a2f16@news.povray.org...
> First, initialize a random stream like this:
>
> #declare Random_Value=seed(12345);
>
> Then, whenever you need a random number between 0 and 1, use
> rand(Random_Value).
>
> Multiplying that with values and clipping it with either floor() or ceil()
> should get you integers. For example, for a random number between 10 and
20,
> do this:
> #declare Random_Number = floor(10+10*rand(Random_Value));
>
> Consult the documentation about rand() and seed() for more insight. This
> post should only get you started. :-)
>
Consider also the use of RRand(Min,Max,Stream) where you can define your
minimum and maximum values directly.
Thomas
Post a reply to this message
|
![](/i/fill.gif) |