import turtle SIZE=128 LEVEL=128 def mandel(c): z=0.0 for i in range(LEVEL): z=z*z+c if abs(z) > 256.0: return False return True turtle.speed("fastest") turtle.up() for x in range(SIZE): for y in range(SIZE): c= float(x)/SIZE + float(y)*1.0j/SIZE if mandel(c): turtle.goto(x,y) turtle.dot(1) c= float(x)/SIZE - float(y)*1.0j/SIZE if mandel(c): turtle.goto(x,-y) turtle.dot(1) c= -float(x)/SIZE + float(y)*1.0j/SIZE if mandel(c): turtle.goto(-x,y) turtle.dot(1) c= -float(x)/SIZE - float(y)*1.0j/SIZE if mandel(c): turtle.goto(-x,-y) turtle.dot(1) input("done?")