(adsbygoogle = window.adsbygoogle || []).push({}); 1. The problem statement, all variables and given/known data

I have two lines :

a,u,b,v are vectors.

[tex]A=\left\{a+s*u|s \in R \right\} B = \left\{b+t * v|t \in R \right\}[/tex]

The two lines does not touch each other (does not meet)

I need to find the closest point between the lines.

2. Relevant equations

3. The attempt at a solution

I know several ways, But all of them are giving me unbelivable long functions..

There must be a short way.

One options it to build a vector between two random points in the lines and then the scalar multipltion of them need to give me 0 .

a,u,b,v are vectors.

[tex](b+t*v-a-s) \bullet v = 0[/tex]

[tex](b+t*v-a-s) \bullet u = 0[/tex]

But as I said I tried to solved it and it got to be very very very long and I always made errors...

Second way it to find [tex]u \times v [/tex] this is a vector that is vertical to both lines so if I need to fins the solution of :

[tex]b+t*v+q(u \times v) = a+s*u [/tex]

**Physics Forums | Science Articles, Homework Help, Discussion**

Dismiss Notice

Join Physics Forums Today!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

# Find closest points between lines

**Physics Forums | Science Articles, Homework Help, Discussion**