Although the method is simple to describe, the algebra becomes messy when
written in full generality. For example, suppose we use the second method, with
three points (x1,y1), (x2,y2), (x3,y3) none of which are at the
origin.
C=(Ax2+By2)2y1−(Ax1+By1)2y2x1y2−x2y1,D=(Ax1+By1)2x2−(Ax2+By2)2x1x1y2−x2y1
C = \frac{(Ax_2+By_2)^2y_1-(Ax_1+By_1)^2y_2}{x_1y_2-x_2y_1},\quad
D = \frac{(Ax_1+By_1)^2x_2-(Ax_2+By_2)^2x_1}{x_1y_2-x_2y_1}
C=x1y2−x2y1(Ax2+By2)2y1−(Ax1+By1)2y2,D=x1y2−x2y1(Ax1+By1)2x2−(Ax2+By2)2x1
It will simplify matters to introduce the notation
The discussion at
mathpages does much the
same thing, but treats the vvv values as the elements of the cross product of
the vectors [x1,x2,x3][x_1,x_2,x_3][x1,x2,x3] and [y1,y2,y3][y_1,y_2,y_3][y1,y2,y3].
Now, substituting into the last equation produces an equation of the form
aA2+2bAB+cB2=0
aA^2+2bAB+cB^2=0
aA2+2bAB+cB2=0
where
\begin{align*}
a & = -v_{23}x_1^2+v_{13}x_2^2-v_{12}x_3^2\\
b & = -v_{23}x_1y_1+v_{13}x_2y_2-v_{12}x_3y_3\\
c & = -v_{23}y_1^2+v_{13}y_2^2-v_{12}y_3^2
\end{align*}
The solutions are then
\begin{align*}
A&=r, & B &= \frac{-br+\sqrt{b^2-acr}}{c}\\
A&=s, & B &= \frac{-bs-\sqrt{b^2-acs}}{c}
\end{align*}
The values aaa, bbb and ccc can all be expressed as the negative determinants:
a=−∣x12x22x32x1x2x3y1y2y3∣,b=−∣x1y1x2y2x3y3x1x2x3y1y2y3∣,c=−∣y12y22y32x1x2x3y1y2y3∣.
a =
-\begin{vmatrix}x_1^2&x_2^2&x_3^2\\ x_1&x_2&x_3\\ y_1&y_2&y_3\end{vmatrix},\qquad
b =
-\begin{vmatrix}x_1y_1&x_2y_2&x_3y_3\\ x_1&x_2&x_3\\ y_1&y_2&y_3\end{vmatrix},\qquad
c =
-\begin{vmatrix}y_1^2&y_2^2&y_3^2\\ x_1&x_2&x_3\\ y_1&y_2&y_3\end{vmatrix}.
a=−x12x1y1x22x2y2x32x3y3,b=−x1y1x1y1x2y2x2y2x3y3x3y3,c=−y12x1y1y22x2y2y32x3y3.
The next step would be to substitute these values into the expressions above for
CCC and DDD, but as you see we're already getting to the reasonable limit of
complexity for algebraic expressions. Substituting the first pair of values for
AAA and BBB into the equation for CCC produces an utterly hideous expression!