POV-Ray : Newsgroups : povray.general : Slightly faster VRand_On/In_Sphere() : Re: Slightly faster VRand_On/In_Sphere() Server Time
4 Nov 2024 17:37:49 EST (-0500)
  Re: Slightly faster VRand_On/In_Sphere()  
From: Slime
Date: 7 Nov 2003 14:48:46
Message: <3fabf71e@news.povray.org>
> <sqrt(1-Y*Y), Y, 0> is non uniform in terms of length of the circle,
> there will be more points in the middle of the circle and less at the
> top and bottom, but then the rotation is not uniform either as it will
> spread the points of the top and bottom on smaller surfaces.
>
> The remaining question is : does the one exactly counter the other ?

Good point. It may very well do so. The <sqrt(1-Y*Y), Y, 0> distribution is
related to the cosine of the angle from the center of the circle to the
point <sqrt(1-Y*Y), Y, 0>. Also, the circumference of the circle which that
point is then randomly placed on is proportional to the cosine of the same
angle. Therefore, it's possible that this VRand_On_Sphere() function does in
fact work properly.

It needs to be worked out formally though.

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


Post a reply to this message

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