Adaptive Subdivision of Bezier Curves

Created on 2021-01-28T23:12:18-06:00

Return to the Index

This card pertains to a resource available on the internet.

This card can also be read via Gemini.

Use De Casteljau's method but change the flatness test.

Stroking a path of a single pixel in width works perfectly fine with the cheap lineness test. Line of larger width require changing the condition beziers are broken on.

Calculate angle of lines with points (p0, p1) and (p2, p3); if the angles are outside of tolerance then split the line.

Calculate if one or both halves of the line are "colinear."

Four special cases: both halves are good, one of the halves is colinear, all halves are colinear.

Background

Calculating arbitrary points on cubic curves.

Incremental method: evaluating every point of the curve. Slow.

Segmenting method: decomposing the curve in to much shorter lines and rendering lines. Cheap but need to know what the subordinate lines are.

Adaptive method: calculate total number of points needed based on some heuristic like length. Cheap but does not work well on extreme edges.

De Casteljau method: subdivide beziers until sufficiently line-like. Works very well but highly dependent on the flatness test.