LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Fitting on a Sphere

Can someone please explain the algorithm used by the "Fitting on a Sphere" VI located in Optimization?
 
Jordan
0 Kudos
Message 1 of 18
(5,951 Views)
Have you tried the online help? 🙂
 

Message Edited by altenbach on 10-30-2005 10:13 AM

0 Kudos
Message 2 of 18
(5,950 Views)

Altenbach:

Thanks for your response to my question.

Yes, I have looked at help.  However, It is not clear to me how the "min-functional" leads to "a simple linear equation in x0, y0, z0", given that it is non-linear in those parameters...

Respectfully,

Jordan

 

 

 

 

0 Kudos
Message 3 of 18
(5,940 Views)
C:\Program Files\National Instruments\LabVIEW 7.0\examples\math\optimiz.llb\Fitting on a Sphere Example.vi

This works well! You can modify it easily for a circle fit!
Yours SIncerely
John
John Brohan         National Instruments LabVIEW expert in Montreal
Traders Micro         "We connect all sorts of things to computers"
Open LV Lib  index is at   http://bloghan.gotdns.org/OpenLVLibs/

0 Kudos
Message 4 of 18
(5,935 Views)
As Altenbach told you in your previous post, the problem can be reduced to a simple linear problem.

The equation given in the Help file merely states that you search for the minimal distance between the points and a sphere of radius r centered in x0, y0 and z0 (the unknowns). The minimum distance is obtained by equating the derivative of this equation to zero. Derivation has to be done separately for each unknown variable, therefore giving 4 separate equations that must be solved simultaneously. Of course, after the derivation, the square exponents reduce to unity, so your equations are linear ! Four equations, four unknown, a linear system... that should not be too difficult to solve 😉
Chilly Charly    (aka CC)

         E-List Master - Kudos glutton - Press the yellow button on the left...
        
0 Kudos
Message 5 of 18
(5,900 Views)
In addition, you can open the front panel of the VI and look at its "guts" inside. It's all plain LabVIEW. 😮
 
Save it under a new name, place a few extra indicators and probes, and just play with it to see what's going on. 🙂
0 Kudos
Message 6 of 18
(5,885 Views)
Hi to all,
this is for mathematicians/engineers..
Minimizing mean square error is an "uncommon" idea? Am I missing something?

manga

Message 7 of 18
(5,876 Views)
Yes, minimizing mean square error is a very common idea but it would not work here. 😉
 
For a sphere in space, most xy-pair have no Z, few have one Z, and many have two Z values. How would you even try to calculate MSE???
 
You cannot use typical fitting procedures here using cartesian coordinates!
0 Kudos
Message 8 of 18
(5,869 Views)
Hi altenbach,
my algebra skills aren't so good as yours (and i'm not an engineer) but the equation you took from LV Help seems to me a MSE minimization, actually.
That's why I wondered this approach to be defined as 'uncommon'...

respectfully,
manga
0 Kudos
Message 9 of 18
(5,853 Views)

Chilly Charly, et al.:

Upon inspection, how can one claim these last four equations are linear in the parameters x0, y0, z0, r?

 

Jordan

 

 

0 Kudos
Message 10 of 18
(5,839 Views)