Approximate a circle with 4 Bézier curves:
A quadratic Bézier curve can be converted into a cubic Bézier curve:
Define the outline of a glyph:
Draw a tree plot:
Use
BezierCurve instead of lines to draw the edges:
Choose 4 points to be interpolated:
Compute distances between control points:
Compute normalized parameters with respect to the distances (chord length parametrization):
Since a Bézier curve interpolates endpoints, you only need to compute two intermediate points:
The formula for the interpolating Bézier curve:
Solve the equations:
Show the interpolating curve:
Generate a list of points to be approximated:
Fit to a cubic Bézier curve, using Bernstein polynomials:
Show the data with the curve:
Construct control points from the coefficients:
Show the data with the curve:
Linear transition from one Bézier curve to another: