Find Intersection Points of two Lines in 3D-Space

1.8k Views Asked by At

I tried to read this article, but i didn't understand: Intersection point of two lines in 3D

Can someone give an easy example with numbers to see how intersection points of lines in 3D-Space are calculated?

Lets say, there is a line described as two vectors for the start and end position:

Line1Start = (-1, 0, -1) Line1End = (1, 0, 1)

Line2Start = (-1, 0, 1) Line2End = (1, 0, -1)

I know that on a cartesian coordinate system, the intersection point would be at (0, 0, 0). How is the formula applied in my case?

2

There are 2 best solutions below

0
On

To have the vectorial equation of a line, you need a point and a vector, and both of them you have. To get the vector, just substract the points of the same line.

From your "Line1", you get

$r: (-1, 0, -1) + \lambda\vec{v}_1$

where $\vec{v}_1=(2,0,2)$

From your "Line2", you get

$ s: (-1, 0, 1) + \mu\vec{v}_2$

where $\vec{v}_2=(2,0,-2)$

Now you got to equal the coordinates of r and s and solve the system:

$$ \left\{ \begin{array}{c} -1+2\lambda=-1+2\mu \\ 0=0 \\ -1+2\lambda=1-2\mu \end{array} \right. $$

It is clear that the solution is $(0,0,0)$ since $\lambda=1/2=\mu$

0
On

The parameterization of a line through the points $(x_0, y_0, z_0)$ and $(x_1, y_1, z_1)$ is as follows

$$ \begin{align*} x&= x_0 + (x_1 - x_0) t \\ y&= y_0 + (y_1 - y_0)t\\z&= z_0 + (z_1 - z_0)t \end{align*} $$

Applying these equations to your particular example:

For Line 1 $$ \begin{align*} x_1 &= -1 + 2t \\ y_1 &= 0 \\ z_1 &= -1 + 2t \end{align*} $$ For Line 2 $$ \begin{align*} x_2 &= -1 + 2t \\ y_2 &= 0 \\ z_2 &= 1 - 2t \end{align*} $$

From here, it is pure algebra. Solve for t $$ \begin{align*} z_1 &= z_2\\ -1 + 2t &= 1 - 2t \\ t &= \frac{1}{2} \end{align*} $$ plug $t$ back into the either parametric representation $$\begin{align*}x_1 \left(\frac{1}{2} \right) &= 0 \\ y_1 \left(\frac{1}{2} \right) &= 0 \\ z_1 \left(\frac{1}{2} \right) &= 0\end{align*}$$

Therefore the lines intersect at $(0,0,0)$