Ask Your Question
1

How to interpolate a curve from a set of points

asked 2022-07-01 15:30:15 +0100

JB gravatar image

updated 2022-07-02 08:32:19 +0100

FrédéricC gravatar image

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 flag offensive close merge delete

Comments

Welcome to Ask Sage! Thank you for your question.

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

1 Answer

Sort by » oldest newest most voted
0

answered 2022-07-01 23:21:08 +0100

rrogers gravatar image

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).
Or read:http://evoq-eval.siam.org/Portals/0/Publications/SIURO/Vol1_Issue1/A_Simple_Expression_for_Multivariate.pdf?ver=2018-03-30-130233-050
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.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2022-07-01 15:30:15 +0100

Seen: 363 times

Last updated: Jul 01 '22