Sign in to follow this  

Lagrange Interpolation question

This topic is 2854 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi, In this: http://www.cut-the-knot.org/Curriculum/Calculus/LagrangeInterpolation.shtml When I drag one dot to the same place as another, the line disappears, it seems Lagrange doesn't like to have two same point (x,y) values as control points. Is there an alternative to Lagrange interpolation that does accept two (or more) same point (x,y) control points without having the "line disappear" (so to speak). Thanks.

Share this post


Link to post
Share on other sites
sorry, but assuming you can't skip a control point, such that a sample is:

(8, 5) (8, 5) (2, 3) (6, 4)


the first two control points are the same, Lagrange would fail with this control point. is there an alternative interpolation method that would say that it's ok for some points to have the same value?

thanks!

Share this post


Link to post
Share on other sites
Quote:
Original post by helloworld123
is there an alternative interpolation method that would say that it's ok for some points to have the same value?
Think about what you are asking for a moment: you want a curve that smoothly passes through each point, but you want two adjacent points to be in the same location.

Take a piece of paper, and try to draw such a curve - you will see that either you have to ignore the duplicate (alvaro's solution), or you have to draw a loop where the duplicate vertices lie. Unfortunately, there are infinitely many such loops that can be drawn while maintaining a smooth curve, and there isn't a clear criteria to pick just one.

Share this post


Link to post
Share on other sites

hi,

yes sorry, it seems removing similar control points would be better.

here's a different question:

given these set of unique control points:

(8, 5) (2, 3) (6, 4) (9, 10) (12, 5)



-> if i use it in lagrange, and plug 8, i'll get 5, and so on right.

-> now assuming i have _only_ these X values of control points (8, 2, 6, 9, 12), would i still get the corresponding Y using lagrange?

i mean, what do i have to have, aside from only these X values to get the Y values (assuming you don't want to keep the Y values)? it'll be like i only have:

- X values from control points
- something else that can be used in lagrange to get those Y values w/the X values from control points



i am sorry if question is not too clear, my english is not the native language. thanks!

Share this post


Link to post
Share on other sites

This topic is 2854 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this