> any hope for general convolutions (or at least more general ones than with circles)
Interesting question.
Knuth's METAFONT can describe glyphs not simply as filled outlines, but ALSO as strokes of pens shaped by circles, ellipses, and EVEN convex polygons (e.g., a an acute triangular wedge perhaps).
And the description of a METAFONT glyph is all parameterized (it's really a program! -- hence the META) so there's not even an actual outline for a glyph but a tunable family of glyph variations.
METAFONT's model is humanistic as human ideographs and letter forms were (once) scratchings, engravings, and pen strokes. However the shape of movable type, as captured with Bezier splines by TrueType and Postscript outline glyphs, lack a first-class stroking capability.
So could you support the humanistic METAFONT-style approach efficiently in today's world of GPU rendering? Yes, if you could, as suggested above, efficiently convolve a pen's shape with a stroke trajectory.
Circles for pens are no problem; and ellipses are just squished transforms of circular stroking. But (convex) polygonal pens for stroking?
Polar stroking provides a starting framework for such a convolution approach for convex polygonal pens (say, a triangular wedge or other convex polygonal shape). Step in small changes in gradient direction change. Rather than assuming a conventional circular or nib pen shape, snap each tessellated rib to the closest polygonal pen vertex. The result is the polygonal convolution you seek.
So a question almost nobody is asking: What if we could revive METAFONT for the 21st century?
Imagine a Jurassic Park scenario applied -- not to dinosaurs -- but rather to Knuth's Computer Modern.
> The arc length of quadratic Bézier curves actually can be computed with a closed form expression.
While indeed true, the article doesn't provide the closed form expression. The curious or unsatisfied reader can find the solution for the 2D case at the top of page 7 of this SIGGRAPH paper:
The quadratic function Q(t)=(x,y) is of the monomial form At^2 + Bt + C where A, B, and C are 2D coefficients (see page 5) where A is non-zero.
Simply convert your Bezier quadratic form to monomial form to apply this equation.
This equation still doesn't provide an arc length parameterization, the article's actual focus.
But if you did, say, want to move 26% (or N%, more generally) of the arc length along a quadratic Bezier segment, first compute the total (100%) arc length with the paper's formula (take care doing so as the paper suggests). Then split the Bezier at a halfway guess (try t=0.5). Again use the formula to evaluate the split quadratic. Repeating this in a divide and conquer fashion, you narrow in on the t value very close to 26% (or N%) of the arc length.
2D vector graphics standards expect to dash cubic & quadratic Bezier segments so some practical strategy to provide an arc length parameterization -- even if unavailable in closed form.
Yes, the procedure you mention works, but it's a numerical method.
I'm not saying such numerical method's are impractical or something, but depending on your general setup, closed form formulas might be faster.
You could also split the curve at an arbitrary value of the parameter t. Then find the length of that entire curve. Splitting at a specific value is straight forward.
Edit: or were they talking about 26 percent of the length as opposed to t = 0.26? that's a different story.
Edit2: Oh, that's just 0.26 times the total length. What am I missing?
Interesting question.
Knuth's METAFONT can describe glyphs not simply as filled outlines, but ALSO as strokes of pens shaped by circles, ellipses, and EVEN convex polygons (e.g., a an acute triangular wedge perhaps).
And the description of a METAFONT glyph is all parameterized (it's really a program! -- hence the META) so there's not even an actual outline for a glyph but a tunable family of glyph variations.
METAFONT's model is humanistic as human ideographs and letter forms were (once) scratchings, engravings, and pen strokes. However the shape of movable type, as captured with Bezier splines by TrueType and Postscript outline glyphs, lack a first-class stroking capability.
So could you support the humanistic METAFONT-style approach efficiently in today's world of GPU rendering? Yes, if you could, as suggested above, efficiently convolve a pen's shape with a stroke trajectory.
Circles for pens are no problem; and ellipses are just squished transforms of circular stroking. But (convex) polygonal pens for stroking?
Polar stroking provides a starting framework for such a convolution approach for convex polygonal pens (say, a triangular wedge or other convex polygonal shape). Step in small changes in gradient direction change. Rather than assuming a conventional circular or nib pen shape, snap each tessellated rib to the closest polygonal pen vertex. The result is the polygonal convolution you seek.
So a question almost nobody is asking: What if we could revive METAFONT for the 21st century?
Imagine a Jurassic Park scenario applied -- not to dinosaurs -- but rather to Knuth's Computer Modern.
https://en.m.wikipedia.org/wiki/Computer_Modern
"Your scientists were so preoccupied with whether or not they could, they didn't stop to think if they should."