Google Answers Logo
View Question
Q: Distance and angles "through" the globe. ( Answered,   1 Comment )
Subject: Distance and angles "through" the globe.
Category: Science > Math
Asked by: kwaaker-ga
List Price: $20.00
Posted: 21 Jul 2003 16:07 PDT
Expires: 20 Aug 2003 16:07 PDT
Question ID: 233527
I've got an interesting math question.  I'm looking for either a
solution someone else has come up with already, or info on going about
figuring it out.

I'm interested in learning how to determine the distance from one
point on the earth to another point, going "through" the earth,
instead of around it.

I think I have a good forumla for calculating the length of a line
intersecting a sphere, but I'm not sure how to map longitudes and
latitudes on the sphere.

I'd be okay with distance from point A to point B, based on the
diameter of the earth, but if you have ideas on calculating it taking
height above/below sea levels into consideration i'd be interested.
The other big part of this is the angle of that intersecting line. 
For example, if I'm standing in San Francisco and want to point at
China, I'd point "down" at the earth, but how far n/s/e/w?  What would
be a good way to describe this?  A 3-D graph?

Let me know if you have questions or if I can be more clear.  Thanks!
Subject: Re: Distance and angles "through" the globe.
Answered By: mathtalk-ga on 21 Jul 2003 20:51 PDT
Hi, kwaaker-ga:

Let's begin with a definition of the latitude and longitude
coordinates mentioned in your question.

[Latitude and Longitude]

