January 09, 2015

Consider two known points A, and B, an unknown point C. If we know the distances between C and the other two points, we can recover \(\pi_{AB}(C)\), the projection of C onto the line AB.

The distance between \(\pi_{AB}(C)\) and A is

\[
\begin{align}
d(A, \pi_{AB}(C)) = d(A,B) (1+g) / 2 \text{, where} \\
g &= \left ( d(A,C)^2 - d(B,C)^2 \right ) / d(A,B)^2
\end{align}
\]

This can be derived using the pythagorean theorem and fact triangles AC\pi(C) and BC\pi(C) share a side.

This can be used to derive an expression for \(\pi_{AB}(C)\) using a weighted sum of A and B:

\[
\begin{align}
\pi_{AB}(C) &= (A(1-g) + B(1+g) ) / 2
\end{align}
\]

Posted by
Kyle Simek