I wonder if someone can assist my understanding as I'm a bit stumped with this...
I have taken the following (x,y) data which lies roughly on an ellipse:
$$ \begin{pmatrix} 0.000234491 & 6855810 \\ 0.341848914 & 6856102 \\ 0.640414035 & 6874479 \\ 0.863239913 & 6908917 \\ 0.985101853 & 6955917 \\ 0.984332848 & 7006108 \\ 0.867029832 & 7056389 \\ 0.639589281 & 7100398 \\ 0.333714725 & 7134165 \\ 0.002441713 & 7147290 \\ -0.342779385 & 7146184 \\ -0.655455534 & 7137322 \\ -0.641777617 & 7136216 \\ -0.860267224 & 7116067 \\ -0.983690351 & 7072538 \\ -0.983008472 & 7021338 \\ -0.869967818 & 6973290 \\ -0.630288354 & 6923542 \\ -0.348927005 & 6889049 \\ \end{pmatrix} $$
If you were to plot this in Mathcad you will get the following:
Now, it is my intention to perform a best fit on these points to give me an equation of an ellipse. What I have done is to implement the algorithm based upon this paper - http://autotrace.sourceforge.net/WSCG98.pdf
The fit is against the following equation:
$ ax^2 + bxy + cy^2 +dx + ey + f = 0 $
Now, the fitting algorithm gives me the following co-effiecients:
$$ \begin{align} & a=0.99999999999513789 \\ & b=0.0000031183817557930131 \\ & c=0.000000000045507950324787355 \\ & d=-21.87186231583247 \\ & e=-0.00063773270848852459 \\ & f=2233.2983593954009 \\ \end{align} $$
With a center of $ (0.0116,7006431) $ which looks ok to me.
Now, here is the bit I'm stumped...
I just expected to be able to plot an ellipse centered on $ (0.0116,7006431) $ that best fits the data points above. I assumed I could feed my original (x,y) data into :
$ F(x,y) = ax^2 + bxy + cy^2 +dx + ey + f $
And this would give me data points lying on an ellipse which I could superimpose onto the original data.
What I get is as follows:
I guess my question is - what am I misunderstanding here? How do I use the output from the fit (a, b, ... f) to plot an ellipse which is centered on $ (0.0116,7006431) $ and can be superimposed onto the original data?
Many thanks in advanced for any pointers/assistance.