I am curious about that, are there any attempts about using cubic B-splines as the extended form of cubic Bezier curves?
The advantages of B-splines are:
- Converting cubic B-splines down to Bezier curves is lossless (Boehm's algorithm).
- Four-point cubic B-splines with knot interval [0, 1, 0] is identical to one segment of cubic Bezier curve.
- Algorithms for handling cubic B-splines are well-studied (de-Boor, etc).
- B-splines preserves C2 continuity, it could prevent kinks when interpolation.
Comments
My first impression is that it's good for drawing smooth paths, but at the expense of precise & intuitive control, since there are no on curve nodes (ignoring cusps) which are probably the easiest way to force the path to pass through certain points.
I'm wondering what the approach to drawing precise shapes with B-splines should be. Do you know of any resources?
So I made a little example using the techniques in the papers I posted yesterday. All these six shapes have the exact same control points (a square) but with different corner and edge "interval" assignments. In our conversion, each non-zero corner is converted into a quadratic Bezier curve arc, and each non-zero edge is converted into a cubic Bezier arc. Example 2 zeroes all the corner intervals to produce cubic B-splines. Example 3 zeroes all the edge intervals to produce a TrueType curve (quadratic B-spline).
CODE = https://gist.github.com/be5invis/48ff85b838f1a4904aebc575fbde3b83
https://gist.github.com/be5invis/828d247819ddebe1dc3ba483b89cc533