Hi guys, quick question on the plane equation and finding if a point is on a plane or not.
Given a plane defined by a normal (ABC) and a distance from origin (D). I've read articles describing that a point is on the plane if it satisfies the plane equation:
Ax + By + Cz + D = 0
Which seems to me like it is the equivalent of:
DOT(ABC, xyz) + D = 0
These are the articles in question, tough many google results show the same thing:
http://gamedeveloperjourney.blogspot.com/2009/04/point-plane-collision-detection.html
http://www.xbdev.net/maths_of_3d/collision_detection/point_to_plane/index.php
So far so good, however after writing a few test programs, this does not seem accurate. I read "Real Time Collision Detection" by Christer Ericson, he gives this definition of a plane:
struct Plane {
Vector n; // Plane normal. Points x on the plane satisfy Dot(n,x) = d
float d; // d = dot(n,p) for a given point p on the plane
};
By this definition, the equation of a plane should be
Ax + By + Cz = D
Meaning a point is on the plane if it satisfies:
Ax + By + Cz - D = 0
A quick google turned up this page, which seems to confirm the above assertion: