Rendering scaling fractals in JavaScript