Line forms
Point direction form: $$ \frac{x-x_1}{a} = \frac{y - y_1}{b} = \frac{z-z_1}{c} $$ Two point form: $$ \frac{x-x_1}{x_2-x_1} = \frac{y - y_1}{y_2-y_1} = \frac{z-z_1}{z_2-z_1}$$ Parametric form: $$ \begin{aligned} x &= x_1 +t\,\cos \alpha \\ y &= y_1 +t\,\cos \beta \\ z &= z_1 +t\,\cos \gamma \end{aligned}$$
Distance between two lines in 3 dimensions
The distance from | $$ P_2(x_2,y_2,z_2) $$ | to the line through | $$ P_1(x_1,y_1,z_1) $$ | in the direction | $$ (a,b,c) $$ | is |
First one: through | $$ P_1(x_1,y_1,z_1) $$ | in direction | $$(a_1,b_1,c_1) $$ | , |
Second one: through | $$ P_2(x_2,y_2,z_2) $$ | in direction | $$(a_2,b_2,c_2) $$ | is: |