BREAKING NEWS
Akima spline

## Summary

In applied mathematics, an Akima spline is a type of non-smoothing spline that gives good fits to curves where the second derivative is rapidly varying.[1] The Akima spline was published by Hiroshi Akima in 1970 from Akima's pursuit of a cubic spline curve that would appear more natural and smooth, akin to an intuitively hand-drawn curve.[2][3] The Akima spline has become the algorithm of choice for several computer graphics applications.[3] Its advantage over the cubic spline curve is its stability with respect to outliers.[4]

## Method

Given a set of "knot" points ${\displaystyle (x_{i},y_{i})_{i=1\dots n}}$ , where the ${\displaystyle x_{i}}$  are strictly increasing, the Akima spline will go through each of the given points. At those points, its slope, ${\displaystyle s_{i}}$ , is a function of the locations of the points ${\displaystyle (x_{i-2},y_{i-2})}$  through ${\displaystyle (x_{i+2},y_{i+2})}$ . Specifically, if we define ${\displaystyle m_{i}}$  as the slope of the line segment from ${\displaystyle (x_{i},y_{i})}$  to ${\displaystyle (x_{i+1},y_{i+1})}$ , namely

${\displaystyle m_{i}={\frac {y_{i+1}-y_{i}}{x_{i+1}-x_{i}}}\,,}$

then the spline slopes ${\displaystyle s_{i}}$  are defined as the following weighted average of ${\displaystyle m_{i-1}}$  and ${\displaystyle m_{i}}$ ,

${\displaystyle s_{i}={\frac {|m_{i+1}-m_{i}|m_{i-1}+|m_{i-1}-m_{i-2}|m_{i}}{|m_{i+1}-m_{i}|+|m_{i-1}-m_{i-2}|}}\,.}$

If the denominator equals zero, the slope is given as

${\displaystyle s_{i}={\frac {m_{i-1}+m_{i}}{2}}\,.}$

The first two and the last two points need a special prescription, for example,

${\displaystyle s_{1}=m_{1}\,,s_{2}={\frac {m_{1}+m_{2}}{2}}\,,s_{n-1}={\frac {m_{n-2}+m_{n-1}}{2}}\,,s_{n}=m_{n-1}\,.}$

The spline is then defined as the piecewise cubic function whose value between ${\displaystyle x_{i}}$  and ${\displaystyle x_{i+1}}$  is the unique cubic polynomial ${\displaystyle P_{i}(x)}$ ,

${\displaystyle P_{i}(x)=a_{i}+b_{i}(x-x_{i})+c_{i}(x-x_{i})^{2}+d_{i}(x-x_{i})^{3}\,,}$

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,

${\displaystyle P(x_{i})=y_{i}\,,P(x_{i+1})=y_{i+1}\,,P'(x_{i})=s_{i}\,,P'(x_{i+1})=s_{i+1}\,.}$

which gives

${\displaystyle a_{i}=y_{i}\,,}$
${\displaystyle b_{i}=s_{i}\,,}$
${\displaystyle c_{i}={\frac {3m_{i}-2s_{i}-s_{i+1}}{x_{i+1}-x_{i}}}\,,}$
${\displaystyle d_{i}={\frac {s_{i}+s_{i+1}-2m_{i}}{(x_{i+1}-x_{i})^{2}}}\,.}$

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.[5]

## References

1. ^ "Spline interpolation and fitting – ALGLIB, C++ and C# library". www.alglib.net.
2. ^ 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.
3. ^ a b 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
4. ^ Siddiqi, Al-Lawati, Boulbrachene, Abul Hasan, Mohamed, Messaoud (2017). Modern Engineering Mathematics. CRC. ISBN 9781498712095.{{cite book}}: CS1 maint: multiple names: authors list (link)
5. ^ "The Akima Interpolation".