js implementation of Mandelbrot set