POV-Ray : Newsgroups : povray.advanced-users : Random variation : Re: Random variation Server Time
29 Jul 2024 14:24:22 EDT (-0400)
  Re: Random variation  
From: Mark Wagner
Date: 26 Sep 2002 22:27:06
Message: <pan.2002.09.27.02.26.13.955301.210@gte.net>
On Thu, 26 Sep 2002 08:31:46 -0400, Andrew Coppin quoth:

> I was doing a render earlier today, and I got to wondering about
> something... Suppose you write something like
> 
> #declare A = seed(...);
> #declare J = rand(A);
> #declare K = rand(A);
> 
> POV-Ray's rand() function returns random numbers in the (closed?)
> invertal 0..1. But what is the minimum difference between J and K?
> Presumably if you're really fluky they might just happen to have the
> exact same value (improbable but not impossible).

Because of the way that POV-Ray's random number generator works, it will
never produce the same number twice in a row (if it did, it would then
proceed to produce that number every single time).

-- 
Mark


Post a reply to this message

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