News for hackers. Stuff that matters.
Re:Generating random points inside a sphere by magicalhippo on Sunday August 05, 2018 @02:44AM (#17690068)
It's the fraction of the volume of a cube enclosing (bounding) a sphere to the volume of that sphere.

  1 - 4/3*pi*r^3 / (2*r)^3 = ~0.4764
The algorithm samples points inside a unit cube and rejects those not inside the unit sphere, so that's the fraction of points it'll be discarding.

There are no comments on this comment yet.