Animated Bézier Curves
jasondavies.com
jasondavies.com
Assuming you already have a parametric line function `line p q t` that interpolates between two points p and q on t in [0,1], you can recursively implement parametric Bézier on a list of control points as:
bezier [p] t = p
bezier ps t = line (bezier (init ps) t)
(bezier (tail ps) t)
t
It's exponential in the number of points though ;)(Full source at https://github.com/hrldcpr/Bezier.hs/blob/master/Bezier.hs)
One request: Please add pause/resume in the animation. I could just pause at any given time, and go through the state of all points. I hope it would help anyone to understand it much easily.