   distance from plane?
  Hi. I was wondering the problem how to calculate distance from plane and I found this. http://www.gamedev.net/reference/programming/features/world3d2/page3.aspI have drawn the planes and normals etc. but I still don''t get it why distance is dot product of normal and any point at the plane. I coded plane like that and tested, and the distance really seems to be correct. Now I would like to know how why this works. Or is it just absolute truth? :D- Kimeli - 
  Whenever you take the dot product between a point and a normal, the result is the distance from the point to a plane described by that normal that goes through the origin.  Thus if you take the dot product between a point on the plane and the normal, you assume a plane with that normal through the origin, and the distance of the point is obviously the distance of the actual plane in 3D space!The big question is why the dot product between a normal and a can give you the distance between the point and the plane.  The best advice I can give is to draw some diagrams, look up the definition of the dot product and recall your old geometry and trigonometry lessons ;  Don''t forget to use a normalized plane-normal vector (with length one) to get the proper distance from the plane to the point (0,0,0). Otherwise, if your plane-normal vector is not normalized you have to divide the resulting distance by the length of the normal-vector.Cheers,Oliver ;quote:Original post by Zipster  The big question is why the dot product between a normal and a can give you the distance between the point and the plane.  The best advice I can give is to draw some diagrams, look up the definition of the dot product and recall your old geometry and trigonometry lessons  I guess that someday I have to do that (recall old books and rollrollroll again geometry), but maybe now I just cheat and think that its ''magic''. - Kimeli - ;  You can think of the distance between the origin and a plane as the magnitude of a vector projection, of any vector from the origin to the plane, onto the normal vector of the plane (assuming normalized normal).  I find that makes geometric sense to me, so mabye it''ll help others...?  Drawing a little 2D diagram is useful, as you can see the standard right triangle for which you know the trig relations between side lengths and angles... ;quote:Original post by Geoff the Medio  You can think of the distance between the origin and a plane as the magnitude of a vector projectionYes. Vector projection was that I was looking for. Thanks. 