Finding the points on two lines where the minimum distance is achieved Given two lines: r_1(t)=(a_1,b_1,c_1)+t(p_1,q_1,r_1) r_2(s)=(a_2,b_2,c_2)+s(p_2,q_2,r_2)

Taliyah Reyes

Taliyah Reyes

Open question

2022-08-16

Given two lines:
r 1 ( t ) = ( a 1 , b 1 , c 1 ) + t ( p 1 , q 1 , r 1 )
r 2 ( s ) = ( a 2 , b 2 , c 2 ) + s ( p 2 , q 2 , r 2 )
I have calculated the cross product of the direction vectors to get the vector perpendicular to both lines:
n = ( p 1 , q 1 , r 1 ) × ( p 2 , q 2 , r 2 )
Which gives the vector n .
I then got a vector V between a point on each line, and calculated the minimum distance d between both lines by finding the scalar projection of V onto n
d = | V n | | n |
I now need the points on both lines where this minimum distance is achieved, how would I go about doing that?

Answer & Explanation

Jakob Chavez

Jakob Chavez

Beginner2022-08-17Added 14 answers

L 1 ( t ) = ( a 1 , b 1 , c 1 ) + t ( p 1 , q 1 , r 1 )
L 2 ( s ) = ( a 2 , b 2 , c 2 ) + s ( p 2 , q 2 , r 2 )
If two points on lines L 1 and L 2 are A and B resp.,
A B = ( a 1 a 2 + t p 1 s p 2 , b 1 b 2 + t q 1 s q 2 , c 1 c 2 + t r 1 s r 2 )
to find two points on lines with minimal distance, the vector A B should be perpendicular to both lines. So the dot product of A B to the directional vectors of both lines be zero.
A B ( p 1 , q 1 , r 1 ) = 0
A B ( p 2 , q 2 , r r ) = 0
Solve for s and t and that should give you two points. You can also find the minimum distance from there.
lexi13xoxla

lexi13xoxla

Beginner2022-08-18Added 2 answers

Hint.
Calling
{ r 1 = r 01 + t v 1 r 2 = r 02 + s v 2
we have
d 2 ( t , s ) = | | r 1 r 2 | | 2 = t 2 | | v 1 | | 2 + s 2 | | v 2 | | 2 + 2 ( r 01 r 02 ) v 1 t 2 ( r 01 r 02 ) v 2 s 2 s t v 1 v 2
now the minimum to this quadratic form is attained at the stationary point given by the solution to
d 2 ( t , s ) = 0

Do you have a similar question?

Recalculate according to your conditions!

Ask your question.
Get an expert answer.

Let our experts help you. Answer in as fast as 15 minutes.

Didn't find what you were looking for?