Playing the chaos game with javascript!