Splines Approximate spline of any degree to given data Full description of an algorithm (in Russian): https://habr.com/post/314218/)