POV-Ray : Newsgroups : povray.general : problem: repeating rand patterns using seed in animation : Re: problem: repeating rand patterns using seed in animation Server Time
30 Jul 2024 12:24:42 EDT (-0400)
  Re: problem: repeating rand patterns using seed in animation  
From: Kenneth
Date: 24 Jan 2009 09:40:01
Message: <web.497b2788b528db0df50167bc0@news.povray.org>
"Chris B" <nom### [at] nomailcom> wrote:

>
> 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...
>
> #declare P = seed(1);
> #local I = 0;
> #while (I<frame_number)
> #local ThrowAway = rand(P);
> #declare I = I + 1; // added by Kenneth  ;-)
> #end

That's quite interesting, and it makes great sense--it pulls a nice random value
for each frame. I'll try it!  It's one of those solutions where I smack my
forehead and say, "Of course!" I had a funny feeling that some kind of #while
loop might be a solution, though how and where had me baffled. I'll report back
with the results.


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.