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 18:19:27 EDT (-0400)
  Re: problem: repeating rand patterns using seed in animation  
From: clipka
Date: 26 Jan 2009 13:20:01
Message: <web.497dfdc3b528db0d16c2a5900@news.povray.org>
"Kenneth" <kdw### [at] earthlinknet> wrote:
> I suppose that a more 'strictly logical' approach (in the sense of first
> generating one large set of rand values to use, and not wasting any) would be
> something like this, done only once during the first frame of animation:
>
> ...
> Then, where I use my_rand in the scene...
> #read ***a particular my_rand value from the pre-#written list***
> ...

> An interesting idea (probably the same as or similar to Warp's original
> #write/#read scheme, now that I think of it.) I have no idea of its
> 'efficiency', though, compared to Chris B's original #while loop.

I guess it can be summed up into one word: "Desastrous" ;)

First thing to note is that it isn't any better than the original #while loop
approach: With POV SDL, unfortunately you can't just read "a particular" value
from a file. All you can do is read the file sequentially - so again you need
to pull the first numbers and discard them, until you reach the number you
want. So same problem as with Chris B's original approach.

Worse yet: Instead of a few computational steps required to pull a single random
value, you now have disk reads instead, *plus* some computational steps to parse
the plain-text numbers back to float values.

So all in all, it's quite a creative idea, but gives you more pain than gain :)


Post a reply to this message

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