python -c "import Image,math;im=Image.new('L',(480,480));im.fromstring((lambda Ru,Ro,Iu,Io,IM,Sx,Sy:reduce(lambda x,y:x+y,map(lambda y,Iu=Iu,Io=Io,Ru=Ru,Ro=Ro,Sy=Sy,L=lambda yc,Iu=Iu,Io=Io,Ru=Ru,Ro=Ro,i=IM,Sx=Sx,Sy=Sy:reduce(lambda x,y:x+y,map(lambda x,xc=Ru,yc=yc,Ru=Ru,Ro=Ro,i=i,Sx=Sx,F=lambda xc,yc,x,y,k,f=lambda xc,yc,x,y,k,f:(k<=0)or (x*x+y*y>=4.0)or 1+f(xc,yc,x*x-y*y+xc,2.0*x*y+yc,k-1,f):f(xc,yc,x,y,k,f):chr(256-int(math.sqrt(F(Ru+x*(Ro-Ru)/Sx,yc,0,0,i))*256/math.sqrt(i))),range(Sx))):L(Iu+y*(Io-Iu)/Sy),range(Sy))))(0.383,0.384,0.2337,0.2347,800,480,480));im.save('m.gif');im.show()"

(-2.1,0.7,-1.4,1.4,256,480,480)

import Image, math Ru, Ro, Iu, Io, IM, Sx, Sy = 0.383, 0.384, 0.2337, 0.2347, 800, 480, 480 #Ru, Ro, Iu, Io, IM, Sx, Sy = -2.1, 0.7, -1.4, 1.4, 256, 480, 480 def mandelbrot(x, y, IM): c, z, i = complex(x, y), complex(0, 0), 0 while abs(z**2) < 4.0 and i < IM: z = z**2 + c i += 1 return 256 - int(math.sqrt(i) * 256 / math.sqrt(IM)) im = Image.new("L", (Sx, Sy)) im.putdata([mandelbrot(Ru + (x / float(Sx)) * (Ro - Ru), Iu + (y / float(Sy)) * (Io - Iu), IM) for y in range(Sy) for x in range(Sx)]) im.save("m.gif") im.show()