I accidentally posted and have no means of editing, so here is my actual question:
The splines look like this:

I know that the spline function works correctly because I plotted the points that are generated as red ellipses, but for some reason the resulting curve has a strange behaviour. Any idea of the cause of this and how to fix it?