Get the latest tech news
A simple way to generate random points on a sphere
A way of generating points on a sphere that is intuitively clear and efficient. Comparison to the more common algorithm.
of independent random values uniformly generated on [−1, 1] and compute the sum of there squares It’s not obvious that the common approach works, unless you’ve studied a far amount of probability, and it raises the question of how to generate samples from normal random variable. The usual method, the Box-Muller algorithm, requires a logarithm and a sine in addition to a square root.
Or read this on Hacker News