Module lyon_geom::cubic_to_quadratic [] [src]

Functions

cubic_to_quadratic

Approximate a cubic bezier segment with a sequence of quadratic bezier segments.

inflection_based_approximation

Approximate the curve by first splitting it at the inflection points and then using single or mid point approximations depending on the size of the parts.

mid_point_approximation

Approximate a cubic bezier segments with four quadratic bezier segments using using the mid-point approximation approach.

monotonic_approximation
single_curve_approximation

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