Latitude refers to an angle of "elevation" above (or below) the plane
of the equator (as viewed from the Earth's center).  Circles of
constant latitude may then be considered intersections between the
earth's surface and planes running perpendicular to the North/South
axis.  Where navigators refer to so many degrees of North or South
latitude, ranging from 0 degrees at the equator to 90 degrees at the
poles, it will be convenient for us to consider the degrees North
latitude as "positive" and degrees South latitude as "negative".  We
will come to the mathematical reason for this shortly.

Longitude refers to an angle of East/West rotation on the globe,
taking the
Prime Meridian (passing through Greenwich) as the origin or:

 0 degrees East = 0 degrees West.  

Every point on the globe, were it perfectly spherical, would then lie
on a great semicircle drawn from the South Pole to the North Pole, and
the angle of separation between that great semicircle and that of the
Prime Meridian concretely defines the longitude of that point.

Now the Prime Meridian, if continued to form a great circle all the
way around the world, passes largely through the Pacific Ocean, a bit
further West than Hawaii.  That "complementary" great semicircle to
the Prime Meridian is roughly where the International Date Line is
drawn (but don't call now, it's already tomorrow there and you'd be
late for any dates you make tonight).

Therefore longitude measurements range from 0 degrees to 180 degrees
either East or West of the Prime Meridian, with the quirk that:

 180 degrees East = 180 degrees West 

(along the "backside" of the Prime Meridian).

It will turn out to be convenient for us to treat degrees West
longitude as "positive" and degrees East longitude as "negative".

It also turns out that formula (1) given on the Web page above,
converting latitude (phi) and longitude (theta) to Cartesian
coordinates (which make it easy to compute distances, using the
Pythagorean distance formula), is not quite correct.  Rather belabor
that point, let me simply give a formula that is correct.

The convention here is that the North/South axis is the z-axis, with
the North Pole on the positive side of the z-axis. Thus the equator
lies in the xy-plane (so that our "sphere" is centered at the origin
in 3D).  We pick the positive x-axis to pass through the Prime
Meridian on the equator, and the positive y-axis to pass through 90
degrees West longitude there.

Notice that the z-coordinate should depend only on latitude phi and of
course the radius of the earth.R.  In fact, with the convenient
treatment that phi is positive in Northern latitudes and negative in
Southern latitudes, we have simply:

z = R sin( phi )

If one focuses only the equator, where z = 0, then it should be pretty
plausible that the x-coordinate depends on the cosine of the longitude
theta, and that the y-coordinate depends on the sine of the longitude.
 Again this takes advantage of our convention that Western longitudes
will be positive and Eastern ones negative.  Coupled with the effects
of "shrinking" circles of latitude as we leave the equator and
approach either pole, the following are correct:

x = R cos( phi ) cos( theta )

y = R cos( phi ) sin( theta )

In fact it is easy enough to verify that x^2 + y^2 + z^2 = R^2 for any
latitude and longitude, so that at least we are on the surface of the
sphere of radius R centered at the origin (which is what for
simplicity one imagines the earth to be).

But of course the trick is that R is not constant, first because there
are mountains and valleys (or even ocean depths and space shuttle
flights, if one wants to be particularly colorful) and second because
of the earth's equatorial bulge (no fat jokes, please!).  One might
therefore do an even better job of converting spherical coordinates,
represented here by phi and theta, to Cartesian coordinates if R were
allowed to take on a range of values.

A generally adequate value for R is 6,378 km or 3,963 miles:

[Earth's Radius]

However that is a value which is mostly accurate for the equatorial
radius.  The radius of the earth drops off towards the poles to 6,357
km or 3,950 miles:

[NASA - The Earth, Distance Information]

[Ask a Scientist - Rotating Earth and Latitude]

Bottom line is that the Earth's radius only drops "at sea level" by
about a dozen miles from equator to pole, and if you have an altitude
above (or below) sea level in meters or feet that you'd care to throw
in, you can use the adjusted value of R for any particular location.


Given the latitude and longitude (and perhaps the altitude relative to
sea level), convert those spherical coordinates to Cartesian
coordinates as outlined in the formulas above.

Now if you do this for two locations, you get two points in
three-dimensional space, which we'll denote:

(x1, y1, z1) and (x2, y2, z2)

The distance between them is then:

SQRT( (x1 - x2)^2 + (y1 - y2)^2 + (z1 - z2)^2 )

Of course we want to be careful about units here.  Fortunately angles
(whether given in degrees or radians) are what are called
dimension-less numbers; they have no units or "scale" of measurement. 
The only units that will enter into the answer are the units from
radius R.  You can even use slightly different radius values for the
two locations, just as long as the units are the same.  The distance
provided by the square-root formula above will then have the same
units of distance, e.g. in kilometers or miles.

Finally let's consider the "angle of the intersecting line" that you
also ask about.  Here it probably only makes sense to consider some
constant value for R, because we need to have a tangent plane to the
"sphere" in order to define the "angle of depression" formed by the
line with the surface. (This tangent plane is perpendicular to the
radius at that point and defines the local "horizontal" plane there.)

Consider that between any two points on the globe there is a segment
of a great circle joining them, subtending an angle of at most 180
degrees (since otherwise we could join the points by a shorter arc
going the "other way" around the great circle).

The straight line whose length we computed before is now a chord on
that great circle, intersecting it at the two points of interest.  The
chord forms the base of an isosceles triangle when taken together with
the two radii drawn from the Earth's center to the two locations.

The "angle of depression" between the intersecting line and the
Earth's surface (or to a plane tangent to the sphere at either point)
is then complementary to the base angles of the isosceles triangle
(because the tangent plane is perpendicular to the radius drawn to
that point).  A bit of trigonometry can be done, once the isosceles
triangle is bisected into two right triangles.

The result is that if the chord length (shortest distance along
intersecting line) is D, then the angle of depression A is:

A = arccos(0.5*D/R)

Note that this formula predicts that if D = 2R, ie. a line going
straight through the Earth's center (diameter), then the angle of
depression A would be 90 degrees or "straight down".

regards, mathtalk-ga

Clarification of Answer by mathtalk-ga on 22 Jul 2003 05:57 PDT
There's a cute computation that shows what would happen if a
frictionless tunnel were constructed between any two points on the
Earth's surface (at equal elevation and assuming uniform density of
the Earth).

An object would "fall" into the tunnel and accelerate up to the
halfway point through the trip, then begin to decelerate and come to
rest at the other end.

Amazingly the time required for the trip, solely under the "power" of
gravity, is a constant independent of the distance between the
endpoints of the tunnel.


Comment by Gordon Comstock:

"This reminds me of an annotation by Martin Gardner in his annotated
edition of Alice in Wonderland. There was much speculation of at the
time of Alice's original publication about how long it would take to
get to the other side of the world by falling down a rabbit hole which
was bored through the middle of the earth. It turns out (ignoring
frictional losses) to be just over 42 mins.

"Gardner cites another book by Carroll (Sylvie and Bruno Concluded) in
which he postulates a train powered entirely by gravity. The track is
a tunnel bored from one town to another in a perfectly straight line.
The train (which is of course frictionless - maglev I can hear
everyone shouting) uses its potential energy to accelerate towards the
mid point of the track which is nearer the centre of the earth and the
momentum carries it onwards to its destination. The curious thing
about this train is that no matter between which two points on the
earth's surface it's built (presumably they should be at the same
elevation) the journey time is a constant 42+ mins."

For some hints on how to carry out the computation, see here:

[Gravity and the Earth]

regards, mathtalk-ga
Subject: Re: Distance and angles "through" the globe.
From: raisondetre-ga on 23 Jul 2003 02:21 PDT
Dear Mathtalk,
     i have been going through questions and answers at this 
site for my amusement. I feel I would be derelict in my
responsibilities as someone who values worthy achievements,
if I did not pause here to compliment you on the cleverness,
humor and writing skill with which you transformed a fairly banal
question into an adventure.
     Best Wishes!

Important Disclaimer: Answers and comments provided on Google Answers are general information, and are not intended to substitute for informed professional medical, psychiatric, psychological, tax, legal, investment, accounting, or other professional advice. Google does not endorse, and expressly disclaims liability for any product, manufacturer, distributor, service or service provider mentioned or any opinion expressed in answers or comments. Please read carefully the Google Answers Terms of Service.

If you feel that you have found inappropriate content, please let us know by emailing us at with the question ID listed above. Thank you.
Search Google Answers for
Google Answers  

Google Home - Answers FAQ - Terms of Service - Privacy Policy