This article explores a GPU-based method for high-performance vector graphics rendering, expanding upon Nehab’s 2020 theory of path stroking. By introducing the Euler spiral as an efficient intermediate representation, the authors achieve precise stroke and fill approximations with minimal computational divergence. Their novel error metric enables direct estimation without costly pre-processing, unlocking fully GPU-driven rendering workflows. The paper concludes with future directions for improving parallelism, optimizing memory allocation, and refining mathematical rigor in GPU stroke evaluation.This article explores a GPU-based method for high-performance vector graphics rendering, expanding upon Nehab’s 2020 theory of path stroking. By introducing the Euler spiral as an efficient intermediate representation, the authors achieve precise stroke and fill approximations with minimal computational divergence. Their novel error metric enables direct estimation without costly pre-processing, unlocking fully GPU-driven rendering workflows. The paper concludes with future directions for improving parallelism, optimizing memory allocation, and refining mathematical rigor in GPU stroke evaluation.

Accelerating Vector Graphics with Euler Spirals

2025/10/30 23:15

ABSTRACT

1 INTRODUCTION

2 FLATTENING AND ARC APPROXIMATION OF CURVES

3 EULER SPIRALS AND THEIR PARALLEL CURVES

4 FLATTENED PARALLEL CURVES

5 ERROR METRICS FOR APPROXIMATION BY ARCS

6 EVOLUTES

7 CONVERSION FROM CUBIC BÉZIERS TO EULER SPIRALS

8 GPU IMPLEMENTATION

9 RESULTS

CONCLUSIONS, FUTURE WORK AND REFERENCES

\

10 CONCLUSIONS

Path stroking has received attention in recent years, with Nehab [2020] and Kilgard [2020b] both having proposed a complete theory of correct stroking in vector graphics. While there are a number of implementations of path filling on the GPU, the goal of also implementing stroke expansion on the GPU had not yet been realized. Building upon the theory proposed by Nehab [2020], we implemented an approach to stroke expansion that is GPU-friendly, and achieves high performance on commodity hardware.

\ We present the Euler spiral as an intermediate representation for a fast and precise approximation of both filled and stroked Bézier paths. Our method for lowering to both line and arc primitives avoids recursion and minimizes divergence, potentially serious problems for parallel evaluation on the GPU.

\ We propose a novel error metric to directly estimate approximation error as opposed to the commonly employed cut-then-measure approaches which often consume the lion’s share of computational expense. Our approach includes an efficient encoding scheme that alleviates the need for expensive CPU pre-computations and unlocks fully GPU-driven rendering of the entire vector graphics model.

\

FUTURE WORK

• The GPU implementation sequentializes some work that could be parallel, and is thus not as well load-balanced as it might be. An appealing future direction is to split the pipeline into separate stages, executed by the GPU as nodes in a work graph [21]. This structure is appealing because load balancing is done by hardware.

\ • The pre-allocation requirement for bump-allocated line soup buffer is a limitation due to today’s graphics APIs. A more accurate and optimized buffer size estimation heuristic is considered future work. It may also be interesting to explore whether graphics APIs can be extended to facilitate GPU-driven scheduling of the compute workload under a bounded memory footprint.

\ • Many of the error metrics were empirically determined. The mathematical theory behind them should be developed more rigorously, and that process will likely uncover opportunities to fine-tune the technique.

\ • As mentioned earlier, we did not have time to sufficiently explore a pipeline architecture for GPU-based dashing. Given its parameterization by arc length, we believe the Euler spiral representation lends itself well to an approach based on parallel prefix sums of segment arc lengths.

\

REFERENCES

[1] 2021. MotionMark 1.2. https://browserbench.org/MotionMark1.2/about.html

\ [2] World Wide Web Consortium 2024. WebGPU. World Wide Web Consortium. https://www.w3.org/TR/webgpu

\ [3] 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

\ [4] R. T. Farouki and C. A. Neff. 1990. Algebraic properties of plane offset curves. Comput. Aided Geom. Des. 7, 1–4 (jun 1990), 101–127. https://doi.org/10.1016/ 0167-8396(90)90024-L

