Member-only story
Fractals in Code: Exploring Julia Sets with Python
Generating Complex Beauty Through Simple Code
Don’t have access? Click here to read for free.
In he 1990s, I was a young Gen Xer. Nirvana filled the air with “Smells Like Teen Spirit.” O.J. Simpson was all over the news. Seinfeld ruled TV. Fractals appeared everywhere. You could see them on posters, on TV, and even in the mountains of the latest Star Trek movie. Aspiring programmers wrote screensavers featuring fractal patterns.
They look cool, but what are fractals? They are shapes that show self-similarity at various scales. This means their patterns repeat in smaller versions infinitely. As a result, they form complex and intricate structures. You can find a detailed answer from ChatGPT, many books, or various online sources. Check out my review of “Fractals: A Very Short Introduction” for more information.
Julia Sets
Consider the function z → z². Let’s take a complex point, say z = 1 + 2i, and iterate it over this function. We get 1 + 2i → -3 + 4i → -7 - 24i → -527 + 336i and so forth. Each iteration increases in magnitude and will eventually diverge to infinity. Let’s try another z, say z = 0.5 + 0.5i. Now, let’s consider z = i. Its iterates are i → -1 → 1 → 1 → …. So the iterates of z = i converge to 1.








