News for hackers. Stuff that matters.
Re:Random Points on a Sphere by ColinWright on Monday April 27, 2015 @06:15AM (#9445313)
And in higher dimensions, extremely slow, as the volume of the sphere fairly rapidly approaches zero, so nearly all your points are outside.

You need to work harder than that, as most of the other comments are pointing out.

Re:Random Points on a Sphere by im3w1l on Monday April 27, 2015 @07:00AM (#9445446)
Is the rejection method better at low dimensions? If so, where does the gaussian method catch up?
Re:Random Points on a Sphere by ColinWright on Monday April 27, 2015 @07:06AM (#9445468)
In even dimensions, volume of a sphere of radius 1 is:

    V_{2k} = pi^k/k!
For 10 dimensions, the hypersphere is of volume 2.55, but the enclosing box is of volume 2^10 = 1024. So roughly one in 400 trials gets you a point inside the sphere. Not good odds.
Re:Random Points on a Sphere by Qantourisc on Monday April 27, 2015 @07:25AM (#9445520)
The rejection method is never better I think, work smarter not harder. But it's an easy way to remember and do it. Don't recommend using it when you any actual performance.

In terms of CPU power, calculating the length of the vector and doing a branch, I think, is going to be slower then the proper way to do it.