GPU-friendly Stroke Expansion (2405.00127v2)
Abstract: Vector graphics includes both filled and stroked paths as the main primitives. While there are many techniques for rendering filled paths on GPU, stroked paths have proved more elusive. This paper presents a technique for performing stroke expansion, namely the generation of the outline representing the stroke of the given input path. Stroke expansion is a global problem, with challenging constraints on continuity and correctness. Nonetheless, we implement it using a fully parallel algorithm suitable for execution in a GPU compute shader, with minimal preprocessing. The output of our method can be either line or circular arc segments, both of which are well suited to GPU rendering, and the number of segments is minimal. We introduce several novel techniques, including an encoding of vector graphics primitives suitable for parallel processing, and an Euler spiral based method for computing approximations to parallel curves and evolutes.
- 2021. MotionMark 1.2. https://browserbench.org/MotionMark1.2/about.html
- World Wide Web Consortium 2024. WebGPU. World Wide Web Consortium. https://www.w3.org/TR/webgpu
- Dale Connor and Lilia Krivodonova. 2014. Interpolation of two-dimensional curves with Euler spirals. J. Comput. Appl. Math. 261 (2014), 320–332. https://doi.org/10.1016/j.cam.2013.11.009
- Scalable Vector Graphics (SVG 2) Candidate Recommendation. World Wide Web Consortium. https://www.w3.org/TR/SVG2/painting.html#StrokeShape
- The gfx-rs authors. 2024. gfx-rs/wgpu. https://github.com/gfx-rs/wgpu
- Ron Goldman. 2003. Chapter 5 - Bezier Approximation and Pascal’s Triangle. In Pyramid Algorithms, Ron Goldman (Ed.). Morgan Kaufmann, San Francisco, 187–306. https://doi.org/10.1016/B978-155860354-7/50006-4
- Google. 2024. Skia. https://skia.org
- Rive Inc. 2024. Rive Renderer. https://github.com/rive-app/rive-renderer
- Mark J. Kilgard. 2020. Polar Stroking: New Theory and Methods for Stroking Paths. ACM Trans. Graph. 39, 4, Article 145 (Aug. 2020), 15 pages. https://doi.org/10.1145/3386569.3392458
- Euler Spiral for Shape Completion. International Journal of Computer Vision 54, 1 (01 Aug 2003), 159–182. https://doi.org/10.1023/A:1023713602895
- Georg Maier. 2014. Optimal arc spline approximation. Computer Aided Geometric Design 31, 5 (2014), 211–226. https://doi.org/10.1016/j.cagd.2014.02.011
- D. S. Meek and D. J. Walton. 2004. An arc spline approximation to a clothoid. J. Comput. Appl. Math. 170, 1 (2004), 59–77. https://doi.org/10.1016/j.cam.2003.12.038
- Smita Narayan. 2014. Approximating Cornu spirals by arc splines. J. Comput. Appl. Math. 255, 1 (2014). https://doi.org/10.1016/j.cam.2013.06.038
- Diego Nehab. 2020. Converting Stroked Primitives to Filled Primitives. ACM Trans. Graph. 39, 4, Article 137 (Aug. 2020), 17 pages. https://doi.org/10.1145/3386569.3392392
- Taweechai Nuntawisuttiwong and Natasha Dejdumrong. 2021. An Approximation of Bézier Curves by a Sequence of Circular Arcs. Information Technology and Control 50, 2 (2021). https://doi.org/10.5755/j01.itc.50.2.25178
- I. F. D. Oliveira and R. H. C. Takahashi. 2020. An Enhancement of the Bisection Method Average Performance Preserving Minmax Optimality. ACM Trans. Math. Softw. 47, 1, Article 5 (Dec. 2020), 24 pages. https://doi.org/10.1145/3423597
- Amar Patel and Tex Riddell. 2024. D3D12 Work Graphs. DirectX Developer Blog. https://devblogs.microsoft.com/directx/d3d12-work-graphs/
- Ulrich Reif and Andreas Weinmann. 2021. Clothoid fitting and geometric Hermite subdivision. Advances in Computational Mathematics 47, 50 (26 June 2021). https://doi.org/10.1007/s10444-021-09876-5
- W. Tiller and E. G. Hanson. 1984. Offsets of two-dimensional profiles. IEEE Computer Graphics and Applications 4, 9 (Sept. 1984), 36–46.
- D. J. Walton and D. S. Meek. 2009. G1 interpolation with a single Cornu spiral segment. J. Comput. Appl. Math. 223, 1 (2009), 86–96. https://doi.org/10.1016/j.cam.2007.12.022
- Heinrich Wieleitner. 1907. Die Parallelkurve der Klothoide. Archiv der Mathematik und Physik 11 (1907), 373–375.
- Norimasa Yoshida and Takafumi Saito. 2012. The Evolutes of Log-Aesthetic Planar Curves and the Drawable Boundaries of the Curve Segments. Computer-Aided Design and Applications 9, 5 (2012), 721–731. https://doi.org/10.3722/cadaps.2012.721-731
- Fabian Yzerman. 2020. Fast approaches to simplify and offset Bézier curves within specified error limits. https://blend2d.com/research/simplify_and_offset_bezier_curves.pdf
Sponsored by Paperpile, the PDF & BibTeX manager trusted by top AI labs.
Get 30 days freePaper Prompts
Sign up for free to create and run prompts on this paper using GPT-5.
Top Community Prompts
Collections
Sign up for free to add this paper to one or more collections.