POV-Ray : Newsgroups : povray.general : Slightly faster VRand_On/In_Sphere() : Re: Slightly faster VRand_On/In_Sphere() Server Time
3 Aug 2024 20:20:37 EDT (-0400)
  Re: Slightly faster VRand_On/In_Sphere()  
From: Slime
Date: 7 Nov 2003 21:36:47
Message: <3fac56bf$1@news.povray.org>
>   (Btw, has anyone proven mathematically that the current official
> macros produce even distributions?)

I am convinced that they do.

Honestly, I'm not sure of the proper mathematical procedures to use when
evaluating a distribution curve. Nonetheless, I understand the logic behind
what causes an uneven distribution and how to go about correcting it; I have
a very good intuition about this sort of thing (IMO at least ;) ) and during
the POV-Ray 3.5 beta I took a good look at the two functions out of
curiosity. I determined, simply by reading the code, that the
VRand_In_Sphere function provided an uneven distribution, because it wasn't
using the pow(..., 1/3) trick to pull things away from the center. I
verified my suspicions, fixed the problem and submitted what is now the
current VRand_In_Sphere function.

Anyway, I've thought long and hard about both functions, and I am absolutely
certain that both of them provide even distributions.

I have been known to be wrong... =)

 - Slime
 [ http://www.slimeland.com/ ]


Post a reply to this message

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