0

I am looking for something in python to fit a few 3d points to a paraboloid. I think it can be done with scipy's curve_fit() but i am not able to get that right. Framing the problem more precisely: I have a set of x, y and z coordinates and wish to fit a paraboloid in those points as well as plot the entire picture (with points and fitted paraboloid)

I know there are a few questions related to this, but they are not that general and i did not find myself convinced with those answers

gmalik9
  • 1
  • 1
  • I would use scipy's curve fit on the individual coordinates. – Jens Munk Aug 09 '15 at 20:34
  • Yes, i tried a few examples of that, but not sure as to how to do it. Do you have a code or something that i can execute and see? – gmalik9 Aug 09 '15 at 23:09
  • Could you provide some data and the equation of the model? – Cleb Aug 10 '15 at 07:38
  • I read you question wrong. What I would do is to find the paramter `b` which minimizes `sum(|z_i - b (x_i^2 + y_i^2)|^2)` using e.g. `fmin_ncg`, `fminbound` or `brent` from scipy optimize. Depending on the problem, I may be more accurate to express the orthogonal distance to the surface and mimize this – Jens Munk Aug 11 '15 at 11:23
  • Jens, Sorry i am unable to understand most part of it. Can you please give an example. Restating the problem, i have a few x, y and z coordinates and i wish to fit a paraboloid to these points, the python script which shows the points it is covering and the surface of the paraboloid showing the various properties like the radius, angles, etc. Sorry for bothering. Thank you for your help. – gmalik9 Aug 11 '15 at 22:23
  • similar question with answer: http://stackoverflow.com/questions/26152222/paraboloid-3d-parabola-surface-fitting-pythong? – Christian K. Aug 21 '15 at 14:37

0 Answers0