I wish to write a program that computes the distance between two points on the Earth's surface. Later I would want to turn it into a Java applet, so that also is a consideration. The reference surface I would like to use would be the fairly simple oblate spheroid.

Arc lengths can be calculated either analytically or numerically. I would much prefer an analytic solution since that would, I assume, be the better choice for a Java applet.It is intuitively evident to me that a minimal arc connecting two points on this ellipsoid would coincide with the intersection of the ellipsoid and the plane passing through the center and the two points.Is this correct? If not, is it close enough for "government work?"

Any ideas would be appreciated.

Charles