sinewave generator using js + canvas