Distance on a Sphere

In the last module, you learned how to compute the distance between two points in the plane and between two points in three dimensional space. Planar distance is a good approximation for points on the earth that are relatively close together, but as the points get farther apart the approximation breaks down. You could compute the absolute distance between two points on the surface of the earth by putting the origin of three-dimesnional space at the center of the earth, finding coordinates for the points, and then using the formula you came up with in the last module. This method has some problems too, though. If you compute distance using the three-dimensional distance formula, you would have to travel through the earth to actually achieve that distance. Any path you took on the surface of the earth would be longer. So, let's try to answer the question, given two points of the surface of the earth, how can we compute the shortest path along the earth's surface between therm?

We will have to start with some basic parameters to make the question answerable. First, let's pretend that the earth is a perfect sphere of radius r. The earth isn't actually a perfect sphere, but a sphere is a good approximation. Also, by using a variable for the radius, we will solve the problem in more generality. By just plugging in the radius of the earth, we'll have our answer, but by working in greater generality we'll be able to find the distance between two points along the surface on any sphere. For example, we'll be able to find the distance to walk between two points on the surface of Mars.

Let's set up a three-dimensional Cartesian coordinate system, with the origin at the center of the earth. As you will soon see, this will simplify our calculations.

Also, you will have to believe me that the distance on the surface of a sphere between any two points that are on the equator (that is, their third coordinate in the Cartesian coordinate system is 0) is obtained by just walking from one to the other along the equator. To prove this requires some pretty high powered math, which is outside the scope of these modules.

One more thing, some of you may be wondering why there is a shortest path between any two points on a sphere (except for antipodal points, then there are many "shortest paths" -- why?). Again, this requires some math that lies outside the scope of the modules. If you aren't wondering, here's why you should be: Suppose you are traveling between two points on the equator, and there is a land mine at one point on the equator between you and where you are traveling. You can step as close to that point as you want, but you can't step on it. Is there going to be a shortest path?

Okay, now let's get to work.

Problem 1: Let's consider two points on a sphere of radius r centered at the origin in three-dimensional space that are not antipodal. Let's call them (x1, y1, z1) and (x2, y2, z2). Before we can figure out how long the shortest path on the surface of the sphere between these two points is, we need to figure out what that path looks like. Can you precisely describe this path using geometric terms? (Hint: Think about all the planes the contain both of our points. Which of these planes is the most similar to unique plane that contains the entire equator? Now you should understand why we are not considering antipodal pairs of points)

Problem 2: What is the distance between our two points in the sense of the previous module? Remember to simplify! The distance from each of our points to the origin is r; what does that mean about the sum of the squares of their coordinates?

Problem 3: Consider an isosceles triangle with leg lengths, r, r, and your answer from problem 2. What is the angle between the two legs of common length? (Hint: Consider bisecting this angle to get two right triangles. Then use the formula for arcsin.) How is such a triangle related to your answers to problems 1 and 2? Draw a diagram to demonstrate.

Problem 4: Considering the angle you obtained in problem 3 as a percentage of the total number of degrees in a circle, determine the required arclength from your diagram. What does this arclength represent?

Your answer to problem 4 gives the shortest distance between the two points along the surface of the sphere, as long as they are not antipodal. So let's finish off the job . . .

Problem 5: Given two antipodal points on the sphere, the shortest distance between them along the surface is the same as the shortest distance on the sphere between two antipodal points on the equator. Why is this? What is this distance?

Now given any two points on a sphere, you can find the distance between them, but what if you are just given the latitude and longitude of the two points? We need a way to get the Cartesian coordinates of a point from its latitude and longitude, or its geographical coordinates. As a convention, we will use negative numbers to denote south latitudes and west longitudes, and positive numbers to denote north latitudes and east longitudes. Let's orient the sphere so that the equator lies on the xy-plane, and the prime meridian lies on the xz-plane. With this orientation, latitude measures the angle a and longitude measures 90 - b (in degrees) in the following diagram, where r is the radius of the sphere.

Problem 6: Suppose that you are given latitude = a and longitude = 90 - b = b'. What is the length of the segment from (0, 0, 0) to (x, y, 0) in terms of r and b'? What is z in terms of r and b'?

Problem 7: Using what you found out in problem 6, can you write x and y in terms of a, b', and r? (Hint: Use trigonometry.)

Now, given the latitude and lonitude of any two points on the earth's surface, you can convert this information into Cartesian coordinates, and find the shortest distance between the points along the surface of the earth!