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:22:51 EDT (-0400)
  Re: Toward a less-lame rand() function.  
From: Darren New
Date: 18 May 2009 11:45:23
Message: <4a118293$1@news.povray.org>
Kenneth wrote:
> If I understand you correctly, that's the (good!) idea that Chris B. came up
> with here (which was also linked-to earlier):

Yes. It's a pretty obvious hack, if you're used to dealing with software 
architectures like POV's animation architecture.

> I would imagine that the typical
> POV user probably believes--at least in the early stages of using the
> program--that each-and-every different seed value *does* generate a nicely
> psuedo-random stream 

It does. The lack of randomness is between the seed and the first value, not 
between the first and second value.  Indeed, it would be interesting to see 
a similar plot if one called rand() exactly once after seeding it.

> The problem of 'patterns' really only seems to show its ugly self when
> one gets into animation. 

Only if you don't use enough random numbers in your scene. The formula for 
going from one random number to the next shows convincing randomness. The 
formula for going from the seed to the first random number does not.

> Yet there's nothing currently in the POV documentation
> that explains any of this.  

That would probably be a good thing to fix, yes.

-- 
   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.