POV-Ray : Newsgroups : povray.advanced-users : Need help with rand/seed : Re: Need help with rand/seed Server Time
30 Jul 2024 06:30:15 EDT (-0400)
  Re: Need help with rand/seed  
From: Mark James Lewin
Date: 14 Jul 2000 02:23:53
Message: <396EAF98.82C6834B@yahoo.com.au>
Oops, I meant...

#write (MyFile,SeedValue1," ",SeedValue2," ")

sorry.

MJL

Mark James Lewin wrote:

> Don't forget that POV will not place anything in between it's output unless you
> tell it so. eg the numbers 12, 18, and 5 will appear as 12185 in your output
> unless you do something like this...
>
> #write (SeedValue1," ",SeedValue2," ")
>
> etc. which will put spaces between them. You get the picture. Stick with the
> pov manual, and constantly look it up. It really is handy. Within weeks, it'll
> become your most used help file, I guarantee.
>
> MJL
>
> MJL
>
> CreeD wrote:
>
> > > 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.