Approximating sphere with fixed radius to a set of points

37 Views Asked by At

I would like to find the center of a sphere of fixed radius that best approximates a set of points.

I want to minimize:

$$E(C) = \sum (|C - X_i|^2 - r^2)^2 $$

Where $X_i$ is the point $i$. Deriving with respect to $C$ and setting to zero we get:

$$0 = 4 \sum (|C - X_i|^2 - r^2)(C - X_i)$$

If we call $\Delta_i = C - X_i$, we have

$$0 = \sum (\Delta_i^t \Delta_i - r^2) \Delta_i$$

How can I find $C \in \mathbb{R}^3$ such that that the above equation equals zero?

In the geometric tools library the approximation of a sphere without a fixed radius is explained.