HackerPapers

arXiv:2007.00308cs.GR

Polar Stroking: New Theory and Methods for Stroking Paths

Mark J. Kilgard

Abstract

Stroking and filling are the two basic rendering operations on paths in vector graphics. The theory of filling a path is well-understood in terms of contour integrals and winding numbers, but when path rendering standards specify stroking, they resort to the analogy of painting pixels with a brush that traces the outline of the path. This means important standards such as PDF, SVG, and PostScript lack a rigorous way to say what samples are inside or outside a stroked path. Our work fills this gap with a principled theory of stroking. Guided by our theory, we develop a novel polar stroking method to render stroked paths robustly with an intuitive way to bound the tessellation error without needing recursion. Because polar stroking guarantees small uniform steps in tangent angle, it provides an efficient way to accumulate arc length along a path for texturing or dashing. While this paper focuses on developing the theory of our polar stroking method, we have successfully implemented our methods on modern programmable GPUs.

arXiv comments
15 pages, 19 figures, ACM Trans. on Graphics (Proceedings of SIGGRAPH 2020); corrected Fig. 8, Eq. 6, and Eq. 12; grammar/typo fixes; uses updated acmart template
Journal reference
ACM Transactions on Graphics, Vol. 39, No. 4 (2020) 145:1-15
DOI
doi:10.1145/3386569.3392458
Subjects
cs.GRGraphics

On Hacker News

Linked by 4 identifiable commenters in 6 comments across 6 threads, from Feb 2021 to Nov 2025.

Comments linking this paper, per year.

Discussed in comments6 threads

    • Bezier curves can generate degenerate geometry when flattened and stroke geometry has to handle edge cases. See for instance the illustration on the last page of the Polar Stroking paper: https://arxiv.org/pdf/2007.00308 There are also things like interpretting (conflating)…

      user____nameView on HNParent context

  1. Requiem for piet-gpu-hal 1 comment
    • I would say the most likely reason is that 2D graphics is just plain hard. Jasper's classic essay[1] goes into more detail. That said, I'd really love to see more stuff along the lines of what you describe. I think Vello could render, for example, something that visually looks…

      raphlinusView on HNParent context

  2. Vector graphics on GPU 1 comment
    • Mark Kilgard from NVIDIA has been beating this drum for a couple decades. It's not simple. His latest paper is about how to handle stroking of cubic splines: https://arxiv.org/abs/2007.00308 He gives it as a talk, but you have to sign up with NVIDIA…

      bsderView on HNParent context

    • Tangentially, huh? So the underlying operation of finding a parallel "curve" is trivial when the curve is a line, as it's just another line. That doesn't mean the problems is simple, though. One challenge (which I didn't address in the post, nor do I have code yet) is dealing…

      raphlinusView on HNParent context

Submitted to Hacker News

Connected through shared HN threads, not inferred similarity or a recommendation.