Fast, precise flattening of cubic Bzier path and offset curves ?
We present two related algorithms for flattening (generating polyline approximations for) curves associated with planar cubic Bzier segments. One flattens the path curve, and the other flattens the left and right offset curves. The algorithm for flattening path curves yields an average of 67% of the vertices generated by recursive subdivision, while maintaining flatness to within 4% of the specified value, and runs 37% faster. The algorithm for flattening offset curves generates 70% of the vertices as the methods based on recursive subdivision, such that 94% of all subsegments fall within 20% of the flatness criterion. This latter code runs as fast as recursive subdivision.
flattening offset curve bzier curve rendering