LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Modified sphere fit

Solved!
Go to solution

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:

I have looked at a similar previous thread:

 

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.

0 Kudos
Message 1 of 3
(3,546 Views)
StewBrew-

I would suggest continuing that forum as this is a very similar topic.  My calculus is a little rusty, but I believe the derivatives can end up being treated as constants since they will be the same between each equation in the linear system.  As for setting the direction, if you know the values they should be, you can simply add these values as constants. 

If you are looking for someone to create your application for you, National Instruments recommends using one of our Alliance Partners.  For additional information on this program, please look at www.ni.com/allicance.  These are very capable folks in the LabVIEW environment who can assist people with their applications. 
Regards,

Mike S
NI AE
0 Kudos
Message 2 of 3
(3,516 Views)
Solution
Accepted by topic author StewBrew

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.

 

0 Kudos
Message 3 of 3
(3,490 Views)