POV-Ray : Newsgroups : povray.general : A quick rand() question... : Re: A quick rand() question... Server Time
31 Jul 2024 04:22:56 EDT (-0400)
  Re: A quick rand() question...  
From: Trevor G Quayle
Date: 22 Oct 2007 16:30:01
Message: <web.471d071dce8620b7c150d4c10@news.povray.org>
"Trevor G Quayle" <Tin### [at] hotmailcom> wrote:
> Jan Dvorak <jan### [at] centrumcz> wrote:
> > What I'd like to see is a stream that generates new values for each new
> > render. I have not succeeded using start_chrono as the seed.
>
> Perhaps the easiest way to do this is via a text file that is read and
> written to with each scene parse.
>
> Just read in the current value from the text file and increment it, use it
> and write the new one back to the text file, ready for the next run.
>
> -tgq

Actually, since you seem you may be using megaPOV, you can try:

#declare AA=seed(val(date("%Y%m%d%H%M%S")));

This should give you a unique seed every time you run it. It seeds from an
integer concatenated from: Year,Month,Day,Hour,Minute,Sec.

-tgq


Post a reply to this message

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