[Math] Tangent points on circle that placed on Earth surface

spheresspherical trigonometryspherical-geometry

I need help about spherical geometry problem that I need to use it for my project.

I try to calculate $T_1 $ and $T_2$ coordinates on $B$ centered small circle on the sphere and $AT_1$ and $AT_2$ circular lines are tangent to that small circle.

Given Earth Angle Coordinates (Longitude (-180,+180) , Latitude (-90,90)) are $A=(x_1, y_1)$ and $B=(x_2,y_2)$ . And the perimeter of circle (r) on the Earth surface is also given.

I want to calculate $T_1 $ and $T_2$ angle coordinates.(Please suppose that Earth is perfect sphere)

enter image description here

My Strategy to solve the problem:

  1. I suggest that Point $A$ is my new North Pole point (0,90).
    $$B'=(0,90-\alpha)$$

Where $\alpha$ is angle between Point $A$ and point $B$.

$\alpha=|$Shortest distance between $A$ and $B$ on sphere$|/R$

$\alpha$ on unit sphere can be calculated via Spherical_law_of_cosines easily.

  1. I need to calculate angle $a$

enter image description here

Thus
$$\sin(\alpha)=\frac{x}{R}$$
$$x=R.\sin(\alpha)$$
$$r=a.x$$
$$a=\frac{r}{x}=\frac{r}{R.\sin(\alpha)}$$

  1. To find relative coordinates of coordinates $T'_1 $ and $T'_2$ are:

$$T'_1=(-a, 90-\alpha) $$
$$T'_2=(a, 90-\alpha)$$

I am not sure to add relative point of A and to get real coordinates because $AB$ circle may not pass point $N$ as shown on first picture above.

Could you please help me how to solve that problem . Thanks a lot for helps

Best Answer

$\DeclareMathOperator{\proj}{proj}$This can be handled easily using vector algebra. Let $A$ and $B$ be the specified points on the unit sphere, viewed as vectors in space, and assume $A \neq \pm B$ and $\cos r < A \cdot B$ ($A$ is outside the circle $C$ of radius $r$ centered at $B$). Let $U_{1}$ be the unit vector orthogonal to $B$ and tangent to the "short" great circle arc from $B$ to $A$, and let $U_{2} = B \times U_{1}$.

Theorem: If $$ \theta = \arccos\left[\frac{(A \cdot B)\tan r}{A \cdot U_{1}}\right], $$ then the points $T_{1}$ and $T_{2}$ are $$ (\cos r)B + \sin r\bigl((\cos\theta) U_{1} \pm (\sin\theta) U_{2}\bigr). $$

Computational note:

  • $U_{1}$ is the second vector obtained from the Gram-Schmidt algorithm on the ordered basis $\{B, A\}$; that is, $$ U_{1} = \frac{A - \proj_{B}A}{\|A - \proj_{B}A\|}. $$

Proof of Theorem: Every point on the circle $C$ has the form $$ T = (\cos r)B + \sin r\bigl((\cos\theta) U_{1} \pm (\sin\theta) U_{2}\bigr) \tag{1} $$ for some real $\theta$.

If $T$ is an arbitrary point of $C$, let $A' = A - T$ and $B' = B - T$ denote the displacements to $A$ and $B$. The projections of these vectors to the tangent plane at $T$ are $$ A'' = A' - (A' \cdot T)T,\qquad B'' = B' - (B' \cdot T)T, $$ and $T$ is a point of tangency if and only if $A'' \perp B''$. Expanding the dot product, using the fact that $T$ is a unit vector $(T \cdot T = 1$) lying on the circle of radius $r$ centered at $B$ ($B \cdot T = \cos r$), gives (omitting most of the algebra) $$ 0 = A'' \cdot B'' = A' \cdot B' - (A' \cdot T)(B' \cdot T) = A \cdot B - (\cos r)A \cdot T, $$ or $$ A \cdot T = \frac{A \cdot B}{\cos r}. \tag{2} $$ Substituting (1) in (2), using the fact that $A \cdot U_{2} = 0$, and solving for $\theta$ gives the value in the theorem.

Great circles through a point tangent to a circle