How to find center and radius of hand-drawn circle? You are given a set of points {(X1,Y1), (X2,Y2),...}  which represent a hand-drawn circle, so it's not perfect. You are asked to find the center and radius of this circle.
My intuition tells me this involves minimization, and I need to find the coefficients in a non-linear generalized least squares model. Am I not thinking of a simpler or more "proper" approach?
 A: You can use a trick to make this a regular least-squares optimization, in an extension of the method for finding the center of a circle through three points. Draw a perpendicular bisector for every pair of points. If the points are all on a circle, they will all intersect at a common point; since it is an approximate circle, they will slightly miss each other. The squared distance to each line is a quadratic form, so the sum of the squared distances is also a quadratic form, and minimizing this is a least-squares problem. That's the center of the circle.
Given this, you can just find the radius as the mean of the distances of each point to the center.
A: For each point you are given, we assume that it satisfies the following relation:
$$
( x_i - x_0 )^2 + ( y_i - y_0)^2 = r^2.
$$
This can be written as
$$
\left[
\begin{array}{ccc}
1 & -2x_i & -2y_i
\end{array}
\right]
\left[
\begin{array}{c}
x_0^2 + y_0^2 -r^2 \\
x_0 \\
y_0
\end{array}
\right]
= -x_i^2 - y_i^2.
$$
Thus, using all of the $(x_i,y_i)$ pairs, we can set up an over-determined system $\mathbf{Ax}=\mathbf{b}$. The least squares solution $\bar{\mathbf{x}}$ to this system will give you your answer.
