|
|
"Kenneth" <kdw### [at] earthlinknet> wrote in message
news:web.497a1e5215dcf5ebf50167bc0@news.povray.org...
> I've run into an interesting and totally unexpected situation in v3.6.1
> while
> animating, trying to produce some random values from frame to frame. I'm
> seeing
> repeating patterns in the values; nothing that I try eliminates them.
> ... snip ...
> So, practically speaking: How do I get *obviously* random values in
> animation,
> across frames? I'm stuck. Trying different schemes to vary seed hasn't
> worked so
> far (although I haven't exhausted the idea yet.)
You could try using the same seed in each frame, using the frame_number or a
multiple of it to step through to a fresh part of the pseudo random sequence
. The following example throws away one for each frame that's gone before.
If you use 10 in a frame you could loop 10 times as far through the stream.
#declare P = seed(1);
#local I = 0;
#while (I<frame_number)
#local ThrowAway = rand(P);
#end
Post a reply to this message
|
|