POV-Ray : Newsgroups : povray.advanced-users : Need help with rand/seed : Re: Need help with rand/seed Server Time
30 Jul 2024 06:21:05 EDT (-0400)
  Re: Need help with rand/seed  
From: Mark James Lewin
Date: 13 Jul 2000 18:06:47
Message: <396E3B1D.A49A5493@yahoo.com.au>
If you want a truly random number that you want to save once you get a result
you like, you could try something like this...

#declare MySeedValue = tick_count;

#declare MySeed = seed(MySeedValue)

#declare MyRandom = rand(MySeed)

#fopen MyFile "c:\MyFile.txt" write
#write (MyFile,MySeedValue)
#fclose MyFile

That way, you can then look at MyFile so see the seed value you have used, then
to repeat the code exactly change so that...

#declare MySeedValue = 15000;

or whatever the value in MyFile was.

tick_count assumes you have MegaPov, of course.

MJL


Post a reply to this message

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