[Math] Center of circle given 4 points

circleseuclidean-geometrygeometry

I've been struggling trying to understand how to find the center of a circle given 4 points in the circumference $(x_1,y_1),(x_2,y_2),(x_3,y_3),(x_4,y_4)$

Please help me. I don't understand when the polygon created is not a rectangle p.ex..

Best Answer

The question states that all the points are on the circumference. Three non-collinear points already determine a unique circle passing through them, so any three of the four given points may be chosen and the fourth will automatically lie on the circle.

The problem of finding the centre of the circle through three points is well-known. Wikipedia itself gives the following solution $(R_x,R_y)$ for the three points $(A_x,A_y), (B_x,B_y), (C_x,C_y)$:

$$R_x = \left[(A_x^2 + A_y^2)(B_y - C_y) + (B_x^2 + B_y^2)(C_y - A_y) + (C_x^2 + C_y^2)(A_y - B_y)\right] / D$$ $$R_y = \left[(A_x^2 + A_y^2)(C_x - B_x) + (B_x^2 + B_y^2)(A_x - C_x) + (C_x^2 + C_y^2)(B_x - A_x)\right]/ D$$ $$D = 2\left[A_x(B_y - C_y) + B_x(C_y - A_y) + C_x(A_y - B_y)\right]$$

However, there is no circle passing through four or more points in general position. For example, if four points are given as $(0,0),(2,0),(0,2)$ and $(-1,-1)$, the first three points determine a circle with centre $(1,1)$ and radius $\sqrt2$, but the fourth point does not lie on this circle. If this arises, the best you can do is minimise the sum-distance of each point to the circle itself, which becomes a least-squares fitting problem. Many resources for this are available too, like this one from Stony Brook.

Related Question