12-09-2009 01:08 PM
I need to fit a sphere to a set of n points, but with some wrinkles. I would like to constrain the center in one direction (x0 = known) and I would also like to use two sets of points simultaneously (two concentric spheres). I may also like to weight the points in the future (weighted least squares). I would love to simply modify the "Fitting on a Sphere" VI, which uses a linear solution to the least squares problem; but the help does not explain the solution details:
http://forums.ni.com/ni/board/message?board.id=170&thread.id=149402&view=by_date_ascending&page=1
I understand that I take the partial derivatives and set them equal to zero, but from there there is apparently a "clever change of variables" that makes the problem linear and easily solved as in the VI, but I can not find the solution steps or what the clever change of variables is (the references were a bit too complex for me). Can someone simply write the solution steps or help me understand how to modify the code to incorporate my wrinkles? Thank you.
Solved! Go to Solution.
12-10-2009 04:51 PM
12-11-2009 07:09 PM
Thanks, I did not know that I could continue an old thread. After posting however, I stumbled upon a solution at this website:
http://www.dtcenter.org/met/users/docs/write_ups/circle_fit.pdf
That gives me the solution steps and what I need to modify the code.