B-spline interpolation with Python
I am trying to reproduce a Mathematica example for a B-spline with Python. The code of the mathematica example reads pts = {{0, 0}, {0, 2}, {2, 3}, {4, 0}, {6, 3}, {8, 2}, {8, 0}}; Graphics[{BSplineCurve[pts, SplineKnots -> {0, 0, 0, 0, 2, 3, 4, 6, 6, 6, 6}], Green, Line[pts], Red, Point[pts]}] and produces what I expect. Now I try to do the same with Python/scipy: import numpy as np import matplotlib.pyplot as plt import scipy.interpolate as si points = np.array([[0, 0], [0, 2], [2, 3], [4, 0], [6, 3], [8, 2], [8, 0]]) x = points[:,0] y = points[:,1] t = range(len(x)) knots = [2, 3, 4] ipl_t