I’ve been racking my brain all afternoon on trying to solve this…
I have a set of noisy co-ordinate data
data = {{x1,y1,z1}…..{xn,yn,zn}}
that forms an ellipsoid . I’d like to transform the co-ordinate data into a unit sphere. As an illustration, my original data is in blue, and I’d like to transform it to the red data.
What is the best way to find the transformation coefficients
affine = {{sxx,sxy,sxz}, {syx, syy,syz}, {szx,szy,szz}}
offset = Table[{ox,oy,oz}, {i,1,Length[data]}]
such that:
transform = affine.data + offset
subject to the constraint that
x^2+y^2+z^2 = 1
I assume this requires some kind of least square fit. I can’t figure out how I can get *fit * or NMinimize to make this work. Maybe I am using the wrong functions….
Ideas greatly appreciated….
Thanks, P
SingularValueDecomposition
. $\endgroup$