From: Edward A Williams <72347.1516@compuserve.com> Newsgroups: comp.infosystems.gis,alt.math,sci.math Subject: Re: Sphere-line algorithm wanted Date: Sat, 27 Dec 1997 12:37:30 -0800 Eric Buddington wrote: > Context: > > I'm building an algorithm that takes a bunch of points and returns a > bounding box that encompasses all the points and any lines that might > be drawn between them. > > The sides of the bounding box follow lines of latitude and longitude, > so the north and south edges aren't straight (I locally define > 'straight' to mean 'following the shortest surface distance between > two points). > > I can easily get such a box that encompasses all the points, but > straight lines can go outside of the box along the north or south > edges, if they are concave. > > Question: > > Given two points at the same latitude in the northern hemisphere, what > is the northernmost point reached by a straight (see definition above) > line between them? An algorithm that gives a high (too far north) > answer is acceptable. Speed is important. > > Assume the earth is spherical (ellipsoidal geometry gets kind of > hairy). > > Ideas and partial answers may also be useful. > > Eric > ebuddington@wesleyan.edu http://www.best.com/~williams/avform.htm#Clairaut has Clairaut's formula which answers your question. There is an ellipsoidal variant of the same formula if you really need it. Ed