Every pixel is a number. Every number gets a test.
The screen is a map of the complex plane. Across is the real part, up is the imaginary part, so each pixel is one number c = x + yi. The explorer runs the same short formula on that number again and again. Some points stay close to home forever; others fly off to infinity. Drag the point below to see it happen.
Amber line: the orbit, z₀ → z₁ → z₂ … Dashed circle: radius 2. Once an orbit crosses it, the point is certain to escape.
| n | Re z | Im z | |z| |
|---|
Pick a pixel
Its horizontal position is the real part, its vertical position the imaginary part.
Iterate
Start at zero, square, add c, repeat. Squaring a complex number uses i² = −1.
Watch for escape
If |z| ever passes 2, the orbit diverges to infinity. If it survives every iteration, the point is in the set.
Color it
Escape count, smoothed and put on a log scale, picks a spot on the palette. Points that never escape get the interior color.
Mandelbrot and Julia
The demo above is Mandelbrot style: the pixel is c, and every orbit starts at zero. In Julia style it flips. You fix c with the c pad, and the pixel becomes the starting z₀. Every point of the Mandelbrot set has its own Julia set, which is why sweeping the c pad makes the picture breathe.
Why the edge never ends
Near the boundary, points take hundreds of steps to decide. Zoom in and the boundary keeps producing new detail, with no smallest scale. That is what Dive autoplay chases. Raise the iteration count as you go deeper, or the edge turns to mush.
Nine rules for the same game
Each formula changes step 2. The escape test and coloring stay the same.
| Formula | Each step | What to look for |
|---|---|---|
| zⁿ + c | z ← zⁿ + c | Set n on the n pad. Real n gives n−1 bulbs; a complex n twists the set. |
| z² | z ← z² + c | The classic Mandelbrot. |
| z³ | z ← z³ + c | Two-fold symmetry, twin cardioids. |
| Burning Ship | z ← (|Re z| + i|Im z|)² + c | Folding the signs builds the hull and masts. |
| Tricorn | z ← z̄² + c | Conjugate first; three-pointed body. |
| Celtic | z ← |Re z²| + i·Im z² + c | Knotwork-like filaments. |
| Phoenix | z ← z² + c + p·zprev | Remembers the previous step; feathered spirals. |
| sin(z)·c | z ← c·sin z | Periodic, ribbon-like growth. |
| c·eᶻ | z ← c·eᶻ | Exponential map; hairy tendrils. |
Using the cockpit
Works in portrait or landscape. On a phone the console folds into two rows and the palette bay opens as a sheet.
- Move
- Drag to pan, scroll or pinch to zoom, or use the edge arrows and +/−.
- Style
- Mandelbrot or Julia. In Mandelbrot mode the c pad sets the starting seed z₀.
- Formula
- Pick one of the nine rules above.
- n pad
- A complex trackpad for the exponent: across is real, up is imaginary.
- c pad
- Same, for the constant. Fine slows movement 20×. Double-tap a pad to reset it.
- Iterations
- 10 to 1000. More iterations sharpen the edge and cost speed.
- Autoplay
- Drift orbits c so the shape morphs. Dive zooms endlessly toward the edge. Both runs them together, with a speed control.
- Camera
- Saves the current view to Photos. Long-press or right-click a shot to save it.
- Hide
- Press H, or double-tap the top edge, to clear the screen.
Paint with a photograph
Pick a photo from the Library (landscapes, oceans, cities, patterns) or load your own. Two sticks lie across it, and each one samples colors from the pixels under it.
Drag either end anywhere on the photo. Switch a stick to Area and it becomes the diagonal of a box: the interior box maps real part across and imaginary part down, so the photo is laid onto the complex plane itself. Tile repeats that box forever in every direction, mirrored at each edge so no seams show; the Tile size slider sets how many copies fit.