🌀 Fractalize — what is this?
Fractalize grows a fractal out of your photograph. The photo isn't pasted on top — it's woven into the fractal's structure, so its colours and shapes reappear along the filaments and spirals.
How a fractal is made here
Every pixel on screen is a point c on the complex plane. We repeat a
simple rule — for the Mandelbrot set, z → z² + c — over and over and
watch what the running value z does:
- If z stays bounded forever, the pixel is inside the set.
- If z flies off to infinity, the pixel escapes — and how quickly it escapes is what classic fractal colouring is built on.
Each family bends the rule a little: Julia fixes c and varies the
start point; Burning Ship takes |z| each step; Tricorn
conjugates it; Celtic, Buffalo and Heart fold the squared term
with absolute values for spikier, mirror-symmetric forms; Phoenix mixes in the
previous z (its phoenix p slider) for woven, feather-like sets. The
power slider raises z to higher (even fractional) exponents on any family — set
it above 2 on Mandelbrot for the classic Multibrot lobes.
The orbit trap can also be a Voronoi (cellular) field: instead of measuring the orbit against a point or line, it measures distance to a lattice of scattered cell sites, scattering your photo through a crystalline, stained-glass structure. The voronoi density slider sets the cell size.
Where your photo comes in: orbit traps
As z bounces around during the iteration, it traces a path — an orbit. We watch how close that orbit comes to a chosen shape (a point, a line, a cross, a circle) and remember the spot of closest approach. That spot is then used as a coordinate to look up a colour in your photograph.
Because nearby pixels have orbits that graze the trap at slightly different places, the photo gets stretched and folded along the fractal's natural contours. This is what makes the image become the fractal rather than sit behind it.
Colour modes
- Photo · orbit trap — sample the photo at the orbit's closest approach to the trap. The most "painterly" mode.
- Photo + palette hybrid — blend the orbit-trap photo with a gradient built from the photo's own dominant colours.
- Photo · final z — sample the photo at the orbit's final position instead of its closest approach. Wilder, more scattered.
- Iteration palette — classic escape-time colouring, but the gradient is extracted from your photo by median-cut.
The controls, group by group
Photograph — load an image, then optionally drag a rectangle on the preview to feed only a section of it into the fractal. The swatch strip shows the extracted palette; the histogram shows tone distribution.
Fractal — type, power, iteration count (higher = more detail in thin filaments, but slower), and escape radius (larger radii smooth the colour bands).
Julia seed — only matters for Julia type. Nudge c.re/c.im or
click pick seed and then click anywhere on the canvas to lift a seed
straight off the plane.
View — drag to pan, scroll to zoom toward the cursor, rotate, reset.
Coloring — the heart of the look. Trap shape and position decide which part of the orbit drives the image; image scale / rotate / offset control how the photo maps onto the orbit space; palette shift & density cycle the gradient; mix balances photo against palette / interior.
Post — brightness, contrast, saturation, gamma, applied after everything.
Export — render at up to 4× screen resolution to a PNG. Randomize look reshuffles the colouring controls for happy accidents.
Shape-conform mode
Normally a Julia set makes an abstract blob. This mode bends it into the silhouette of your photo while keeping fractal detail fringing the edges — a 2D take on Schor & Kim's shape modulus (SGP 2023).
It works by splitting the fractal map into a modulus (magnitude, which
controls the coarse shape) and a versor (direction, which controls the fine
texture). We threshold the photo into a silhouette, compute its signed distance
field φ, and replace the modulus with e^(α·(φ+β)). Points
deep inside the shape collapse into the set; points outside escape; fractal detail
survives in the shell straddling the surface.
- thinness α — how tightly detail hugs the silhouette (higher = thinner).
- offset β — pushes the detail shell in or out from the edge.
- mask threshold / invert — choose which part of the photo is the "shape" (bright subject vs dark, etc.).
- The Julia seed sliders now pick the texture of the fringe.
Coloring still comes from your photo via the orbit traps. (This mode uses a custom map, so it's about shape-fitting rather than the infinite zoom below.)
Deep zoom
Plain 32-bit GPU maths goes blocky after a few thousand × zoom. Past that point
Fractalize automatically switches the power-2 fractals (Mandelbrot, Julia, Burning
Ship, Tricorn) to an emulated double-float path — two float32s acting as one
higher-precision number — which keeps detail crisp out to roughly a billion ×. The
HUD shows hi-precision when it's active. (Fractional powers stay in
single precision, so zoom is shallower there.)
Video
The Video panel renders an animation entirely in your browser and encodes it to an mp4 with ffmpeg (WebAssembly). Two ways to use it:
- Zoom dive (default). With no keyframes, it pulls back from your current view and dives smoothly into it — palette gently cycling on the way.
- Keyframe path. Set up a view, hit + keyframe, change anything (pan, zoom, recolor, rotate, move the Julia seed), add another keyframe, and so on. Render tweens through them — zoom is interpolated geometrically so it feels even.
Pick duration, fps, size (incl. square & vertical for social), and quality. Frames are rendered one at a time at full quality — slower than realtime but perfectly smooth on playback. The first render downloads the ~30 MB encoder core once.
Tips
- Zoom into the boundary of the set — the busy edges are where orbit traps put the most photo detail.
- High-contrast photos with a few bold colours read best.
- Crop to a face or a single object, then set a point trap and small image scale for a kaleidoscopic portrait.
- Low iterations + large escape radius gives soft, smoky colour; high iterations gives crisp, threadlike structure.
Privacy & tech
Everything runs in your browser on the GPU (WebGL). Your photo never leaves the device — there's no upload and no server.
Part of a small series of photo experiments: /astro (read a photo's sky by its timestamp) · /prism (the camera through a prismatic cornea).