Cubic spline interpolation
eli.thegreenplace.net
Cubic spline interpolation
1–10 of 29 posts
Re: Cubic spline interpolation
#2https://splines.readthedocs.io/en/latest/euclidean/natural-u...
Re: Cubic spline interpolation
#3(It's weirdly difficult to find an example to link)
Here's chaikins
Re: Cubic spline interpolation
#4Re: Cubic spline interpolation
#5Re: Cubic spline interpolation
#6Re: Cubic spline interpolation
#7Here's an example, with fairly round numbers, because we need to use text instead of paper.
Let's say you have a function f, and its values at 1,2 and 3. f(1) = 1, f(2) = 3, f(3) = 2. We plot these 3 points, we call them A,B,C. What is the spline interpolation value at 1.5 ?
You start with the linear interpolation between A (the point (1,1)) and B (the point (2,3)). You get the value 2. Let's call the point (1.5, 2) as M.
Then you do the linear extrapolation of the segment BC. The new point is N with coordinates (1.5, 3.5).
Now move M horizontally until it hits the vertical line y=1, call that point M' (it has coordinates (1,2)). Move N to the vertical line y=3, it has coordinates (3,3.5). Draw the line M'N'. Where it intersects the vertical line y=1.5, that's where the spline interpolation is. It is the point (1.5, 2.375).
Of course, this is not only useful for paper and pencil stuff. That's how splines are actually implemented in lots of packages. You can easily implement it in Excel, if you need to, all with only cell formulas.
Re: Cubic spline interpolation
#8You don't need to use O(n^3) Gaussian elimination to find natural cubic splines: you can write the system of equations as a tridiagonal matrix, which can be solved in linear time. https://splines.readthedocs.io/en/latest/euclidean/natural-u...
Re: Cubic spline interpolation
#9Would split-tweak (chaikins, jareks...) be applicable here? It's easy. (It's weirdly difficult to find an example to link) Here's chaikins https://sighack.com/post/chaikin-curves