POV-Ray : Newsgroups : povray.advanced-users : Need help with rand/seed : Re: Need help with rand/seed Server Time
26 Nov 2024 19:23:36 EST (-0500)
  Re: Need help with rand/seed  
From: CreeD
Date: 13 Jul 2000 23:47:22
Message: <01bfed46$f81e6b60$e81ba1d0@mk>
> 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.

That's a very useful tip .. I wasn't aware of #write. 
So far I've got a random vase generator that works pretty well.
If I can get it to write the seeds I used I can render the ones I like at a
decent resolution, although 5-6 minutes is bearable as it is at 512x384...
anyway, thanks much.


Post a reply to this message

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