Added a spline function.