POV-Ray : Newsgroups : povray.general : Requesting ideas/opinions for RNG seeding syntax : Re: Requesting ideas/opinions for RNG seeding syntax Server Time
30 Jul 2024 08:25:28 EDT (-0400)
  Re: Requesting ideas/opinions for RNG seeding syntax  
From: "Jérôme M. Berger"
Date: 19 May 2009 17:11:30
Message: <4a132082@news.povray.org>
clipka wrote:
> Warp <war### [at] tagpovrayorg> wrote:
>>   The current RNG uses a 32-bit seed, so a single parameter to seed() 
is
>> enough to get all possible streams. However, higher-quality random num
ber
>> generators usually support much longer seeds, so it would be possible 
to
>> choose among a vastly larger amount of RNG streams. Thus it would be v
ery
>> nice if larger seeds could be specified.
> 
> Stupid question: Why? What would be the benefit?
> 
> Let's have a closer look at the use cases for seeding.
> 
> ...

	There is a very common use case that you have forgotten: to be able 
to save the state of the random generator so that you can pick up 
from the same point later (in a subsequent animation frame for 
example). This requires two things:
- A function that returns the current state of the generator;
- The ability to initialize the generator with this state.

	In that case, the seed may take the whole range of values supported 
by the algorithm.

		Jerome
-- 
mailto:jeb### [at] freefr
http://jeberger.free.fr
Jabber: jeb### [at] jabberfr


Post a reply to this message


Attachments:
Download 'us-ascii' (1 KB)

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