def mandelbrot(xint, yint, size, maxreps):
    width, height = size
    img = ImagePPM.new(size)
    for i in range(width):
        for j in range(height):
            a = lerp(i / width, xint[0], xint[1])
            b = lerp(1 - j / height, yint[0], yint[1])
            c = complex(a, b)
            img.putpixel((i, j), testpoint(c, maxreps))
    return img
def main():
    img = ImagePPM.open("sup.ppm")
    applyfn(f, img)
    img.save("sup2.ppm")
def main():
    img = ImagePPM.open("west_1.ppm")
    applyfn(f,img)
    img.save("west_2.ppm")