I have a point in 3D specified by its coordinates (x0, y0, z0)(adsbygoogle = window.adsbygoogle || []).push({});

I have a line in 3D specified and bounded by its end points (x1, y1, z1) and (x2, y2, z2)

How do I calculate the minimum distance between the point and the line, keeping in mind that it may not be the perpendicular distance between the point and the extrapolated line because the line is bounded by its end points.

I would also like to know the point (x4, y4, z4) on the line that is closest to the external point.

**Physics Forums | Science Articles, Homework Help, Discussion**

Join Physics Forums Today!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

# Minimum distance between a point and a bounded line in 3D

**Physics Forums | Science Articles, Homework Help, Discussion**