3 ms·
Actually, this seems rather important for computer graphics if you want to transform vector-defined strokes into vector-defined closed polygons (outlines). See:
by jabbany 4y ago
Actually, this seems rather important for computer graphics if you want to transform vector-defined strokes into vector-defined closed polygons (outlines). See: https://youtu.be/F2oSR0Oh25c?t=70 https://youtu.be/F2oSR0Oh25c?t=70
For "corners" on non-smooth curves usually there's some kind of way to resolve the degenerate (or rather, undefined) behavior. Usually this would be something like a stroke-cap property.
- ahartmetz 4y agoThe venerable and ridculously full-featured QPainter has a QPen with both a line cap style and a pen join style, documention of the latter: https://doc.qt.io/qt-6/qt.html#PenJoinStyle-enum https://doc.qt.io/qt-6/qt.html#PenJoinStyle-enum The two have to be different: a cap is a fixed piece of geometry, a join style calculates geometry based on the segments it joins.
- JKCalhoun 4y agoYeah, the paper made me wonder how the typical modern graphics library even draws stroked béziers. Surely, when the line weight is greater than 1, you have essentially two parallel béziers you are filling in order to rasterize a fat stroke.
- mcphage 4y agoYou don't need to represent them as curves, though. Yes, turning the parallel curve of a bezier into a smooth curve is difficult, but turning it into a sequence of line segments is pretty easy, and something you can do at whatever level of resolution you want.