Bezier curves
... what i learned today , math , cabri
wed 2005-jan-19 20:30:37 pst
... permalink
Yesterday I learned the math behind Bezier curves. Ever since I first
started playing with a vector graphics program (probably MacDraw or
SuperPaint, way back in the day), I always wondered what they were,
and how those little handles manipulate the shape of the curve. Turns
out the math is pretty cool.
Of course there's a whole lot of algrebra surrounding it -- basically,
they're piecewise cubic polynomials. But what's most interesting is
the meaning of those little handles in the drawing programs. In
particular, there turns out to be this really elegant geometric
construction.
So given four points A, B, C, and D, and a value t between 0
and 1, construct the points E, F, and G as being a t-fraction
of the way along the segments AB, BC, and CD, respectively; then
construct points H and I to be a t-fraction of the way along
the segments EF and FG; and finally, construct J to be a
t-fraction of the way along the segment HI. The locus
generated by J as t goes from 0 to 1 is the generated curve.
In the applet above, you can drag A, B, C, and D around, and t
along the segment from 0 to 1. B and C correspond to the drawing
program's handles.
(I made this figure using Cabri
Geometry, a really cool geometry software package. They now also
have a 3D version, which is awesome as well.)
mail me
|