POV-Ray : Newsgroups : povray.programming : Re: rand question : Re: rand question Server Time
8 Jul 2024 19:53:22 EDT (-0400)
  Re: rand question  
From: Mark Weyer
Date: 12 Feb 2003 04:39:38
Message: <3E4A193D.2030506@informatik.uni-freiburg.de>
> Many thanks - I still remain relatively clueless, but that's my problem, not
> yours...

The pseudo random number generator of povray is
(as by peeking into the source) a linear congruence
generator. THE random number stream is a sequence
x(n), where
x(0)   = 1
x(n+1) = (a*x(n)+b) mod 2^32
where a and b are fixed numbers. As each element of this stream is only
determined by its predecessor which is a 32-bit number, the stream must
repeat after at most 2^32 iterations. I tested that it does not repeat
earlier. So the stream is a repetition of a sequence of all 32-bit numbers.

More about pseudo random number generators can be read here:

http://crypto.mat.sbg.ac.at/results/karl/server/server.html

-- 
max_trace_level 256media{absorption.02}camera{location<1,.3,1.7>}sphere{0
.8pigment{color.6}interior{media{emission<2,2,-2>absorption 2}}hollow}#macro
p(f,n)plane{n f-1finish{reflection<f,1f>}}#end p(1y)p(1z-x)p(-1,-z)p(1x-y)
// Mark Weyer


Post a reply to this message

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