# Convert NURBS curve into Cubic Bezier Curve

From this:

Maybe you already know this, but it's impossible to convert nurbs to bezier splines exactly because nurbs are rational functions, and bezier splines are polynomials.

I don't understand what it means, and don't yet know if it really means that there is absolutely no way to convert a NURBS curve into a cubic bezier curve (or spline, since I think bezier splines are multiple bezier curves connected together). I get confused because I also read this:

No matter it is Uniform or Non-uniform, NURBS is just made by one or a bunch of Bezier curve; and if you bear with me, what you need to know about NURBS math is just the Bezier-series-equations.

Even just saw this:

NURBS curve can always be converted to piecewise Bézier by repeated knot-insertion.

So some say it's possible, others not.

If it is true that you can't model NURBS with Bezier curves, then I would like to know why rational functions and polynomials can't be morphed into one another, at least at a high level (what is preventing the transformation between the two). In that case I would also like to know if there is a way to approximate a NURBS curve with Bezier curves, even though you lose some precision or the curve changes slightly. I would then just like to know how much you lose when approximating a NURBS curve with a Bezier curve, and what the algorithm or technique is called so I can further explore how to do it. If there is a standard algorithm for accomplishing this, that would be cool to know instead too.

I assume that your cubic spline is non-rational, meaning $$w$$ = 1, then this is in general true that exact conversion is not possible. NURBS are rational, so you can model conics, say circle whereas Bézier cannot. There is special case: rational Bézier curve, which could be used in place of NURBS.

This simply means that you can draw circle, and only approximate it with Bézier.

To approximate, it depends on degree of curve: least squares method is stable and fast for low degrees, but fails (error is not equal along curve and huge) for higher degrees. Another idea is like in de Casteljau, recursively subdivide curve and use piecewise approximation. This idea generates lots of points and is numerically less stable than least squares.

For general NURBS of order 6+, approximation technique must be of order at least 6+, but it converges slowly.

In any case, finding Bézier curve through points from NURBS is way to go.

Another option is lossless conversion from NURBS to piecewise Rational B-Splines (URBS) (after conversion these are uniform, but no precision is lost), then via Boehm algorithm or Greville points convert B-spline to R-Bézier (here again, nothing is lost) and then project it to NR-Bézier (approximation, i.e. https://ieeexplore.ieee.org/document/6658158 or https://arxiv.org/pdf/1212.3385.pdf, here conics are lost).

Errors are seen about five-six places after decimal point for nasty splines (these that cannot be exactly recovered, as oposed to nice, which are wxact), so for any drawing purpose it is not visible, unless this is for milling machine, but hey, CNC supports (G-code G02) arcs anyway.