4

Given two non-antipodal points on the surface of a sphere (in -lat,lon or any similar coordinate system) how do I calculate the positions of the poles (one will do, of course) of the great circle that runs through them? I can work out trigonometric formulas and know the basics of spherical trig already. I simply have not found a formula for this. It seems like it should be possible to work it out by constructing and solving a triangle with two right angles in it, but relating the third vertex back to the original reference system doesn't seem to me a straightforward problem. Perhaps there is a conversion formula for such a rotation of coordinate systems.

MOTIVATION: Google Earth should, but doesn't have a feature for drawing the great circle including two such points. I plan on using this calculation to center the provided small circle drawing tool, and just create one that has 90 degrees of arc in its 'radius'.

  • 2
    If you construct, in 3-d, the vectors coming from the center of the Earth to your points, their vector cross product will point to one of the poles. I imagine you'll then have to put that 3-d point back into your preferred 2-d coordinate system. – JonathanZ Mar 20 '23 at 19:56
  • Another approach is to define a plane that goes thru the Earth center and two points. The intersection of this plane and the Earth sphere will be the great circle you need. – Vasili Mar 20 '23 at 19:59
  • If you can access the $(x,y,z)$ coordinates of the points (say $P$ and $Q$) on the sphere in $3$ dimensions, then the cross product $P \times Q$ will point in the direction from the origin to on of the poles of the great circle through $P$ and $Q.$ – coffeemath Mar 20 '23 at 22:51
  • 1
    @JonathanZsupportsMonicaC : elegant!! Very straightforward. After I have coded it (proving I really understand the workings) I'll report back here. Thanks. – Roger Neyman Mar 22 '23 at 04:29
  • 1
    @coffeemath : elegant!! Very straightforward. After I have coded it (proving I really understand the workings) I'll report back here. Thanks. – Roger Neyman Mar 22 '23 at 04:30
  • @Vasili -- Yes, that is the great circle. It is not so clear to me that you took in my question completely. My apologies if it wasn't clear. What I asked for is the pole of that great circle, not the great circle itself. Thank you for replying to my question. – Roger Neyman Mar 22 '23 at 04:30
  • @RogerNeyman Note that you can get useable $(x,y,z)$ coordinates via spherical coordinates, given you know latitude and longitude for your two points. If longitude is $\theta$ and the angle down from north is $\phi,$ then $z=\cos \phi,\ x=\sin \phi \cos \theta, y= \sin \phi \sin \theta.$ [here if latitude is d degrees north use $\phi=90-d,$ and if d degrees south latitude use $\phi=90+d.$] – coffeemath Mar 22 '23 at 08:32
  • @RogerNeyman: To find poles, connect points and drew a diameter that goes thru the midpoint of that segment. The ends of this diameter will be the poles. – Vasili Mar 22 '23 at 14:14

1 Answers1

0

Let $A, B$ be the two given points, and $N$ be the north pole. WLOG, I pick $B$ to be in the hemisphere east of $A$.

Using the polar angles of $A$ and $B$, and the difference of their longitudes, find the absolute bearing from $A$ to $B$. This is possible by considering the spherical $\triangle NAB$ and applying a formula to solve the spherical triangle given SAS:

$$\angle NAB = \arctan \frac{\sin (NB) \sin (\angle ANB)}{\sin(NA) \cos (NB) - \cos(NA)\sin (NB)\cos(\angle ANB)}$$

Add $\pi/2$ to, or subtract $\pi/2$ from, the above absolute bearing to obtain the absolute bearing from $A$ to a pole of the great circle through $A$ and $B$. I would choose to add or subtract $\pi/2$, to obtain a new bearing between $0$ and $\pi$.

Let $X$ be this pole. Spherical $\triangle NAX$ is a quadrantal triangle with side $AX=\pi/2$, so it's possible to apply Napier's rules for quadrantal triangles and find both

  1. the length of side $NX$, i.e. the polar angle of $X$: $$\cos (NX) = \sin (NA) \cos (\angle NAX);$$

  2. and the angle $\angle ANX$, i.e. the difference of longitudes of $X$ and $A$: $$\tan (\angle ANX) = - \frac{\tan(\angle NAX)}{\cos(NA)}.$$

Also handle the edge cases (sometimes trivial):

  • If the two given points have the same longitude, or their longitudes are $\pi$ apart;
  • If one given point is the north pole or the south pole;
  • If $A$ is on the equator ($NA = \pi/2$);
  • If the absolute bearing from $A$ to $B$ ($\angle NAB$) is exactly $\pi/2$;
  • And maybe more.
peterwhy
  • 22,256
  • This sounds like a logical process that I can follow using only S.Trig. Thank you.

    One note, though: it is confusing you used "n" in two contexts that are clearly not equal to each other since AB =/= AX.

    I get that AX is perpendicular to AB, and AN and AX are both known, so solving for NX and the angle **XNA is relatively easy.

    – Roger Neyman Mar 22 '23 at 04:47
  • Thanks @RogerNeyman, fair point about "$n$", and I removed those references to lengths or angles that use a single letter. – peterwhy Mar 22 '23 at 14:24