Sitemap
Science Spectrum

Science Spectrum is here to guide you on your personal path to understanding the fascinating world of science, mathematics, and related topics. Our goal is to make complex concepts accessible to everyone.

Member-only story

Fractals in Code: Exploring Julia Sets with Python

4 min readFeb 20, 2025

--

Don’t have access? Click here to read for free.

Press enter or click to view image in full size
A Julia Set

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.

--

--

Mark Pedigo, PhD
Mark Pedigo, PhD

Written by Mark Pedigo, PhD

Mark Pedigo, PhD, is a data scientist and technical writer. Profile: https://markpedigo.github.io/ LinkedIn: https://www.linkedin.com/in/markpedigo/

Science Spectrum
Science Spectrum

Published in Science Spectrum

Science Spectrum is here to guide you on your personal path to understanding the fascinating world of science, mathematics, and related topics. Our goal is to make complex concepts accessible to everyone.