I need a simplest and 100% correct formula (or method) to find equation of a circle with 3 points given.
Given that $\displaystyle (x_1, y_1)$,$\displaystyle (x_2,y_2)$, and $\displaystyle (x_2,y_3)$ are points on the plane, then $\displaystyle ((x_1+x_2)/2, (y_1+y_2)/2)$ and $\displaystyle ((x_1+x_3)/2, (y_1+y_3)/2)$ are midpoints of chords in the circle. The two chords have slopes $\displaystyle (y_1- y_2)/(x_1- x_2)$ and $\displaystyle (y_1- y_3)/(x_1-x_3)$ respectively so that $\displaystyle -(x_1-x_2)/(y-1-y_2)$ and $\displaystyle -(x_1-x_3)/(y_1-y_3)$ are the slopes of the perpendicular lines.
That means that $\displaystyle y= -(x_1-x_2)/(y_1-y_2)(x- x_1)+ y_1$ and $\displaystyle y= -(x_1- x_3)/(y_1-y_2)(x-x_1)+ y_1$ are equations of the radii through the midpoints and so intersect the center, $\displaystyle (x_0,y_0)$. Solve those two equations simultaneously to find $\displaystyle x= x_0$ and $\displaystyle y= y_0$. Of course, once you have that, the radius of the circle is given by $\displaystyle \sqrt{(x_1-x_0)^2+ (y_1- y_0)^2}$ and then the equation of the circle is $\displaystyle (x- x_0)^2+ (y_1- y_0)^2= r^2$.