Converting stroked primitives to filled primitives
Diego Nehab
Abstract
Fig. 1. We analyzed 22 distinct third-party strokers. (a) 14 of them confuse the stroke-to-fill conversion problem with the curve-offsetting problem, and produce incorrect results near high-curvature regions. (b) The remaining 8 do treat high-curvature regions, but offer no accuracy guarantees, and often output too many segments. (c) Our stroker correctly handles these regions using evolutes. (d) All but 2 strokers ignore inner joins between segments, leaving unexpected gaps. (e) Our stroker detects when such joins are visible (even between curved segments) and outputs them. (f) All but 2 strokers fail spectacularly in the vicinity of intra-segment cusps and "almost cusps". (g) Following the standards to the letter produces discontinuous results at cusps. (h) Our stroker robustly detects cusps and "almost cusps" to produce continuous, intuitive results.
Vector graphics formats offer support for both filled and stroked primitives. Filled primitives paint all points in the region bounded by a set of outlines. Stroked primitives paint all points covered by a line drawn over the outlines. Editors allow users to convert stroked primitives to the outlines of equivalent filled primitives for further editing. Likewise, renderers typically convert stroked primitives to equivalent filled primitives prior to rendering. This conversion problem is deceivingly difficult to solve. Surprisingly, it has received little to no attention in the literature. Existing implementations output too many segments, do not satisfy accuracy requirements, or fail under a variety of conditions, often spectacularly. In this paper, we present a solution to the stroke-to-fill conversion problem that addresses these issues. One of our key insights is to take into account the evolutes of input outlines, in addition to their offsets, in regions of high curvature. Furthermore, our approach strives to maintain continuity between the input and the set of painted points. Our implementation is available in open source.
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Related papers
- Polar stroking: new theory and methods for stroking pathsMark J. KilgardSIGGRAPH 2020 · 13 citations
- StrokeStrip: joint parameterization and fitting of stroke clustersDave Pagurek van Mossel, Chenxi Liu, Nicholas Vining, Mikhail Bessmeltsev et al.SIGGRAPH 2021 · 16 citations
- Ciallo: GPU-Accelerated Rendering of Vector Brush StrokesShen Ciao, Zhongyue Guan, Qianxi Liu, Li-Yi Wei et al.SIGGRAPH 2024 · 3 citations
- PolyFit: perception-aligned vectorization of raster clip-art via intermediate polygonal fittingEdoardo Alberto Dominici, Nico Schertler, Jonathan Griffin, Shayan Hoshyari et al.SIGGRAPH 2020 · 37 citations
- End-to-End Line Drawing VectorizationHanyuan Liu, Chengze Li, Xueting Liu, Tien-Tsin WongAAAI 2022 · 11 citations
