From: Euclidian Space: Planes, I see the formula:

Convert Three points to normal notation

N = (p1-p0) × (p2 - p0)

d = -N • p0^2


N = normal to plane (not necessarily unit length) d = perpendicular distance of plane from origin. p0,p1 and p2 = vertex points x = cross product

When calculating the distance to the origin from the plane (d)... A) how is the p0 squared? B) how do I resolve the dot product of the vector (-N dot p0^2) to scalar distance?

  • 1
    \$\begingroup\$ This may be a better question for the math exchange, but I think the page you've referenced is being a bit sloppy or misleading with its description. The formula given for d does not correspond to Euclidean distance from the origin. (To demonstrate, replace p1 with a new point p3 which is twice as far from p0 while remaining on the same plane. We've now doubled the length of N and quadrupled the value of d, even though we didn't move the plane at all!). Instead I'd expect an expression like d = dot(N, p0)/length(N) \$\endgroup\$
    – DMGregory
    Commented Jan 3, 2017 at 20:29

1 Answer 1


Thanks to @DMGregory, I think I have it.

n = (p1 - p0).cross(p2 - p0);
n = normalize(n);
d = n.dot(p0);

Where p0, p1 and p2 are points. n is the (unit) normal vector and d is the distance to the origin from the plane.


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .