So which algorithm ended up being fastest?
So I'd wager that the 50% reject rate would still be cheaper at scale than evaluating trigonometric functions.
XYZ: 16.418057 seconds
Gauss: 23.415560 seconds
Spherical: 17.705553 secondsYour CPU would spontaneously undergo fusion by tunneling before hitting on a case where it's stuck on a bad case for more than 10 microseconds.
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.