# Find a circle equation on a plane, given 3 points

Given 3 points $$p_1 = (x_1,y_1,z_1), p_2 = (x_2,y_2,z_2) ,p_3 = (x_3,y_3,z_3)$$ that lie on the circumference of a circle, is there a way to find the general equation of this circle?

If yes, could someone share this equation here.

• I think you mean sphere – user600016 Jan 5 at 11:21
• Yes. But you will need two equations. The first one is the equation of the plane defined by those three points. The second is the equation of the sphere that goes through those points and the plane previously found is going through the center of the sphere – Andrei Jan 5 at 11:22
• I agree I need the plane equation, which I can calculate from those 3 points. But in the end, I need a circle, you can call it a sphere but it must be flat as a circle. – Guy Jan 5 at 12:23
• An equation in $3$-space generally defines a surface, not a curve. To describe the circle you will need two equations. – GEdgar Jan 5 at 12:31
• This question may help, esp the 3rd answer by Salix Alba. – almagest Jan 5 at 12:58

$$\vec{P_1}=\left[\begin{matrix}x_1\\y_1\\z_1\end{matrix}\right]\qquad \vec{P_2}=\left[\begin{matrix}x_2\\y_2\\z_2\end{matrix}\right]\qquad \vec{P_3}=\left[\begin{matrix}x_3\\y_3\\z_3\end{matrix}\right]\qquad$$ The radius of the circle is : $$R=\frac12\frac{\parallel\vec{P_1}-\vec{P_2}\parallel\:\parallel\vec{P_2}-\vec{P_3}\parallel\:\parallel\vec{P_3}-\vec{P_1}\parallel}{\parallel(\vec{P_1}-\vec{P_2})\times(\vec{P_2}-\vec{P_3})\parallel}$$ $$\times\:$$ is the cross product of vectors.
The center of the circle is given by : $$\vec{P_c}=\alpha\:\vec{P_1}+\beta\:\vec{P_2}+\gamma\:\vec{P_3}$$ $$\alpha=\frac12\frac{\parallel\vec{P_2}-\vec{P_3}\parallel^2(\vec{P_1}-\vec{P_2})\bullet(\vec{P_1}-\vec{P_3})}{\parallel(\vec{P_1}-\vec{P_2})\bullet(\vec{P_2}-\vec{P_3})\parallel^2}$$
$$\beta=\frac12\frac{\parallel\vec{P_1}-\vec{P_3}\parallel^2(\vec{P_2}-\vec{P_1})\bullet(\vec{P_2}-\vec{P_3})}{\parallel(\vec{P_1}-\vec{P_2})\bullet(\vec{P_2}-\vec{P_3})\parallel^2}$$
$$\gamma=\frac12\frac{\parallel\vec{P_1}-\vec{P_2}\parallel^2(\vec{P_3}-\vec{P_1})\bullet(\vec{P_3}-\vec{P_2})}{\parallel(\vec{P_1}-\vec{P_2})\bullet(\vec{P_2}-\vec{P_3})\parallel^2}$$ $$\bullet\:$$ is the dot product of vectors.