Intersection between a Plane and a Line (2 points)

613 Views Asked by At

I have to calculate the intersection between a line and a plane. Of the line I know two points $P_1=(x_1, y_1, z_1)$ and $P_2=(x_2, y_2, z_2)$ while of the plane I know the equation $Ax + By + Cz + D = 0$. How can I do this?

1

There are 1 best solutions below

0
On BEST ANSWER

We may find a parametrisation of the line by interpolating between the two points, so that the points on the line are given by $$ \left\{sP_1 + (1-s)P_2 \, = \, \begin{pmatrix}sx_1+ (1-s)x_2 \\sy_1+ (1-s)y_2\\sz_1 + (1-s)z_2\end{pmatrix} \, : \, s\in\mathbb{R} \right\}. $$

If we insert this parametrisation into the equation for the plane, we get: \begin{align*} &A(sx_1 + (1-s)x_2) + B(sy_1 + (1-s)y_2) + C(sz_1 + (1-s)z_2) + D = 0\\ \iff &s = -\frac{Ax_2 + By_2 + Cz_2 + D}{A(x_1-x_2) + B(y_1-y_2) + C(z_1-z_2)}, \end{align*} giving us the value of $s$ which corresponds to the intersection between the line and the plane. Note that if the denominator of this fraction is $0$, then the plane and the line do not intersect. Finally, we insert this value for $s$ back into our parametrisation of the line to find the intersection point:

$$P_{int.} = -\frac{Ax_2 + By_2 + Cz_2 + D}{A(x_1-x_2) + B(y_1-y_2) + C(z_1-z_2)}P_1 + \frac{Ax_1 + By_1 + Cz_1 + D}{A(x_1-x_2) + B(y_1-y_2) + C(z_1-z_2)}P_2.$$