\ [5] Francisco Ganacim, Rodolfo S. Lima, Luiz Henrique de Figueiredo, and Diego Nehab. 2014. Massively-parallel vector graphics. ACM Transactions on Graphics 33, 6 (2014), 1–14. https://doi.org/10.1145/2661229.2661274

\ [6] The gfx-rs authors. 2024. gfx-rs/wgpu. https://github.com/gfx-rs/wgpu

\ [7] 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

\ [8] Google. 2024. Skia. https://skia.org

\ [9] Rive Inc. 2024. Rive Renderer. https://github.com/rive-app/ri

\ [10] Adobe Systems Incorporated. 2008. Document management – Portable document format – Part 1: PDF 1.7. https://opensource.adobe.com/dc-acrobat-sdk-docs/ pdfstandards/PDF32000_2008.pdf

\ [11] Mark J. Kilgard. 2020. Anecdotal Survey of Variations in Path Stroking among Real-world Implementations. arXiv:2007.12254

\ [12] 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

\ [13] Benjamin B. Kimia, Ilana Frankel, and Ana-Maria Popescu. 2003. Euler Spiral for Shape Completion. International Journal of Computer Vision 54, 1 (01 Aug 2003), 159–182. https://doi.org/10.1023/A:1023713602895

\ [14] Samuli Laine and Tero Karras. 2011. High-Performance Software Rasterization on GPUs. HPG ’11: Proceedings of the ACM SIGGRAPH Symposium on High Performance Graphics (2011), 79–88. https://doi.org/10.1145/2018323.2018337

\ [15] Raph Levien. 2021. Cleaner parallel curves with Euler spirals. https://raphlinus. github.io/curves/2021/02/19/parallel-curves.html

\ [16] 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

\ [17] 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

\ [18] 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

\ [19] 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

\ [20] 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

\ [21] Amar Patel and Tex Riddell. 2024. D3D12 Work Graphs. DirectX Developer Blog. https://devblogs.microsoft.com/directx/d3d12-work-graphs/

\ [22] 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

\ [23] W. Tiller and E. G. Hanson. 1984. Offsets of two-dimensional profiles. IEEE Computer Graphics and Applications 4, 9 (Sept. 1984), 36–46.

\ [24] 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

\ [25] Heinrich Wieleitner. 1907. Die Parallelkurve der Klothoide. Archiv der Mathematik und Physik 11 (1907), 373–375.

\ [26] Norimasa Yoshida and Takafumi Saito. 2012. The Evolutes of Log-Aesthetic Planar Curves and the Drawable Boundaries of the Curve Segments. ComputerAided Design and Applications 9, 5 (2012), 721–731. https://doi.org/10.3722/ cadaps.2012.721-731

\ [27] Fabian Yzerman. 2020. Fast approaches to simplify and offset Bézier curves within specified error limits. https://blend2d.com/research/simplifyandoffset_ bezier_curves.pdf

:::info Authors:

  1. Raph Levien
  2. Arman Uguray

:::

:::info This paper is available on arxiv under CC 4.0 license.

:::

\

Disclaimer: The articles reposted on this site are sourced from public platforms and are provided for informational purposes only. They do not necessarily reflect the views of MEXC. All rights remain with the original authors. If you believe any content infringes on third-party rights, please contact service@support.mexc.com for removal. MEXC makes no guarantees regarding the accuracy, completeness, or timeliness of the content and is not responsible for any actions taken based on the information provided. The content does not constitute financial, legal, or other professional advice, nor should it be considered a recommendation or endorsement by MEXC.

You May Also Like

Next XRP ‘Monster Leg’ Will Start No Earlier Than 2026: Analyst

Next XRP ‘Monster Leg’ Will Start No Earlier Than 2026: Analyst

