1

I would like to fit an ellipse to a set of data points in Mathcad and afterwards plot it. Searching the net, I stumbled on to Mike Shaw's post, which answers 75% of my question: See Plotting an Ellipse after an Ellipse Fit

Could someone enlighten me how to determine the co-effiecients and centre of the ellipse, in Mathcad, using the fitting algorithm; this for formula: $ax^2 +bxy+cy^2 +dx+ey+f=0$

Thanks in advance,

Simon

Simon
  • 11
  • If you want an ellipse (as opposed to some other type of conic section curve), then you have to constrain the coefficients to ensure this. – bubba Nov 20 '15 at 13:21

1 Answers1

0

You can find the mathematics in this document, along with several other fitting techniques. The same web site has code to do the fitting. I have never used the fitting code, but I have used other code from this site, and found it be of very high quality.

Mike Shaw's post says he used the algorithm decribed in this paper, which also looks very good, to me.

bubba
  • 44,617
  • Thanks for the answer... I was under the assumption that Mike used some sort of fitting functionality within MathCAD like "genfit" with just $ax^2+bxy+cy^2+dx+ey+f=0$ and the data points as input. Enlightened by your answer I successfully implemented the algorithm of the paper. – Simon Nov 25 '15 at 07:51
  • Simon - Hi there. I implemented the algorithm from the paper in the Link using the Programming Tools within Mathcad. If I'm honest I didn't even think about Genfit, etc as I was wanting to write some C libraries to do it :-) – Mike Feb 16 '16 at 14:32