I'm writing a computer graphics library, and I'd like to compute the plane that passes through three arbitrary points, $p$, $q$ and $r$. I'm defining the plane in the form of $Ax + By + Cz + D = 0$.
My algebra is rather rusty, but I suspect this is a job for some simultaneous equations I'll need to solve a system of equations:
$0 = \begin{cases} Ax_p + By_p + Cz_p + D \\ Ax_q + By_q + Cz_q+ D \\ Ax_r + By_r + Cz_r + D \end{cases}$
How would I efficiently find the values of $A$, $B$, $C$ and $D$ with respect to $p$, $q$ and $r$?