I was searching for the best interpolation methods that give class C2 functions and found that cubic spline interpolation was the most used. However, when I tested it, although it performed better than Lagrange interpolation, the function still diverged too far from the given points at certain intervals like shown in this example: Interpolation Example
So I was wondering if there is a better interpolation method that will help reduce these gaps.