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.

Get the Android app

Or read this on Hacker News

Read more on:

Photo of sphere

sphere

Photo of simple way

simple way

Photo of random points

random points

Related news:

News photo

How to configure X11 in a simple way

News photo

Colodebug: A simple way to improve bash script debugging (2021)

News photo

Animate a mesh across a sphere's surface