Table Of Links
2 FLATTENING AND ARC APPROXIMATION OF CURVES
3 EULER SPIRALS AND THEIR PARALLEL CURVES
5 ERROR METRICS FOR APPROXIMATION BY ARCS
7 CONVERSION FROM CUBIC BΓZIERS TO EULER SPIRALS
CONCLUSIONS, FUTURE WORK AND REFERENCES
ERROR METRICS FOR APPROXIMATION BY ARCS
The problem of approximating a curve by a sequence of arc segments has extensive literature, but none of the published solutions are quite suitable for our application. The specific problem of approximating an Euler spiral by arcs is considered in Meek and Walton [2004] using a βcut then measureβ adaptive subdivision scheme, but their solution has poor quality; it scales as π(1/π 2 ), while π(1/π 3 ) is attainable. The result was improved βslightlyβ by Narayan [2014].
The literature also contains optimal results, namely Maier [2014] and Nuntawisuttiwong and Dejdumrong [2021], but at considerable cost; both approaches claim π(π 2 ) time complexity. The through-line for all these results is that they are solving a harder problem: adopting the constraint that the generated arc sequence is πΊ 1 continuous. While desirable for many applications, this constraint is not needed for rendering a stroke outline.
Even with this constraint relaxed, the angle discontinuities of an arc approximation are tiny compared to flattening to lines. Our approach is based on a simple error metric, similar in flavor to the one for flattening to line segments. The details of the metric (in particular, tuning of constants) were obtained empirically, though we suspect that more rigorous analytic bounds could be obtained. In practice it works very well indeed; the best way to observe that is an interactive testing tool, which is provided in the supplemental materials.

The proposed error metric is as follows. The estimated distance error for a curve of length π Λ is:
π β 1 120 β« π Λ 0 3 βοΈ |π
β² (π )|ππ !3
For an Euler spiral segment, π β² (π ) is constant and thus this error metric becomes nearly trivial. With π subdivisions, the estimated distance is simply π 3π β² 120π 3 . Solving for π, we get π = π 3 βοΈ |π β² | 120π subdivisions, and those are divided evenly by arc length, as the subdivision density is constant across the curve, just as is the case for flattening arcs to lines. Remarkably, the approximation of an Euler spiral parallel curve by arc segments is almost as simple as that for Euler spirals to arcs.
As in flattening to lines, the parameter for the curve is the arc length of the originating Euler spiral. The subdivision density is then constant, and only a small tweak is needed to the formula for computing the number of subdivisions, taking into account the additional curvature variation from the offset by β (the half line-width). The revised formula is:
π = π 3 βοΈ |π
β² | (1 + 0.4|βπ π
β² |) 120π
This formula was determined empirically by curve-fitting measured error values from approximating Euler spiral parallel curves to arcs, but was also inspired by applying the general error metric formula to the analytical equations for Euler spiral parallel curve, and dropping higher order terms. A more rigorous derivation, ideally with firm error bounds, remains as future work.
One consequence of this formula is that, since the error is in terms of the absolute value of β, independent of sign, the same arc approximation can be used for both sides of a stroke. See Figure 8 for a comparison between flattening to a polyline and approximation with arc segments. The arc segment version has many fewer segments at the same tolerance, while preserving very high visual quality.
EVOLUTES
In the principled, correct specification for stroking [19], parallel curves are sufficient only for segments in which the curvature

does not exceed the reciprocal half-width. When it does, additional segments must be drawn, including evolutes of the original curve. In general, the evolute of a cubic BΓ©zier is a very complex curve, requiring approximation techniques. By contrast, the evolute of an Euler spiral (π
= ππ ) is another spiral with a simple CesΓ ro equation, namely π
= βπ β1 π β3 , an instance of the general result that the evolute of a log-aesthetic curve is another log-aesthetic curve [26].
Flattening this evolute is also straightforward; the subdivision density is proportional to π β0.5 where π is the arc length parameter of the underlying Euler spiral (and translated so π = 0 is the inflection point). Thus, the integral is 2 β π , and the inverse integral is just squaring. Thus, flattening the evolute of an Euler spiral is simpler than flattening its parallel curve. T
he effect of adding evolutes to achieve strong correctness is shown in Figure 9. The additional evolute segments and connecting lines are output twice, to make the winding numbers consistent and produce a watertight outline. All winding numbers are positive, so rendering with the nonzero winding rule yields a correct final render.
:::info
Authors:
:::
:::info
This paper is available on arxiv under CC 4.0 license.
:::