- 4.3K All Categories
- 31 Introductions
- 3.4K Typeface Design
- 707 Font Technology
- 985 Technique and Theory
- 526 Type Business
- 413 Type Design Critiques
- 514 Type Design Software
- 29 Punchcutting
- 122 Lettering and Calligraphy
- 72 Technique and Theory
- 50 Lettering Critiques
- 419 Typography
- 267 History of Typography
- 102 Education
- 50 Resources
- 454 Announcements
- 68 Events
- 100 Job Postings
- 140 Type Releases
- 145 Miscellaneous News
- 253 About TypeDrawers
- 51 TypeDrawers Announcements
- 107 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.

15614The 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.156θ₀ < 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.