How to randomly select a point on the surface of the Earth?
As the title says, how to randomly select a coordinate on the surface of the Earth without bias? The simple solution of doing rand(-90,90),rand(-180,180) will favor polar regions over equatorial regions. It sounds like you're looking for a uniform random distribution on a sphere . In spherical coordinates: θ = 2π * rand(0,1) Φ = arccos(1 - 2*rand(0,1)) Archimedes proved a nifty theorem that the area of a region on a sphere is equal to the area of the horizontal projection of that region onto the curved face of a circumscribing cylinder (and hence in particular, the area of the whole sphere is