Maths - Spherical Polar Coordinates

Spherical coordinates allow points to be specified using one linear distances and two angles:

This can be used to represent points on the surface of a sphere such as the earth as explained on this page.

Cartesian to Spherical Polar Coordinates

r
latitude
longitude
=
sqrt(x2 + y2+ z2)
arcos(z/r)
atan2(y,x) 

Spherical Polar Coordinates to Cartesian

We can assign an arbitrary x,y,z coordinate system in the local frame of the earth:

geospacial

so from this diagram we can see that:

z = r sin(latitude)

and if we are on the Greenwich meridian then:

x = r cos(latitude)

but if we are not on the Greenwich meridian then this has to be modified depending on the latitude, so,

x = r cos(latitude) cos (longitude)

the y can be calculated from:

r2 = x2 + y2 + z2

therefore y = r *sqrt(1 - sin(latitude) - cos(latitude) cos (longitude))

x
y
z
=
r cos(latitude)
r *sqrt(1 - sin(latitude) - cos(latitude) cos (longitude))
r sin(latitude)

metadata block
see also:

 

Correspondence about this page

Book Shop - Further reading.

Where I can, I have put links to Amazon for books that are relevant to the subject, click on the appropriate country flag to get more details of the book or to buy it from them.

cover Geometry for Computer Graphics:...

This site may have errors. Don't use for critical systems.

Copyright (c) 1998-2017 Martin John Baker - All rights reserved - privacy policy.