Draw lissajous curves in HTML5 canvas elements