Projection of a Line having direction vector \(\vec{A}\) on a plane having normal vector \(\vec{B}\) is given by following formula

\( \vec{P}= (\frac{\vec{B} \times (\vec{A} \times \vec{B})}{\vert \vec{B} \vert ^2})\)

In the above formula \(\vec{P}\) is the projected vector. Please note that this is same as vertical (perpendicular) projection of vector \(\vec{A}\) on \(\vec{B}\)