An XRP/BTC long-term chart shared by pseudonymous market technician Dr Cat (@DoctorCatX) points to a delayed—but potentially explosive—upswing for XRP versus Bitcoin, with the analyst arguing that “the next monster leg up” cannot begin before early 2026 if key Ichimoku conditions are to be satisfied on the highest time frames. Posting a two-month (2M) XRP/BTC chart with Ichimoku overlays and date markers for September/October, November/December and January/February, Dr Cat framed the setup around the position of the Chikou Span (CS) relative to price candles and the Tenkan-sen. “Based on the 2M chart I expect the next monster leg up to start no earlier than 2026,” he wrote. “Because the logical time for CS to get free above the candles is Jan/Feb 2026 on an open basis and March 2026 on a close basis, respectively.” XRP/BTC Breakout Window Opens Only In 2026 In Ichimoku methodology, the CS—price shifted back 26 periods—clearing above historical candles and the Tenkan-sen (conversion line) is used to confirm the transition from equilibrium to trending conditions. That threshold, in Dr Cat’s view, hinges on XRP/BTC defending roughly 2,442 sats (0.00002442 BTC). “As you see, the price needs to hold 2442 so that CS is both above the candles and Tenkan Sen,” he said. Related Reading: Facts Vs. Hype: Analyst Examines XRP Supply Shock Theory Should that condition be met, the analyst sees the market “logically” targeting the next major resistance band first around ~7,000 sats, with an extended 2026 objective in a 7,000–12,000 sats corridor on the highest time frames. “If that happens, solely looking at the 2M timeframe the logical thing is to attack the next resistance at ~7K,” he wrote, before adding: “Otherwise on highest timeframes everything still looks excellent and points to 7K–12K in 2026, until further notice.” The roadmap is not without nearer-term risks. Dr Cat flagged a developing signal on the weekly Ichimoku cloud: “One more thing to keep an eye on till then: the weekly chart. Which, if doesn’t renew the yearly high by November/December will get a bearish kumo twist. Which still may not be the end of the world but still deserves attention. So one more evaluation is needed at late 2025 I guess.” A bearish kumo twist—when Senkou Span A crosses below Senkou Span B—can foreshadow a medium-term loss of momentum or a period of consolidation before trend resumption. The discussion quickly turned to the real-world impact of the satoshi-denominated targets. When asked what ~7,000 sats might mean in dollar terms, the analyst cautioned that the conversion floats with Bitcoin’s price but offered a rough yardstick for today’s market. “In current BTC prices are roughly $7.8,” he replied. The figure is illustrative rather than predictive: XRP’s USD price at any future XRP/BTC level will depend on BTC’s own USD value at that time. The posted chart—which annotates the likely windows for CS clearance as “Jan/Feb open CS free” and “March close” following interim checkpoints in September/October and November/December—underscores the time-based nature of the call. On multi-month Ichimoku settings, the lagging span has to “work off” past price structure before a clean upside trend confirmation is possible; forcing the move earlier would, in this framework, risk a rejection back into the cloud or beneath the Tenkan-sen. Contextually, XRP/BTC has been basing in a broad range since early 2024 after a multi-year downtrend from the 2021 peak, with intermittent upside probes failing to reclaim the more consequential resistances that sit thousands of sats higher. The 2,442-sats area Dr Cat highlights aligns with the need to keep the lagging span above both contemporaneous price and the conversion line, a condition that tends to reduce whipsaws on very high time frames. Related Reading: Analyst Sounds Major XRP Warning: Last Chance To Get In As Accumulation Balloons Whether the market ultimately delivers the 7,000–12,000 sats advance in 2026 will, by this read, depend on two things: XRP/BTC’s ability to hold above the ~2,442-sats pivot as the calendar turns through early 2026, and the weekly chart avoiding or quickly invalidating a bearish kumo twist if new yearly highs are not set before November/December. “If that happens… the logical thing is to attack the next resistance at ~7K,” Dr Cat concludes, while stressing that the weekly cloud still “deserves attention.” As with any Ichimoku-driven thesis, the emphasis is on alignment across time frames and the interaction of price with the system’s five lines—Tenkan-sen, Kijun-sen, Senkou Spans A and B (the “kumo” cloud), and the Chikou Span. Dr Cat’s thread leans on the lagging span mechanics to explain why an earlier “monster leg” is statistically less likely, and why the second half of 2025 will be a critical checkpoint before any 2026 trend attempt. For now, the takeaway is a timeline rather than an imminent trigger: the analyst’s base case defers any outsized XRP outperformance versus Bitcoin until after the CS clears historical overhead in early 2026, with interim monitoring of the weekly cloud into year-end. As he summed up, “On highest timeframes everything still looks excellent… until further notice.” At press time, XRP traded at $3.119. Featured image created with DALL.E, chart from TradingView.com
Share
NewsBTC2025/09/19 03:00