I'm trying to compute the distance between a point and a plane of the form $$ ax+bx+cz = d $$ not using the standard formula for analytical geometry.
- I am trying to compute it by coming up with the projection matrix onto the normal of the plane passing through the origin and then projecting a a vector that is shifted the amount required to make the plane pass through the origin and then taking the length of that vector.
- I upload pictures of my work for the first one I used this method and it worked it gave me the correct distance, but for any other equation it doesn't seem to work and I cant figure out why or what to change to make it work.
Example of the method working, Example of method not working
A line perpendicular to the plane, through the point $(u,v,w)$ has the parametric equation
$$x=u+ta,\\y=v+tb,\\z=w+tc.$$
It intersects the plane when
$$a(u+ta)+b(v+tb)+c(w+tc)=d$$ or
$$t=\frac{d-au-bv-cw}{a^2+b^2+c^2}$$
and the distance between the two points is given by
$$\sqrt{(ta)^2+(tb)^2+(tc)^2}=|t|\sqrt{a^2+b^2+c^2}=\frac{|d-au-bv-cw|}{\sqrt{a^2+b^2+c^2}}.$$