Hi,


How can I generate the equation of a curve that matches all arbitrarily given (x,y) pairs? I would like a polynomial of nth degree, where n does not matter, as long as the curve passes thru all the given points.


I guess this problem is NP-complete. If so, how do I find the closest matching curve in a feasible amount of time?


Furthermore; how do I generate a piecewise polynomial, in case the given (x,y) pairs are discontinuous, or they draw the shape of a, say, circle?


Thanks in advance.



HOW TO Generate Equation of a Curve Given (x,y) pairs - algorithm?
Actually, there is an easy and standard procedure (Lagrange Interpolation) that does this. See:


<http://en.wikipedia.org/wiki/Lagrange_polynomial>


