Hack 22. Digging to China
Impale the planet and debunk urban myths with some basic arithmetic.
If you started digging straight down and didn't stop, according to a popular phrase you'd be "digging to China." Is this really true? You might think that calculating this requires some awesome spherical trigonometry, but we can work this out from latitude and longitude values with a simple transformation.
Imagine that the Earth is an orange, and slice it into four quarters, demihemispheres. Slice the Earth in half along the equator, and the halves in half along the prime meridian. Looking at the quartered Earth along the prime meridian, with London facing you:
Top-right quarter is from 0 to 90 N latitude, 0 to 180 E longitude.
Top-left quarter is from 0 to 90 N latitude, 180 W to 0 longitude.
Bottom-right quarter is from 90 S to 0 latitude, 0 to 180 E longitude.
Bottom-left quarter is from 90 S to 0 latitude, 180 W to 0 longitude.
It can help to examine a physical globe of the Earth that shows the lines of latitude and longitude.
A line going through the center of the sphere from one point comes out at another point in the opposite quadrantits antipode. (This is why English people call the Australian continent the Antipodes.) So the latitude of the second point is the inverse, the negative mirror image of the first one, which we can obtain by simply flipping north to south, and south to north.
Similarly, longitude is measured 180 degrees around the spheroid in either direction from Greenwich, England, with negative values for westward bearings and positive values for eastward bearings. To figure out the longitude for the antipode, we need to subtract the longitude from 180 and flip the direction east to west, or vice versa.
Suppose, for example, we start digging straight down in San Francisco, in the vicinity of 37.7 N latitude and 122.4 W longitude. According to our simple transformation, the antipode from here is at 37.7 S, 58.4 E. Are we really digging to China? Figures Figure 3-1 and Figure 3-2 show how this looks on an orthographic projection of the world.
Figure 3-1. Digging a hole from San Francisco...
Figure 3-2. ...and coming out in the Indian Ocean
So we're not actually digging to China. Instead, ignoring the physical impossibilities of boring a hole straight through the planet, we should end up at the bottom of the Indian Ocean somewhere near Madagascar. Somehow that just doesn't have quite the same ring to it, does it?
These maps were made with the pscoast utility from the excellent GMT suite of Unix plotting and projection tools, which outputs PostScript, thusly:
$ pscoast -R0/360-/-90/90 -JG58.4/-37.7/5 -B30g30/15g15 -W > map.ps
[Hack #28] explores the myriad features of GMT in much more depth.