def create_images(): i = 0 for n in np.arange(1, 5, 0.02): i += 1 p = (n - 2) * abs(n - 2) + 2 settings = Settings( transform=lambda z: power(z, p) + 1.5 * z - 0.5 - 0.25j, width=2000, height=2000, block_size=(1000, 1000), mirror_x=False) img = create_image(settings, verbose=True) img = img.filter(ImageFilter.GaussianBlur(1)) img = img.resize((1920, 1080))
def create_images(): step = 0.02 for n in np.arange(1, 5, step): i = int(round(n / step)) p = (n - 2) * abs(n - 2) + 2 settings = presets["throne"] settings.fn = lambda zn, c: power(zn, p) + c settings.width = 1920 * 2 settings.height = 1080 * 2 settings.block_size = (1000, 1000) img = create_image(settings, verbose=True) img = img.filter(ImageFilter.GaussianBlur(1)) img = img.resize((1920, 1080)) img.save(rf"{images_folder}\Pic{i}.jpg", optimize=True, quality=90)
def create_images(): i = 0 for n in np.arange(1, 10, 0.02): i += 1 p = (n - 2) * abs(n - 2) + 2 settings = Settings(tipe="buddha", fn=lambda zn, c: power(zn, p) + c, width=2000, height=2000, block_size=(1000, 1000), mirror_x=True) img = create_image(settings, verbose=True) img = img.filter(ImageFilter.GaussianBlur(1)) img = img.resize((1920, 1080)) img.save(rf"{images_folder}\Pic{i}.jpg", optimize=True, quality=90)
def worker(): while True: i = q.get() if i is None: break n = 1 + i / 50 p = (n - 2) * abs(n - 2) + 2 settings = Settings( transform=lambda z: power(z, p) + 1.5 * z - 0.5 - 0.25j, width=2000, height=2000, block_size=(1000, 1000), mirror_x=False) img = create_image(settings, verbose=True) img = img.filter(ImageFilter.GaussianBlur(1)) img = img.resize((1920, 1080)) img.save(rf"{images_folder}\Pic{i}.jpg", optimize=True, quality=90) q.task_done()
from mandelpy import create_image, presets, post_processing settings = presets["the_box"] settings.width = 8000 settings.height = 4000 settings.block_size = (1000, 1000) img = create_image(settings, verbose=True) img = post_processing.remove_centre_vertical_pixels(img) img = post_processing.remove_centre_horizontal_pixels(img) img = post_processing.blur(img) img = img.resize((2000, 1000)) img.save("the_box.jpg", quality=90)
from mandelpy import Settings, create_image settings = Settings() # Use the default settings to create the default mandelbrot img = create_image(settings) # Create a Pillow image from the settings img.save("hello_world.png") # Save it somewhere