# Geodesics and polar coordinates.

Consider a spherical triangle with 3 angles: $\pi/2$, $\pi/3$, $\pi/3$. All sides are geodesics of course. The sphere has radius $r=1$.

Context: I want to know whether a given point in polar coordinates ($\phi$, $\theta$, $r$) where $r=1$, is in my triangle. (My convention for polar coordinates is: $\phi$ is the rotational angle around the north pole and $\theta$ is the azimuthal angle. $\theta=0$ is the north pole. $\theta=\pi$ is the south pole).

I will place the right angle at the north pole. One side of my triangle will be at $0$ longitude, and one will be at $\pi/2$ longitude. So clearly one condition must be: $0<\phi<\pi/2$.

But I can't figure out the condition that determines whether I am north of my geodesic that defines the base/hypotenuse of the triangle. The condition would be in terms of theta which would in turn be a function of $\phi$, but that's as far as I can get.

I think you mean that $\theta\in[0,\pi]$ is the zenith angle and $\phi\in\mathbb R$ is the azimuthal angle.
That said, let $A$ be the north pole, $BC$ the hypotenuse and $P$ the point to judge. Once you are certain that the azimuth of $P$ lies within $0<\phi<\pi/2$, solve for the spherical angle $\angle ABP$ and compare it with $\angle ABC$:
• If $\angle ABP=\angle ABC$, then $P$ lie on $BC$.
• If $\angle ABP>\angle ABC$, then $P$ lies south of $BC$ (outside the triangle).
• If $\angle ABP<\angle ABC$, then $P$ lies north of $BC$ (inside the triangle).
To obtain $\angle ABP$, use the law of cosines for spherical triangle $ABP$ on the unit sphere: $$\cos\angle ABP=\frac{\cos\stackrel\frown{AP}-\cos\stackrel\frown{AB}\cos\stackrel\frown{BP}}{\sin\stackrel\frown{AB}\sin \stackrel\frown{BP}}.$$