http://www.perlmonks.org?node_id=929638


in reply to computational efficiency

What is the application? Do you need a uniform distribution of angles? of points on a circle? of points on a sphere?

Picking random sine values won't give you a uniform distribution of values for the angles. So for example, if you plot the points on a circle for the randomly chosen sine values then you end up with a higher density of points at certain points along the circumference.

Probably overkill for your application but I did something similar years ago for picking points on the surface of a sphere and this article was helpful. http://mathworld.wolfram.com/SpherePointPicking.html