Convert continuous Bezier curve to B-Spline

Is there an algorithm/process for converting a sequence of bezier curves into a b-spline? I've found much discussion of the reverse, but nothing for this.

I'm attempting to make a spline editor in javascript which can export to DXF, and there is much better support for working with bezier curves in javascript than b-splines...

• Pomax's Primer on Bézier Curves is a very good resource. There are a few sections dedicated to B-spline/Bézier conversion, if I remember. Oct 18, 2018 at 17:16

Say you have $$n$$ beziers with degree $$d$$. Being continuous means the last control point of one bezier must be the same as the first of the succeeding bezier.

Hence the $$(d+1)n$$ control points has the form:

$$\quad c_{1,0},c_{1,1},\ldots,c_{1,d}$$
$$\quad c_{1,d},c_{2,1},\ldots,c_{2,d}$$
$$\quad \vdots\quad\vdots\quad\vdots\quad\vdots\quad\vdots\quad\vdots$$
$$\quad c_{n-1,d},c_{n,1},\ldots,c_{n,d}$$

For a B-spline with degree $$d$$ to coincide with the composite bezier curve, the knot sequence must have $$n+1$$ distinct knots and the multiplicity of the first and the last must be $$d+1$$ while the multiplicity $$d$$ suffice for the interior knots. As always the knots must be increasing, but their values doesn't matter in this case.

The control-points needed for the B-spline doesn't depend upon which values are chosen for the knots. There are $$(d+1)n-n+1\$$ B-spline basis functions and the control points for these are exactly the same as those of the bezier curves except for the fact that the control-points that are duplicated by the continuity constraint of your composite bezier curve must be included only once.

That is, the algorithm you need is to simply delete the first control-point of all but the first bezier (or equivalently the last control-point of all but the last bezier).