**I would like to generate a random axis or unit vector in 3D**. In 2D it would be easy, I could just pick an angle between 0 and 2*Pi and use the unit vector pointing in that direction.

But in 3D **I don't know how can I pick a random point on a surface of a sphere**.

If I pick two angles the distribution won't be uniform on the surface of the sphere. There would be more points at the poles and less points at the equator.

If I pick a random point in the (-1,-1,-1):(1,1,1) cube and normalise it, then there would be more chance that a point gets choosen along the diagonals than from the center of the sides. So thats not good either.

**But then what's the good solution?**