How to smooth out a jerky spline