Keys: ← → to move, N for notes, F for full screen
Today we will learn to:
p = random point repeat 100000 times: v = random corner p = (p + v) / 2 plot p
Four affine maps:
The 85% map:
x′ = 0.85x + 0.04y
y′ = −0.04x + 0.85y + 1.6
for each pixel (px, py): c = point of the plane at (px, py) z = 0; n = 0 while |z| <= 2 and n < max_iter: z = z*z + c n = n + 1 colour the pixel by n
z² + c with z = x + yi: x′ = x² − y² + cx, y′ = 2xy + cy
x = x*x - y*y + cx y = 2*x*y + cy
Find the bug!
Estimate the worst-case number of iterations for a 1920 × 1080 image with max_iter = 500.