info prev up next book cdrom email home

Point-Line Distance--3-D

A line in 3-D is given by the parametric Vector

{\bf v}=\left[{\matrix{x_0+at\cr y_0+bt\cr z_0+ct\cr}}\right].
\end{displaymath} (1)

The distance between a point on the line with parameter $t$ and the point $(x_1, y_1, z_1)$ is therefore
\end{displaymath} (2)

To minimize the distance, take

{\partial (r^2)\over \partial t} = -2a(x_1-x_0-at)-2b(y_1-y_0-bt) -2c(z_1-z_0-ct) = 0
\end{displaymath} (3)

\end{displaymath} (4)

t={a(x_1-x_0)+b(y_1-y_0)+c(z_1-z_0)\over a^2+b^2+c^2},
\end{displaymath} (5)

so the minimum distance is found by plugging (5) into (2) and taking the Square Root.

See also Line, Point, Point-Line Distance--2-D

© 1996-9 Eric W. Weisstein