POV-Ray : Newsgroups : povray.general : Is it me or does rand(n) loop ? : Re: Is it me or does rand(n) loop ? Server Time
5 Aug 2024 02:19:59 EDT (-0400)
  Re: Is it me or does rand(n) loop ?  
From: Johannes Dahlstrom
Date: 19 Dec 2002 09:56:55
Message: <3e01de37@news.povray.org>
Patrick Elliott wrote:

> The idea being to use the current system clock time to reseed the
> generator each time. Not sure if POV has such a thing...

MegaPOV has the tick_count keyword for doing that, but it can be simulated 
with POV 3.1/3.5 too: you just need a text file with a single integer in 
it. Open that file with POV, read the value and initialize a random 
generator with it. Then open the file again and write a random number to 
it. This way, every time you render your scene, you get a new seed value 
from the file.


Post a reply to this message

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