GOAL: to draw an interactive cubic Bézier curve.
DUE: 11:59pm 1 April
SUBMISSION: send your python code (two files) to me via an e-mail.
A sample pyton files
(courtesy of Hyunjun Kim)
You need to draw a cubic Bézier
curve defined by the four control points.
You can draw a curve by
approximating it with
a piecewise linear curve
defined by uniform samples on the curve
(e.g., for t=0, 0.01, 0.02, ..., 0.99, 1.0).
You need to implement two versions for curve evaluation.
One using the de Casteljau algorithm
and the other using
the Bernstein basis functions.
When the control polygon is modified
the curve also needs to be updated accordingly.