Cubic interpolation with non-equidistant points

I am trying to create point list interpolation.

I have a coordinate point (ti, xi), where ti is the timestamp and xi are the associated values. I want to create a function that passes through these points and allows me to find the value of x corresponding to the total m lying in the interval.

I want to interpolate them with third order interpolation. I saw something like catmull-rom interpolation, but only works if the xi points are equidistant.

For example, here http://www.mvps.org/directx/articles/catmull/ you can find that the timestamps are equidistant, as here http://www.cs.cmu.edu/~462/projects/assn2 /assn2/catmullRom.pdf .

Is there a way to apply cubic interpolation with non-regular points?

+3
source share
2 answers

Uneven argument spacing is not a problem if they are all different. As you probably know, if you have four different times t[i], then there is a unique polynomial interpolation of the corresponding values x[i], having a degree of no more than 3 (cubic or lower order).

There are two main approaches to calculating interpolation: Newton divided differences and the Lagrange interpolation method .

Bearing in mind that simply finding a polynomial is not a point, but rather evaluating it at another time in the interval, there are some programming trade-offs that should be considered.

t[i] , x[i] , . , 1 . , x[i] - , . .

, t[i] , , t[i], x[i], . , , t[i] , , .

, . ++, Python Java.

+1

, . , .

0

All Articles