- All Categories
- 34 Introductions
- 3.5K Typeface Design
- 737 Font Technology
- 1K Technique and Theory
- 560 Type Business
- 423 Type Design Critiques
- 519 Type Design Software
- 29 Punchcutting
- 126 Lettering and Calligraphy
- 74 Technique and Theory
- 52 Lettering Critiques
- 440 Typography
- 277 History of Typography
- 107 Education
- 56 Resources
- 465 Announcements
- 69 Events
- 101 Job Postings
- 145 Type Releases
- 149 Miscellaneous News
- 255 About TypeDrawers
- 51 TypeDrawers Announcements
- 109 Suggestions and Bug Reports

## Comments

14I have a big pile of partially-finished code which you can find at https://github.com/raphlinus/raphlinus.github.io/tree/parallel_bezier, and an outline of a blog post at https://github.com/raphlinus/raphlinus.github.io/issues/80. Hopefully a real draft soon.

17014The d0=0 and d1=0 cases are boundary conditions. While keeping area exact, the moment goes through those cases smoothly, but the distance between curves (error metric) starts going up sharply when d is negative, and it's reasonable to reject those as unacceptable candidates without even measuring. (That's slightly less clear when doing offset curves, as you might be rendering a curve segment with a cusp, but I think it's valid even in that case).

So my current thinking is to throw those in as candidates, so you have up to six overall: four from the roots of the quartics, and d0=0 and d1=0. Then, as you point out, there's a potential issue that the tangent might not be accurate; in that case the tangent is determined by the second derivative as the first derivative is zero (L'Hospital). I'm going to look at handling those cases a bit differently - setting the other d to ensure the tangent (ie so the Bézier control point is at the intersection of the tangents) rather than the area, on the basis that tangents are more important.

(It might not be up to 6, though that's my current code. Rather, it might be better to consider these d=0 solutions when otherwise d would be negative.

The

hypothesisis that evaluating these candidates is exhaustive, that there isn't a better fit somewhere else out there in parameter space. I don't have proof of this yet, but I'm starting to believe it's true based on experimentation. It's possible that random testing would help.170θ₀ < 90° and 0 <θ₁ < 90° and 0 < moment < 1 and 0 < area < 1: There were plenty of cases where the real part of the complex roots were a better solution than the solutions I considered before. These cases were all for a small area and a big moment, which is probably unrealistic. When I changed to the condition 0.1 < area < 1, the real part of the complex roots wasneverthe best solution. My test may contain errors. Therefore I would like to ask you if you know at least one realistic case, where the real part of the complex roots is the best case.14I should also link my blog post, which has a bunch more detail on the refinements: https://raphlinus.github.io/curves/2022/09/09/parallel-beziers.html. That has live code as well. If you're handy with JS, it should be pretty easy to instrument that to print out the cases where the conjugate pair is the winning answer.