Add closed boundary condition to cubic spline.