Hello,

I would like to ask you some questions.

1) I've a closed curve (for example an ellipse, which may represent the contour of an object) represented by the set of its (known) points. I need to find the equation of that curve to pass through all and every point (exact fit). I think that to do this I need a polynomial whose grade is equal to the number of points less 1.

Something like this:

a0+a1 x1+a2 x1^2+ ...+ an x1^n = y1
a0+a2 x2+a2 x2^2+ ...+ an x2^n = y2
...
a0+a2 xn+a2 xn^2+ ...+ an xn^n = yn

This argument is right? Do you have suggestions (or anything else relevant) for me in this regard for which is the best way to solve my problem? This equation can be made in parametric form?

2) After I got the exact equation of this curve. Suppose we have a set of curves very similar to each other (represented by their equation), I would like to find the equation that represents the shape which best approaches to all previous curves, a sort of average curve created from those previously acquired.
Do you know if this thing can be done and how? What is the best way (most efficient and / or mathematically more correct) to do this?

Best Regards,

Giusy