It's a pity that Knuth's Metafont curve definition system (with on-curve points) hasn't gotten more attention.
Or Karow's Ikarus software also had something with on-curve points, IIRC.
It's a pity that Knuth's Metafont curve definition system (with on-curve points) hasn't gotten more attention.
Or Karow's Ikarus software also had something with on-curve points, IIRC.
Designing with piecewise Bézier curves is just a bad idea.
Piecewise Bézier is a fine representation format once the curve is immutably defined. Bézier curves and surfaces, and the Bernstein Polynomial basis have "excellent numerical stability properties"
http://mae.engr.ucdavis.edu/~farouki/bernstein.pdf
which is just what you need for downstream processing. For example, intersection algorithms in CAD systems.
Edit: I just realised that we are talking about polynomial Bézier curves here (rather than rational Bézier), so what I suggested for converting from NURBS to piecewise Bézier isn't going to work in general.
What you probably want is something like Kochanek-Bartels spline [0], which has on-the-curve control points with some extra parameters (tension, continuity, bias) and it gets broken down to Bezier segments.
[I’m somewhat surprised that the Pomax page doesn’t have a section about Hobby splines to go with the section about Catmull-Rom splines. Here’s the Stanford tech report describing them http://i.stanford.edu/pub/cstr/reports/cs/tr/85/1047/CS-TR-8... ; Apple’s Pages and Keynote programs now can use Hobby splines for making shapes, https://bosker.wordpress.com/2013/11/13/beyond-bezier-curves... ; the problem I have with Hobby splines is that there are certain types of shapes that are a real pain to create. As long as you want something very smooth it works pretty well, but whenever the Hobby curve isn’t giving you quite the result you want, tweaking it precisely can become really tricky, and you wish you just had full control over the Bézier arms. It could just be that I don’t have enough practice with them though.]
Another type of curve that is very interesting for some applications is a Pythagorean-hodograph curve. These are curves such that the derivative in the X and Y direction are represented by "Pythagorean" polynomials, i.e. the hypotenuse √(x²+y²) is itself a polynomial. This means that the arclength can be precisely computed in closed form, as can mathematically precise offset curves, which makes them great for defining CAM cut paths.
Lots of CAD software uses b-splines, specifically “NURBS”, as the main curve primitive. Some computer animation software uses subdivision surfaces instead. I’ve never been the biggest fan of UIs for manipulating either one. YMMV.
Personally, I think even for using parametric cubic polynomial segments (i.e. for interoperating 1:1 with systems where the main drawing primitive is a cubic Bézier curve), it works a bit better from a UI perspective to specify the (x, y) locations of on-curve points at t = {0.0, 0.25, 0.75, 1.0} in each segment [these points are the extrema of the Chebyshev polynomial of the appropriate degree] and then convert to Bézier basis by multiplying by the appropriate matrix. I haven’t ever seen anyone try to implement such a UI in production software though, only my own little experimental doodles. (Only downside is that makes it slightly trickier to ensure smoothness at the endpoints in cases where that matters. I think this can be worked around with some extra UI effort.)
In highway design they are known as clothoids.
https://en.wikipedia.org/wiki/Track_transition_curve
I worked as a consultant on a Japanese road design system (Sanei's STRAX Road CAD - still being sold it looks), and clothoids were already well established when I started in 1995.
But even so, it’s certainly a nice feature to have. Even with some interaction glitches, it’s still in many cases nicer to use than Bézier curves.
What exactly is different in the splines of metafont?
https://developer.mozilla.org/en-US/docs/Web/SVG/Tutorial/Pa...
In Inkscape you can open the XML Editor (from the Edit menu) and see how the object you've drawn is represented in SVG. A simple path with one Bézier curve may look like this:
d: m 10,20 c 5,-5 15,10 20,5