For example, I have 4 control point, and I know it should be a closed contour.
Firstly, I use the scipy.interpolate to interpolate the contour, and the code is: