I know there are several ways to generate uniformly distributed random points on the 2-sphere $S^2$. But I would like to know if my method does the same job, although it is very inefficient.
Say, I want to get random points on the surface of the sphere centered at the origin with radius $3$. My proposed algorithm is:
- Take a random point $(x,y,z) \in [-3,3] \times [-3,3] \times [-3,3]$.
- If $(2.999)^2 < x^2+y^2+z^2<3^2$, then $(x,y,z) \in $ SetOfRandomPoints
- Proceed until the set has enough number of elements
Would this algorithm approximately generate a uniform distribution on the sphere, or would the points be clustered around, say, the equator?