Bézier curves in Haskell
github.com
github.com
Given a list of n points it generates an n-degree Bézier curve. The complexity of this is O(2^n) so even a 20-point curve could be quite slow.
(In "real" graphics code this is avoided by using, e.g. a second-degree curve, regardless of the number of points. But the implementation of that doesn't have as pretty a recursive structure imho.)