I have implemented an algorithm to interpolate a set of points with a B-spline curve. The algorithm is from The NURBS Book. Given a set $Q$ of data points, the interpolating algorithm gives us a cubic nonrational B-spline curve with $n + 1$ control points, $m + 1$ knots, and defined on the interval $[0,1]$. The knot vector is clamped and nonuniform.
The problem with this interpolation arises on some of my data sets where the natural shape of the curve should be closed. Where one would want the curve to be smoothly joined at the first/last point, mine is not smooth. It is exhbiting only $C^0$ continuity, I believe.
Can you please help me find:
1) A way to interpolate a set of data with a closed, periodic, B-spline curve?
2) Given a degree, set of control points, parameters, and a knot vector, manipulate these structures to obtain the closed periodic curve without losing the interpolating quality of my curve?
Any help would be much appreciated.
I have done some research on how to make a curve closed and have exhausted my searching abilities on the internet (mostly finding sites like this one). It's just not clear enough to me what I need to do.