Fractals in javascript