Fitting surface to set of scatter points

Hi,
How do I fit a surface (that I know the mathematical model of) to a set of data points? Specifically, I have a 10,000 x 3 wave of x,y,z coordinates and I want to fit an elliptical cone of form x^2/a^2+y^2/b^2 = z^2/c^2? After that, I'd like to take the equation of the cross-sectional ellipse out based on a given height (z value). I'm currently trying to use Gizmo but I'm having trouble with it.
Thanks!
If you're lucky and you can ignore the fact that it's a multi-valued function, then you could write the equation as

f(x,y) = x^2/a^2 + y^2/b^2

and then fit data where the Z values are transformed as z' = z^2. But something tells me we're not lucky...

That would mean that you are trying to fit an implicit equation. If you re-write it as

0 = x^2/a^2 + y^2/b^2 - z^2/c^2

then you can write a fit function with the RHS and use implicit fitting. To read more about implicit fitting, copy this command:

DisplayHelpTopic "Fitting Implicit Functions"
paste it into Igor's command line and press Enter. I think your fitting problem may not be easy- in particular, you won't actually be able to fit for a, b, and c. To see why, multiply my equation by c^2:

0 = x^2*c^2/a^2 + y^2*c^2/b^2 - z^2

Now it's easy to see that you have only two independent coefficients.


John Weeks
WaveMetrics, Inc.
support@wavemetrics.com