Distance from point to plane
Here’s a quick sketch of how to calculate the distance from a point to a plane determined by normal vector and point .
The equation for this plane is . (Or we might write the equation as , where .) In the below CVT, I’ve drawn in red and in yellow. To simplify the figure, I’ve fixed the plane. Although you can move around, it is confined to lie in the plane.
To calculate the distance from point to the plane, I’ve dropped a perpendicular from the point to the plane, drawing it as a gray line. The point where the perpendicular hits the plane is drawn in green. is the point on the plane closest to . Hence the distance from to the plane is the distance from to , or the length of the gray line. (You cannot move directly by dragging on it, as its position is determined by . It will move as you move .)
Next, we calculate an expression for a unit normal vector, i.e., a normal vector of length one. It is simply divided by its length. We’ll use the notation for the unit normal vector:
I’ve draw this unit normal vector in green, shifted so its tail is fixed at the point . (In this case, I haven’t drawn a ball at the end of so the figure doesn’t get too cluttered.) The unit normal vector looks short because I’ve draw the figure so that the , , and axes each extend from to 5.
Let be the vector from to (shown in blue). Since and , we calculate that . The length of the gray line, i.e., the distance from to the plane, is simply the length of the projection of onto the unit normal vector . Since is length one, this distance is simply the absolute value of . We’ll label the distance ; it is
This distance is shown on the cyan slider labeled by to the right of the figure.
Recall that we can also write the equation for the plane as , with . We’ll substitute into the above formula, to arrive at the following expression for the distance from to the plane :
From this final formula, you can see that the distance didn’t depend on the point . As long as is in the plane , then we know that . So, formula (1) is equivalent to formula (2) no matter where in the plane is. It’s clear from the figure how the distance shouldn’t change as you move around in the plane. The vector changes, but its projection onto is constant.