Some javascript canvas code for fractals