- Can you briefly go over Distance from a Point to a Plane?
Sure. We need
- Q the point off the plane
- N, the surface normal of the plane.
- P, the point on the plane
- W, the vector from P on the plane to Q, which is just Q-P
- $\theta$ the angle between N and W.
We want to find D, the (scalar) distance. \[ \begin{eqnarray*} d &=& \cos\theta |W| \\ d &=& \frac{N\cdot W}{|N||W|} |W| \\ d &=& \frac{N\cdot W}{|N|} \\ d &=& \frac{N\cdot (P-Q)}{|N|} \\ \end{eqnarray*} \]
- Can you go over Intersecting a Ray with a Plane? / Math behind intersection of ray and plane?
Yes, let's do that. The key idea is:
The dot product of the surface normal with every point on the plane is the same
\[ N \cdot (x,y,z) = N \cdot P \] - In the "better way" of intersecting a ray with a plane, what do the variables P and N represent exactly (I know the plane is defined by them though)?