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 14:16:42 EDT (-0400)
  Re: Requesting ideas/opinions for RNG seeding syntax  
From: Darren New
Date: 20 May 2009 10:43:30
Message: <4a141712$1@news.povray.org>
Slime wrote:
> simpler and clearer to use a separate function for different random number 
> generators, like rand_suchandsuch( seed ).

The advantage of changing the seeding rather than the rand() call is there's 
usually a very small number of seed()s, one for each stream.  If you find 
your trees aren't being placed properly, you can change the seed() for the 
tree placement and leave the seed for the leaf placement alone. And you 
don't need to track down every call to rand() and figure out which it is.

Putting it in the defaults is a good idea, but then it prevents using 
multiple different PRNGs in the same scene.

-- 
   Darren New, San Diego CA, USA (PST)
   There's no CD like OCD, there's no CD I knoooow!


Post a reply to this message

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