POV-Ray : Newsgroups : povray.general : Rand function : Re: Rand function Server Time
11 Aug 2024 23:18:28 EDT (-0400)
  Re: Rand function  
From: Margus Ramst
Date: 25 Apr 1999 21:39:27
Message: <3723b5bf.0@news.povray.org>
I'm not sure why you would need it, but you can try this:

#declare S1=seed(1234);
#declare RS1=int(rand(Seed1)*1000);
#declare S2=seed(RS1); //This seed should now be random

If you want it to be random in each frame of an animation, you should
probably do something like this:

#declare RS=int(clock*100);
#declare Seed=seed(RS);

Margus

Steven Jones wrote in message <372387E4.4296BD07@tsn.cc>...
>Is there any way to make a random seed for the rand function?


Post a reply to this message

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