Skip to content

Instantly share code, notes, and snippets.

@hop
hop / mandelbrot.py
Created August 18, 2022 14:25
unfinished example of how to render to a tkinter PhotoImage, pixel by pixel
import tkinter as tk
WIDTH, HEIGHT = 512, 512
TOP, LEFT = 1.5, -2.0
BOTTOM, RIGHT = -1.5, 1.0
STEPS = 256
def mandelbrot(x, y):
a = b = 0