shortest vector between two line segments
1 view (last 30 days)
Hi, im looking to find the shortest vector between two line segments.
The purpose is that i generate two line segments in space, and then i want to move one toward the other in the shortest distance possible. I have seen some existing matlab codes that provide the shortest distance between line segments - but in this case i need direction as well.
any help would be greatly appreciated!
John D'Errico on 13 Mar 2014
Any code that can find the shortest distance between the segments must also implicitly know the points of interest on each segment. Subtracting those two points gives the vector you need.