Drawing a Julia fractal with JavaScript on Canvas