From a Point to a Plane, distance, etc
The usual form of the 3-d equation of a general plane is:
Suppose we have an external point and wish to know the shortest distance to the plane and where on the plane the closest approach point, , is. The shortest distance line to the plane is perpendicular to the plane. To see this draw some other line, , to a point, , on the plane and make the right triangle . The distance along the line is the hypotenuse of the right triangle and is therefore longer than .
A convenient method to find the point on the plane at the foot of the perpendicular is to write the equation of a line through which is parallel to , the normal to the plane. Using a simple scalar variable as a parameter for the line and solving for the intersection with the plane, we have:
inserting the parameterized [x,y,z] into the equation for the plane:
This formulation is good for a computer program and it is good to check that the denominator is not zero. If the denominator is zero the plane was no good to begin with.
We can use the distance formula (http://en.wikipedia.org/wiki/Distance#The_distance_formula) to find the distance from to :