POV-Ray : Newsgroups : povray.binaries.images : Toward a less-lame rand() function. : Re: Toward a less-lame rand() function. Server Time
1 Aug 2024 00:18:03 EDT (-0400)
  Re: Toward a less-lame rand() function.  
From: Kenneth
Date: 19 May 2009 15:40:00
Message: <web.4a1307b22a89ae6df50167bc0@news.povray.org>
Warp <war### [at] tagpovrayorg> wrote:

>   Each and every different seed value *does* generate a stream of
> pseudo-random numbers with the exact same quality of randomness.
>
>   In fact, POV-Ray has only one single stream of pseudo-random numbers.
> This stream has 4294967296 (2^32) unique numbers in it. When you set up
> a seed, you are simply setting up your starting point in this stream.
> All random number streams will eventually start giving the same values
> as all the other streams at some point, because they are all actually
> just traversing the one and same stream, just at different starting points.

Ah!  It *finally* clicks in my brain. Thanks for the excellent clarification.

IIRC, you mentioned something several ago (to me) that seed() chooses it
'starting point' in the stream in a very complex fashion...not just 'linearly'
in the stream.  IOW, the difference between seed(23) and seed(24) isn't just
jumping one value ahead in the 2^32 stream. Is my thinking correct?

KW


Post a reply to this message

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