Unified Software Package for Cubic Spline Interpolation
Abstract
Cubic spline interpolation is currently performed using various routines present in different computer programming languages for various types of splines. It is less tedious and more convenient for users to use a unified software package consisting of different types of splines. However, there is no known software that interpolates all the types of splines for a given set of data points. Hence, a unified software package using Java language is developed to interpolate four types of cubic splines: natural cubic spline, complete cubic spline, clamped cubic spline, and not-a-knot cubic spline. The unified software package is tested for four basic functions: sin x, cos x, e^x, and 1/(1+x^2) within the ranges of [0, ?], [0, ?], [0, 1], and [-5, 5], respectively. The number of nodes is taken as 17(2^4+1), which represents a typical number in the interpolation of splines. Two graphs are drawn, for each function and spline pair, one showing the cubic spline curve with respect to the actual function curve and its data points, and another one displaying the difference between the spline values and the function values. Out of all the four types, the clamped cubic spline turned out to be the one interpolating the data closest to the function. This is not a surprise considering the fact that the user provides the end conditions calculated from the actual function. Also, the complete cubic spline is similar to the not-a-knot cubic spline in all the cases tested. To conclude, with the help of the unified software package, cubic spline interpolation can be done with much ease, as shown.
Collections
- OSU Theses [15752]