Quad. Bezier Interpolation
As I’m winding down on a long gig, I hope to return to answering questions and doing more work on Degrafa. The backlog of questions is in the hundreds, so I’m going to start with recent topics first. This question involves quadratic Bezier interpolation or fitting a quad. Bezier through three points. It seems to involve selection of the t-parameter at the inner control point. The first and last control points, P0 and P2 are fixed at t=0 and t=1. The problem involves selection of the inner control point, P1, so that the Bezier curve passes through some specified point, P.
This problem is actually over-determined; that is, there are more degrees of freedom than constraints. The online demo is here, including a link to TechNotes providing the equations. P1 is not uniquely determined given P. We must also choose the t-parameter at which the quad. Bezier passes through P. This selection influences the shape of the curve. Although the so-called midpoint formula has been floated around in the Flash community, the Singularity code uses a chord-length parameterization to choose t.
The same problem exists for fitting a cubic Bezier through four points, although now we are free to choose two t-parameters at inner interpolation points. This is implemented in Degrafa using a uniform parameterization.
Hope this helps.