Reputation: 580
I have a polygon defined by n
points and a polygon normal
.
normal=(nx,ny,nz)
d
(distance from the origin to the plane).nx*x+ny*y+nz*z+d=0.0
Upvotes: 2
Views: 476
Reputation: 60988
Take any point p=(px, py, pz) on the plane and plug it into the equation to obtain d.
So if your equation is nx·x + ny·y + nz·z + d = 0 then you get d = − (nx·px + ny·py + nz·pz).
Another common formulation is using d as the right hand side of the equation, in which case you get the reverse sign. I.e. for the equation nx·x + ny·y + nz·z = d you get d = nx·px + ny·py + nz·pz.
Upvotes: 3