3
$\begingroup$

I can handle non-parallel lines and the minimum distance between them (by using the projection of the line and the normal vector to both direction vectors in the line), however, in parallel lines, I'm not sure on how to start. I was thinking of finding a normal vector to one of the direction vectors (which will be as well normal to the other line because they are parallel), then set up a line by a point in the direction of the normal vector, and then find the points of intersection. After finding the line between the two parallel lines, then we can calculate the distance.

Is this reasoning correct? If it is, is there a way to find normal vectors to a line or any vector instead of guessing which terms give a scalar product of 0? I have encountered this problem as well in directional derivatives and the like.

$\endgroup$
  • $\begingroup$ If no one answers this in an hour or so write a comment with "@AlecTeal" in it and I'll answer then. $\endgroup$ – Alec Teal Nov 27 '13 at 16:32
  • $\begingroup$ There are infinitely many normal vectors (directions) to a line in 3D. $\endgroup$ – user35603 Nov 27 '13 at 16:37
  • $\begingroup$ First, everything depends on your data. What defines your lines ? Point + direction vector? Also, a normal to a line is a plane. $\endgroup$ – Jean-Claude Arbaut Nov 27 '13 at 16:39
  • $\begingroup$ You can follow the technique in my answer. $\endgroup$ – Mhenni Benghorbal Nov 27 '13 at 16:40
  • $\begingroup$ I was thinking, couldn't i as well define the "difference vector" between the two lines (say from an arbitrary point on $L_{1}$ and the equation of the line for $L_{2}$), and then as we have that this difference vector is parallel to one of the direction vectors of the line, calculate the scalar product, equate it to 0 and then find the values of s for which the equality holds? $\endgroup$ – arcbloom Nov 27 '13 at 16:42
2
$\begingroup$

Hint: Let $l_1$ and $l_2$ be parallel lines in 3D. Find a point $A \in l_1$ and then find the distance from $A$ to $l_2$. There is a formula for distance from a point to a line in 3D.

$\endgroup$
1
$\begingroup$

Hint: find the subspace which is normal to one of the lines (and so normal to both as they are parallel). These lines will intersect this subspace in exactly one point each. Find the distance between these points.

$\endgroup$
  • $\begingroup$ What do you mean exactly with a subspace? Finding it from the origin? (else it wouldn't be a subspace as the line doesn't go through the origin) Or you mean a difference vector? Thank you very much. $\endgroup$ – arcbloom Nov 27 '13 at 17:08
  • 1
    $\begingroup$ In $3$ dimensions, such a subspace would be a plane (going through the origin). Every vector in $\mathbb{R}^n$ is normal to exactly one maximal subspace and if two lines are spanned by the same vector, then they share this maximal normal subspace - in this case a plane. $\endgroup$ – Dan Rust Nov 27 '13 at 17:14
1
$\begingroup$

Let $P$ be a variable point of $L_1$ and $P_0$ a fixed point of $L_2$. Try to minimize $$\left|\frac{\mathbf{a}\times\vec{PP_0}}{|\mathbf{a}|}\right|$$ where $\mathbf{a}$ is leading vector (for example) for $L_1$.

$\endgroup$
0
$\begingroup$

Let $r(t) = r_0 + \hat{r} t, \ \ s(t) = s_0 + \hat{r}t$. Then form a triangle with sides $r_0 - s_0$ and one parallel to $\hat{r}$ with length given by $\hat{r} \cdot (r_0 - s_0)$. Then the length of the missing side is your distance.

$d = \sqrt{ |r_0 - s_0|^2 + (\hat{r}(r_0 - s_0))^2}$

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.