POV-Ray : Newsgroups : povray.general : rand question : Re: rand question Server Time
5 Aug 2024 02:21:46 EDT (-0400)
  Re: rand question  
From: Edward Coffey
Date: 12 Feb 2003 22:33:11
Message: <3E4B14F5.9080605@alphalink.com.au>
Christopher James Huff wrote:
> In article <3e4ac5d2@news.povray.org>, Warp <war### [at] tagpovrayorg> 
> wrote:
> 
> 
>>  What I claimed was that eventually one of the streams will start giving
>>the same numbers as the other streams gave to start with. And also the
>>other way around.
> 
> 
> Ok, I understand. Yes, that will happen.

The problem being, as I understand it, that there is only one sequence 
of random numbers in POV (if m follows n in one run, m will always 
follow n), as stated earlier.
Could this not be easily worked around by the following:
Where you want two sequences that are ordered differently, use four 
random sequences with the seeds a1, a2, b1 and b2. To get a random 
number for your first sequence add the two 'a' seqences modulo 2^32, 
likewise for the second sequence add the two 'b' seqences modulo 2^32.
This would probably introduce more problems than it solves for some 
purposes, leading to even less randomness in the low bits, and to some 
values never being visited and others being visited disproportionately 
frequently.

Alternately you could implement your own PNG in POV-SDL.


Post a reply to this message

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