logo

Functions

Approximates a cubic bézier segment with a sequence of quadratic béziers.

Approximates a cubic bézier segment with a sequence of quadratic béziers.

This is terrible as a general approximation but works if the cubic curve does not have inflection points and is “flat” enough. Typically usables after subdiving the curve a few times.

Evaluates an upper bound on the maximum distance between the curve and its quadratic approximation obtained using the single curve approximation.