# How to interpolate a curve from a set of points

I have a set of points on the plane, and I want to interpolate these points to make a smooth curve.

I tried with spline() or even creating the lagrange polynomial, but the problem is that with these options I can only interpolate functions (so for example, if I have a discrete set of points of a circle, I cannot get the circle with spline() since it will interpolate the points following te x-axis order).

Is there any option to interpolate a curve following the order of points given in the list?

edit retag close merge delete

( 2022-07-01 16:11:41 +0100 )edit

Sort by » oldest newest most voted

You have to re-parametrize your data; i.e. x=rcos(theta),y=rsin(theta); but that's for circle :) In general, you do need to re-parametrize; x=f(s),y=g(s).
That might give you continuity. Incidentally, "interpolation" and "approximation" is a field in itself.
If this is a class assignment (which it shouldn't be); then the book/teacher gave you "hints"/facts that will indicate what approach you should take. Lean back and replay the class and readings; it's almost certainly there.

more