Perpendicular distance from point P(x₁, y₁, z₁) to plane ax+by+cz+d=0. The formula is the 3D analogue of the 2D point-to-line distance.
Let the plane be ax+by+cz+d=0 and the point be P(x1,y1,z1).
Method: The normal to the plane has direction (a,b,c). The line through P perpendicular to the plane:
ax−x1=by−y1=cz−z1=t
Parametric point: (x1+at,y1+bt,z1+ct). Substituting into the plane equation:
a(x1+at)+b(y1+bt)+c(z1+ct)+d=0
(ax1+by1+cz1+d)+t(a2+b2+c2)=0
t=−a2+b2+c2ax1+by1+cz1+d
Distance =∣t∣⋅a2+b2+c2:
d=a2+b2+c2∣ax1+by1+cz1+d∣
Distance between parallel planes ax+by+cz+d1=0 and ax+by+cz+d2=0:
d=a2+b2+c2∣d1−d2∣
(Distance from origin to each plane, then take the difference — or use the above formula with a point from one plane.)