Distance between two 3D lines
▲
Parametric line equation
L
1
x =
+ t
y =
+ t
z =
+ t
L
2
x =
+ s
y =
+ s
z =
+ s
Line equation
L
1
x +
=
y +
=
z +
L
2
x +
=
y +
=
z +
Lines defined
by 4 points
L
1
x
1
y
1
z
1
x
2
y
2
z
2
L
2
:
x
3
y
3
z
3
x
4
y
4
z
4
Distance between the lines:
Connecting line intersections:
Angle between the lines:
Connecting line vector:
Connecting line unit vector: