| Author |
Message |
John Doe science forum addict
Joined: 03 Jun 2005
Posts: 59
|
Posted: Sun May 28, 2006 12:17 am Post subject:
LINES
|
|
|
Does anyone remember the formula for finding the shortest distance between
two straight lines? Thanks so much in advance. |
|
| Back to top |
|
 |
dtrebbien science forum beginner
Joined: 27 Jun 2005
Posts: 3
|
Posted: Sun May 28, 2006 12:29 am Post subject:
Re: LINES
|
|
|
|
Here is a hint: use the Pythagorean theorem. |
|
| Back to top |
|
 |
Lynn Kurtz science forum Guru
Joined: 02 May 2005
Posts: 603
|
Posted: Sun May 28, 2006 2:13 am Post subject:
Re: LINES
|
|
|
On Sun, 28 May 2006 00:17:28 GMT, "John Doe" <johndoe@nothing.edu>
wrote:
| Quote: | Does anyone remember the formula for finding the shortest distance between
two straight lines? Thanks so much in advance.
|
I suppose you mean two skew lines in 3D. Let D1 and D2 be direction
vectors for the lines. Let N = D1 cross D2, which is perpendicular to
both. Divide N by its length to make a unit vector n. Let P1 be a
point on one line and P2 a point on the other, and let V = the vector
from P1 to P2. What you need is the absolute value of the component of
V along N:
d = | V dot n |.
--Lynn |
|
| Back to top |
|
 |
John Doe science forum addict
Joined: 03 Jun 2005
Posts: 59
|
Posted: Sun May 28, 2006 2:34 am Post subject:
Re: LINES
|
|
|
"[Mr.] Lynn Kurtz" <kurtzDELETE-THIS@asu.edu> wrote in message
news:8wV5ROWOlbjequtx3ANkSjXkNb8c@4ax.com...
| Quote: | On Sun, 28 May 2006 00:17:28 GMT, "John Doe" <johndoe@nothing.edu
wrote:
Does anyone remember the formula for finding the shortest distance between
two straight lines? Thanks so much in advance.
I suppose you mean two skew lines in 3D. Let D1 and D2 be direction
vectors for the lines. Let N = D1 cross D2, which is perpendicular to
both. Divide N by its length to make a unit vector n. Let P1 be a
point on one line and P2 a point on the other, and let V = the vector
from P1 to P2. What you need is the absolute value of the component of
V along N:
d = | V dot n |.
--Lynn
|
How do we pick the two points? We can't just pick any two points because the
two points should be on a line that is perpendicular to both lines. Am I
right? Let's pick an easy example: y = 3/2 x + 0, y = 3/2 x -4, a
perpendicular line to the two lines can be y = -2/3 x. Instead of using the
3 equations to find the intersections (i.e. P1 and P2) and the distance
using d^2 = (y2 - y1)^2 + (x2-x1)^2 can we choose P1 and P2 in a different
way? (i.e. without doing a lot of math to find the points of intersection) |
|
| Back to top |
|
 |
Lynn Kurtz science forum Guru
Joined: 02 May 2005
Posts: 603
|
Posted: Sun May 28, 2006 3:14 am Post subject:
Re: LINES
|
|
|
On Sun, 28 May 2006 02:34:39 GMT, "John Doe" <johndoe@nothing.edu>
wrote:
| Quote: |
"[Mr.] Lynn Kurtz" <kurtzDELETE-THIS@asu.edu> wrote in message
news:8wV5ROWOlbjequtx3ANkSjXkNb8c@4ax.com...
On Sun, 28 May 2006 00:17:28 GMT, "John Doe" <johndoe@nothing.edu
wrote:
Does anyone remember the formula for finding the shortest distance between
two straight lines? Thanks so much in advance.
I suppose you mean two skew lines in 3D. Let D1 and D2 be direction
vectors for the lines. Let N = D1 cross D2, which is perpendicular to
both. Divide N by its length to make a unit vector n. Let P1 be a
point on one line and P2 a point on the other, and let V = the vector
from P1 to P2. What you need is the absolute value of the component of
V along N:
d = | V dot n |.
--Lynn
How do we pick the two points? We can't just pick any two points because the
two points should be on a line that is perpendicular to both lines. Am I
right? Let's pick an easy example: y = 3/2 x + 0, y = 3/2 x -4, a
perpendicular line to the two lines can be y = -2/3 x. Instead of using the
3 equations to find the intersections (i.e. P1 and P2) and the distance
using d^2 = (y2 - y1)^2 + (x2-x1)^2 can we choose P1 and P2 in a different
way? (i.e. without doing a lot of math to find the points of intersection)
|
Like I said, I was assuming you meant 3D lines. And, yes, P1 and P2
could be any points on each line. But if you want the case of 2D
parallel lines you can just take any point on one line and compute its
distance from the other line. See:
http://mathworld.wolfram.com/Point-LineDistance2-Dimensional.html
--Lynn |
|
| Back to top |
|
 |
Gene Ward Smith science forum Guru
Joined: 08 Jul 2005
Posts: 409
|
Posted: Sun May 28, 2006 3:21 am Post subject:
Re: LINES
|
|
|
[Mr.] Lynn Kurtz wrote:
| Quote: | http://mathworld.wolfram.com/Point-LineDistance2-Dimensional.html
|
Here's a formula for two lines valid for any finite dimension:
http://en.wikipedia.org/wiki/Skew_lines |
|
| Back to top |
|
 |
Ignacio Larrosa Cañestro science forum Guru Wannabe
Joined: 02 May 2005
Posts: 112
|
Posted: Sun May 28, 2006 11:23 am Post subject:
Re: LINES
|
|
|
En el mensaje:s_5eg.8622$y4.7107@newsread2.news.pas.earthlink.net,
John Doe <johndoe@nothing.edu> escribió:
| Quote: | Does anyone remember the formula for finding the shortest distance
between two straight lines? Thanks so much in advance.
|
Let u and v be director vectors of two lines and w a vector from any point
at the first line to any point in the second line. Then
d = |w * (u x v)|/|u x v|
where '*' is the dot product and 'x' the cross product. It is simpli colume
of a paralelepide divided by its base ---> height.
--
Best regards,
Ignacio Larrosa Cañestro
A Coruña (España)
ilarrosaQUITARMAYUSCULAS@mundo-r.com |
|
| Back to top |
|
 |
Google
|
|
| Back to top |
|
 |
|