0
$\begingroup$

I have been working on fitting a plane to 3d points and then calculating the perpendicular distance between each point and the plane using Matlab. So far I can find the plane equation in $Ax+By+Cz+D = 0$ form and calculate the distance using $\frac{Ax_0+By_0+Cz_0+D}{\sqrt{A^2+B^2+C^2}}$. However, in some Matlab codes plane is defined as $Ax+By+C = z$ which seems quite different from the above plane equation. Even though I did some research about difference of these equations, I could not find any satisfactory answer. Could you please explain me the difference between these two plane definitions and could you please inform me about the distance between any point and plane $Ax+By+C = z$ ? I am looking forward to hearing from you. Thanks in advance

$\endgroup$
  • 2
    $\begingroup$ $Ax+By +C=z \iff Ax+By -z+C=0$. So putting a prime on each of the constants in your other plane equation, these constants correspond as follows: $A \to A'$, $B \to B'$, $-1 \to C'$, and $C \to D'$. Or going in the other direction, start with $A'x + B'y + C'z + D' = 0$ and divide by $-C'$. Then just set $-A'/C' = A$, $-B'/C' = B$ and $-D'/C' = C$. $\endgroup$ – user137731 Sep 8 '15 at 21:22
  • $\begingroup$ Why wasn't the above comment posted as an answer? It clearly answers the question. $\endgroup$ – Gabriel Jan 31 '16 at 20:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.