Given a set of "knot" points ( x i , y i ) i = 1 … n {\displaystyle (x_{i},y_{i})_{i=1\dots n}} , where the x i {\displaystyle x_{i}} are strictly increasing, the Akima spline will go through each of the given points. At those points, its slope, s i {\displaystyle s_{i}} , is a function of the locations of the points ( x i − 2 , y i − 2 ) {\displaystyle (x_{i-2},y_{i-2})} through ( x i + 2 , y i + 2 ) {\displaystyle (x_{i+2},y_{i+2})} . Specifically, if we define m i {\displaystyle m_{i}} as the slope of the line segment from ( x i , y i ) {\displaystyle (x_{i},y_{i})} to ( x i + 1 , y i + 1 ) {\displaystyle (x_{i+1},y_{i+1})} , namely
then the spline slopes s i {\displaystyle s_{i}} are defined as the following weighted average of m i − 1 {\displaystyle m_{i-1}} and m i {\displaystyle m_{i}} ,
If the denominator equals zero, the slope is given as
The first two and the last two points need a special prescription, for example,
The spline is then defined as the piecewise cubic function whose value between x i {\displaystyle x_{i}} and x i + 1 {\displaystyle x_{i+1}} is the unique cubic polynomial P i ( x ) {\displaystyle P_{i}(x)} ,
where the coefficients of the polynomial are chosen such that the four conditions of continuity of the spline together with its first derivative are satisfied,
which gives
Due to these conditions the Akima spline is a C1 differentiable function, that is, the function itself is continuous and the first derivative is also continuous. However, in general, the second derivative is not necessarily continuous.
An advantage of the Akima spline is due to the fact that it uses only values from neighboring knot points in the construction of the coefficients of the interpolation polynomial between any two knot points. This means that there is no large system of equations to solve and the Akima spline avoids unphysical wiggles in regions where the second derivative in the underlying curve is rapidly changing. A possible disadvantage of the Akima spline is that it has a discontinuous second derivative.6
"Spline interpolation and fitting – ALGLIB, C++ and C# library". www.alglib.net. http://www.alglib.net/interpolation/spline3.php#header5 ↩
Akima, Hiroshi (1970). "A new method of interpolation and smooth curve fitting based on local procedures" (PDF). Journal of the ACM. 17: 589–602. Archived (PDF) from the original on 2020-12-18. Retrieved 2020-12-18. /w/index.php?title=Hiroshi_Akima&action=edit&redlink=1 ↩
Salomon, David (2011), "Raster Graphics", Texts in Computer Science, London: Springer London, pp. 29–134, ISBN 978-0-85729-885-0, retrieved 2023-10-23 978-0-85729-885-0 ↩
Siddiqi, Al-Lawati, Boulbrachene, Abul Hasan, Mohamed, Messaoud (2017). Modern Engineering Mathematics. CRC. ISBN 9781498712095.{{cite book}}: CS1 maint: multiple names: authors list (link) 9781498712095 ↩
"The Akima Interpolation". http://www.iue.tuwien.ac.at/phd/rottinger/node60.html ↩