[SciPy-user] Fitting sphere to 3d data points

ckkart at hoc.net ckkart at hoc.net
Thu Jan 25 08:57:57 CST 2007

James Vincent wrote:
> David,
>     Thanks for the reply. I think I should have been clearer about the 
> problem. I have a surface patch of data points, not an actual whole 
> sphere. It will probably be a very small section of total sphere 
> surface. I would like to fit the sphere that best fits just those points 
> that I have. The center of the sphere will be highly dependent on the 
> curvature of the points.
>     I think the  leastsq routine is right, I just can't figure out how 
> to pass the data in yet (it's my first work with scipy).

Have a look at scipy.sandbox.odr, too. It is a module to do orthogonal 
distance regression in contrast to ordinary least squares of the z-values.


More information about the SciPy-user mailing list