As said in my previous post, to obtain an orthogonal least squares fitting of a sphere to a cloud of points one should minimize the function
and considering that
one can write the components of the gradient as
Each in the denominators approaches zero when the centre gets close to , what should not happen if a sufficiently good initial approximation is chosen.
In the minimum point one expects a null gradient. Eberly suggests to solve the equations , , and with a fixed point iteration, and says:
Warning. I have not analyzed the convergence properties of this algorithm. In a few experiments it seems to converge just fine
In my experience, fixed point iteration resulted very slow. I had better results with Levenberg-Marquardt.