POV-Ray : Newsgroups : povray.general : Simple trick for getting different random numbers in each render : Re: Simple trick for getting different random numbers in each render Server Time
11 Aug 2024 03:33:59 EDT (-0400)
  Re: Simple trick for getting different random numbers in each render  
From: Margus Ramst
Date: 2 Nov 1999 15:08:52
Message: <381F4457.F044D0CA@peak.edu.ee>
I see a potential problem here. Consecutive seeds can give numbers that are
markedly non-random. For example, make a loop to generate a string of spheres,
whose y position is a random number whose seed changes linealrly:

#declare C=0;
#while(C<100)
  #declare S=seed(C);
  #declare R=rand(S);
  sphere{<C,R,0>,1}
  #declare C=C+1;
#end

Chris Huff wrote:
> 
> The only situation I can think of is where you want a bunch of different
> versions of an object. In that case I simply seed the stream with a
> large number multiplied by clock.
> 
> #declare globalRandStream = seed(50000*clock);
> 
> Then I just make an animation of it, and pick out the good versions.
> 
> Not saying this is better or anything, just the way I do it.


Post a reply to this message

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