Ask Your Question
1

How to interpolate a curve from a set of points

asked 2 years ago

JB gravatar image

updated 2 years ago

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?

Preview: (hide)

Comments

Welcome to Ask Sage! Thank you for your question.

slelievre gravatar imageslelievre ( 2 years ago )

1 Answer

Sort by » oldest newest most voted
0

answered 2 years ago

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.

Preview: (hide)
link

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: 2 years ago

Seen: 462 times

Last updated: Jul 01 '22