15. Julia Sets
The Mandelbrot set's infinite family of fractal siblings
The Mandelbrot set asks: for which values of c does the iteration stay bounded when starting from zero? A Julia set flips the question — it fixes c and asks: for which starting values z0 does the iteration stay bounded?
Every point in the complex plane defines a different Julia set. Some are fat, connected blobs. Others shatter into infinitely fine dust. The Mandelbrot set is the map that tells you which is which.
Same Formula, Different Variable
Both the Mandelbrot set and Julia sets use the same iteration:
The difference is what varies and what's fixed:
| Mandelbrot | Julia | |
|---|---|---|
| c | Varies per pixel | Fixed (one chosen value) |
| z0 | Always 0 | Varies per pixel |
| Question | Does this c escape? | Does this starting point escape? |
To render a Julia set, you pick a constant c, then for every pixel on the canvas you set z0 to that pixel's coordinates in the complex plane and iterate. The escape-time algorithm is identical — the only change is which variable maps to the pixel grid.
The Escape-Time Algorithm for Julia Sets
choose a fixed c
for each pixel (px, py) on screen:
z = map (px, py) to complex plane // z₀ varies per pixel
iteration = 0
while |z| <= 2 and iteration < MAX_ITERATIONS:
z = z * z + c // c is the same for every pixel
iteration++
color the pixel based on iteration count
The coloring works exactly as it does for the Mandelbrot set — smooth iteration counts mapped to an HSL gradient, with points that never escape colored black.
Connected vs. Dust
The most striking thing about Julia sets is how dramatically they change with c:
The Mandelbrot connection
If c is inside the Mandelbrot set, the Julia set for that c is connected — a single unbroken shape.
If c is outside the Mandelbrot set, the Julia set is totally disconnected — an infinite scattering of isolated points called a Fatou dust.
Points on the Mandelbrot set's boundary produce the most intricate Julia sets — baroque, infinitely detailed shapes right at the edge of shattering.
This is why the Mandelbrot set is sometimes called a catalog or parameter space of Julia sets. Each point in the Mandelbrot plane indexes an entire fractal.
Notable Julia Sets
Certain values of c produce Julia sets that are particularly famous or visually striking:
Dendrite — c = i (0 + 1i)
This c sits exactly on the Mandelbrot set's boundary, producing a connected but infinitely branching tree-like structure with no interior. Every point in the set is on the boundary.
Douady's Rabbit — c = -0.123 + 0.745i
Named after mathematician Adrien Douady, this Julia set consists of three large lobes connected at a central point, with each lobe sprouting three smaller copies, and so on — a fractal arrangement of triplets that resembles a rabbit.
San Marco — c = -0.75 + 0i
Named for its resemblance to the Basilica di San Marco in Venice, this Julia set features two large symmetric lobes connected at a single point, with smaller copies of the pair repeating along the boundary.
Spiral — c = -0.8 + 0.156i
This c value produces dramatic spiral arms radiating from the center, creating one of the most visually dynamic Julia sets.
Cantor Dust — c = 1 + 0i
Since c = 1 is well outside the Mandelbrot set, the Julia set is totally disconnected. The iteration z → z2 + 1 causes almost every starting point to escape quickly, leaving only an invisible scattering of measure-zero dust.
Try It: Julia Set Explorer
Pick a value of c by clicking the mini Mandelbrot on the left, or choose a preset. The Julia set for that c renders on the right. Click and drag on the Julia set to zoom in.
Julia Set Explorer
Why Julia Sets Look Like the Mandelbrot Boundary
Zoom into the boundary of the Mandelbrot set near any point c, and you'll see shapes that look like the Julia set for that c. This isn't a coincidence — it's a deep mathematical connection.
Near a point c on the Mandelbrot boundary, the set of nearby c-values that stay bounded forms a pattern that locally resembles the Julia set Jc. The closer you zoom, the better the resemblance. This is sometimes called Tan Lei's theorem (proved in 1990): the Mandelbrot set and the Julia set for a boundary point c are asymptotically similar at c.
This means the Mandelbrot set encodes every Julia set within its boundary. Each tendril, each spiral, each miniature copy in the Mandelbrot set corresponds to a family of Julia sets that share that same visual character.
The Filled Julia Set vs. the Julia Set
Technically, the Julia set Jc is only the boundary — the set of points where the iteration's behavior changes chaotically. The filled Julia set Kc includes the entire interior (all points that stay bounded). What we render with the escape-time algorithm is actually the filled Julia set, with the boundary revealed by the color gradient of escape times.
For connected Julia sets, Kc has a non-empty interior (the black region) and Jc is its fractal boundary. For disconnected Julia sets, Kc = Jc — there is no interior, just the dust.
Performance
The rendering approach is identical to the Mandelbrot explorer — iterate every pixel independently. The only change is which values are fixed and which vary. The same optimizations apply: smooth coloring for aesthetic gradients, and early bailout at |z| > 2.
The explorer above renders both a mini Mandelbrot (for picking c) and the full Julia set. Since only the Julia set changes when you pick a new c, the Mandelbrot only needs to render once.
What's Next
Julia sets and the Mandelbrot set share the same equation — they just explore different dimensions of the same mathematical space. Next, we'll leave the deterministic world of iteration and explore noise functions — controlled randomness that powers terrain generation, cloud textures, and organic motion in generative art.