Wolfram Function Repository
Instantuse addon functions for the Wolfram Language
Function Repository Resource:
Find the bestfit circle for a set of points
ResourceFunction["CircleFit"][pts] returns the bestfit circle for the points pts. 

ResourceFunction["CircleFit"][w→pts] returns the bestfit circle for the points pts having the weights w. 

ResourceFunction["CircleFit"][w→pts,"Association"] returns an association with the center, the radius, the Circle, a pure function etc. 
Find the circle through 4 points and visualize the result:
In[1]:= 
Out[1]= 
Find the bestfitting circle for a 2500 points:
In[2]:= 
Out[2]= 
For 2 points, the center of the circle is the midpoints of the points:
In[5]:= 
Out[5]= 
When no points are given, a Failure object is returned:
In[6]:= 
Out[6]= 
When 3 points are given and they are collinear, a Failure object is returned:
In[7]:= 
Out[7]= 
The case of multiple collinear points results in circle that is far away with a large radius:
In[8]:= 
Out[8]= 
Find the bestfitting circle for points clustered around a circular arc:
In[9]:= 
Out[9]= 
This work is licensed under a Creative Commons Attribution 4.0 International License