A sine wave animation written in D3