Curve flatness measures how closely a curve follows the straight line joining its endpoints. It provides a practical stopping rule when drawing Bézier curves. section 2.2
A renderer can use flatness to decide when subdivision has gone far enough:
- Subdivide the Bézier curve repeatedly with de Casteljau’s procedure. section 2.2
- Estimate the curve’s deviation from its endpoint line using the height of the curve. section 2.2
- Replace the section with a straight line when the estimate is below a chosen tolerance, such as half a pixel. section 2.2
Adaptive line approximation
A fixed number of subdivision stages treats open and tight parts unevenly. A flatness test instead gives each part as many straight segments as needed; one curve may require 1 segment, another 25. section 2.2
Figure 2.10 An approximate measure of the flatness of a Bézier curve
Use the flatness diagram to see how the lengths A and B provide an easy upper-bound estimate for deviation from the endpoint line. section 2.2
