Checking if Line and Plane Intersect
The post is compiled with information on Wikipedia page on Line-plane Interaction and this notes on finding the normal to a plane.
What is the question?
This post is about checking if a line intersect with a plane, given 2 different coordinates on the line and 3 different coordinates on the plane.
How to solve it?
Suppose having a line with coordinates and on the line, the vector equation representing the line with the set of consist the line is: \begin{equation} \label{eq:line} \mathbf{p} = \mathbf{a} + d \mathbf{(b - a)} \end{equation}
Suppose having a plane with coordinates , and on the plane, then the normal to the plane is . If is a point on the plane (e.g. can be , or ), the plane can be expressed as the set of points for which: \begin{equation} \label{eq:plane} \mathbf{(p - p_0) \cdot n} = 0 \end{equation}
The point(s) where the line and the plane intersect, the points have the same coordinates. Substitute \eqref{eq:line} into \eqref{eq:plane}:
If then the line and the plane are parallel. In this case, if then the line is on the plane. Otherwise the line and plane have no intersection.
If there is a single point of intersection.