POV-Ray : Newsgroups : povray.programming : Re: rand question Server Time
23 Dec 2024 02:12:55 EST (-0500)
  Re: rand question (Message 1 to 3 of 3)  
From: Tom & Lu Melly
Subject: Re: rand question
Date: 11 Feb 2003 16:16:43
Message: <3e49683b$1@news.povray.org>
"Vadim Sytnikov" <syt### [at] rucom> wrote in message
news:3e494e42$1@news.povray.org...

Many thanks - I still remain relatively clueless, but that's my problem, not
yours...


Post a reply to this message

From: Mark Weyer
Subject: Re: rand question
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

From: Vadim Sytnikov
Subject: Re: rand question
Date: 12 Feb 2003 10:15:38
Message: <3e4a651a$1@news.povray.org>
"Mark Weyer" <wey### [at] informatikuni-freiburgde> wrote:
>
> More about pseudo random number generators can be read here:
>
> http://crypto.mat.sbg.ac.at/results/karl/server/server.html

...or in Donald Knuth's "The Art of Conputer Programming", Vol. 2,
"Semi-numerical Algorithms" (that is IMHO the best source of information on
RNGs, including linear congruence generator used in POV-Ray).


Post a reply to this message

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