Objective: Given two straight lines in 3D:
-
line 1: r = a + t*b
-
line 2: r = p +s*q
Show that the distance between those two lines are |(a - p).u|
where u is a unit vector given by b x q / |b x q|.
- Finding direction of the line segment
- Finding the length of the line segment that bridge line 1 and 2
To find the length, scalar projection can be applied. If we know a vector that bridges the two lines (in this case it is a - p), we can find the distance between those two lines by calculating scalar projection on the perpendicular vector. Remember that the distance is actually |a - p| cos theta where theta is an angle between (a - p) and the perpendicular vector.
The scalar projection is |a - p|cos theta = | (a - p) . (b x q) | / | b x q| = | (a - p) . u|.
Q.E.D.
1 comment:
pinyotae your Math: Distance between two lines was a healthy read. We need more of this in the internet community and articles about strokes, strokes, strokes and strokes are other health issues that you might consider. Our strokes is related to health issues and topics. Keep up the great articles and subject matter.
Post a Comment