3D fractal
Quaternion Julia
Live turntable captured from Spiralyst Lab.
The quaternion Julia set runs the Julia iteration in four-dimensional numbers and then takes a three-dimensional slice through the result, like cutting a slab from a loaf. Its surfaces are smooth and liquid-metal, and sliding the slice morphs the whole cross-section.
A Slice Through the Fourth Dimension
Quaternions are four-dimensional numbers — one real part and three imaginary ones (i, j, k) — invented by William Rowan Hamilton in 1843. They multiply by their own strange rules: order matters, so i·j and j·i point opposite ways. Run the same Julia iteration that makes the 2D fractal — square the number, add a constant — but in quaternion space, and you get a genuine four-dimensional Julia set.
We cannot see four dimensions, so the fractal is rendered by taking a three-dimensional slice through it, like cutting a slab from a loaf of bread. Hold the fourth coordinate fixed and you see one 3D cross-section; slide it and the cross-section morphs continuously, the lobes flowing and reconnecting. The surfaces are famously smooth and rounded — a liquid-metal, poured-not-computed quality quite unlike the Mandelbulb's crusty skin.
Quaternion Julia sets were among the first 3D fractals ever rendered, in a celebrated 1989 effort, and they remain the most sculptural members of the family — the ones that look carved from chrome.
A quaternion: four components, multiplied by Hamilton's non-commutative rules where i·j = k but j·i = −k.
The Julia rule, now in quaternion arithmetic — the squaring uses the full Hamilton product.
Hold the fourth coordinate w constant to get a 3D solid; sweeping w animates the morph. The distance estimate carries a running derivative dq.
In Spiralyst Lab
Spiralyst Lab squares quaternions with the true Hamilton product, fixes the slice coordinate w (default 0, animatable) to take the 3D cross-section, and renders with the 0.5·|q|·ln|q|/|dq| distance estimate. The seed constant c (all four of its components are adjustable) plus the slice position give an enormous morphing space; the camera orbits the result, which is loveliest under soft lighting that lets its rounded lobes read.
Every parameter below is a live control — set it by hand, map it to a frequency band, or let it ride a smooth animation. These ranges are the actual in-app slider limits.
| Parameter | Range (in-app) |
|---|---|
| c.x | -1.5 – 1.5 |
| c.y | -1.5 – 1.5 |
| c.z | -1.5 – 1.5 |
| c.w | -1.5 – 1.5 |
| Slice w | -1 – 1 |
| Bailout | 1 – 16 |
| Iterations | 4 – 16 |
| Surface ε | 0.0001 – 0.01 |
| Ray steps | 32 – 256 |
Audio-reactive by default: sliceW -1→1 (cross-section), cx -1.5→1.5. Any control can be mapped to audio or animation.
Plus the universal 3D controls every ray-marched type shares: camera (yaw, pitch, distance, FOV) and lighting (light direction, ambient, fog density, glow falloff).
Watch it in action
assets/video/fractals/18-quaternion-julia.mp4
Did you know: Hamilton was so thunderstruck when the quaternion multiplication rules came to him on a walk in 1843 that he carved them into the stone of Dublin's Broom Bridge. The same algebra now rotates every 3D game camera — and sculpts this fractal.