Main Question or Discussion Point
How do i randomize a position on a sphere? Using a random number between 0 and 360 for longitude and a number between -90 to 90 for latitude would make it more probable to get closer to the poles right?
Almost all of the time, this would give you a point inside a sphere of radius 1, which isn't what the OP asked for. For a point to be on the surface of the sphere, the squares of the coordinates would have to add to the square of the radius.picking 3 random numbers between 0 and 1 for the x,y and z coordinates sounds like a better bet...
Uhm, i have absolutely no idea what this means. I only know very basic math. And in case i was unclear in my first post, i want an even distribution, not centered to the poles.Drawing sine(latitude) from U[-1,1] and longitude from U[0,360º) does the trick.
A good random number package will provide separate interfaces for drawing from U[0,1), U[0,1], U(0,1), and U(0,1]. A not so good one might only provide just one of these four. There are some very small drawbacks to using not quite the right interface. For example, drawing longitude from U[0,360º] gives a small chance of doubling up on 0 versus 360º. Drawing sine(latitude) from U[-1,1) means you ruled out the North Pole.