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 18:15:29 EDT (-0400)
  Re: Requesting ideas/opinions for RNG seeding syntax  
From: "Jérôme M. Berger"
Date: 22 May 2009 02:43:42
Message: <4a16499e$1@news.povray.org>
Warp wrote:
> StephenS <nomail@nomail> wrote:
>> #declare S4 = seed (1234, 2, array[4] { 1, 2, 3, 4 } )
> 
>   If the extra seed values are given as additional parameters, there's 
no
> need for an array, as they could be given as direct parameters, ie:
> 
> #declare S4 = seed (1234, 2, 1, 2, 3, 4 );
> 
>   That could work, although it's still a small cosmetic problem that th
e
> seed is specified as the 1st, 3rd, 4th, etc. parameters, so there's an 
odd
> discontinuity there...
> 
	Well, you could always say that if more than one parameter is 
given, then the first parameter identifies the algorithm and the 
other parameters make up the seed:

// Same as now:
#declare S1 = seed (1234);

// Equivalent to the above:
#declare S2 = seed (1, 1234);

// Use new algorithm number 2 with a longer seed:
#declare S3 = seed (2, 1234, 5678);

		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.