Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Calculating the shortest distance between two lines (line segments) in 3D

Tags:

I have two line segments: X1,Y1,Z1 - X2,Y2,Z2 And X3,Y3,Z3 - X4,Y4,Z4

I am trying to find the shortest distance between the two segments.

I have been looking for a solution for hours, but all of them seem to work with lines rather than line segments.

Any ideas how to go about this, or any sources of furmulae?