1. 14
  1.  

  2. 1

    I remember I had trouble some time ago when I tried to find an algorithm for drawing wide/stroked Bezier curves, as well as dashed ones; does anybody know if there’s some known reasonable algorithm for those? Drawing programs seem to do it somehow, but I’m not sure how. Or is it actually typically done after subdividing, maybe?

    1. 3

      This is called the parallel curve problem and is hard. Doing it after subdividing gives poor results (especially at cusps), as illustrated in the antigrain link. There are a bunch of papers that combine flattening with the offset curve. I’m personally probably most inclined to compute parallel curves of quadratic beziers (using recursive subdivision until the error bound is met), but there’s a bunch of literature about alternative techniques. A very good reference is the section of Pomax’s bezier primer.

      1. 1

        Cool, thanks! :)