Projection of a point ** C** having position vector \(\vec{C}\) on any plane having normal vector \(\vec{A}\) making a vector \(\vec{B}\) with any point on the plane is given by following formula

\( \vec{P}= \vec{C} - (\frac{(\vec{A} \cdot \vec{B}) \vec{A} }{\vert \vec{A} \vert ^2})\)

In the above formula \(\vec{P}\) is the point of projection. The length of the projection

\(D = \frac{\vec{A}\cdot\vec{B}}{\vert \vec{A} \vert} \)

The above formula gives a signed distance values (i.e. the distance values can be negative or positive).