Extra credit to anyone who can implement this in HTML/CSS without using the canvas element. Since CSS transformations are hardware accelerated, I bet it can be made to look as smooth as the reference GIF.
Re: T * sin (t) ≈ Christmas tree
#21Still canvas, but is that any smoother?: http://jsfiddle.net/rYa5d/8/