Spiralyst Lab logo Spiralyst Lab ← All fractals 3D · orbit

3D fractal

Apollonian 3D

Live turntable captured from Spiralyst Lab.

This is sphere-packing lifted into three dimensions — bubbles nested within bubbles within bubbles, filling space in an effervescent foam. It is built by repeated spherical inversion rather than the circle arithmetic of its two-dimensional namesake.

Bubbles All the Way Down

Lift the idea of the Apollonian gasket out of the plane and into space and you get a foam of spheres: bubbles nestled against bubbles, every gap filled by smaller spheres, recursively, forever. It has a soft, effervescent quality the angular fractals lack — all curves and nesting, like sea-foam frozen mid-fizz, or a cluster of soap bubbles seen from inside.

It is worth being precise about how it is actually built, because it differs from its 2D namesake. The 2D Apollonian gasket is constructed from Descartes' Circle Theorem — exact arithmetic on curvatures. This 3D version is instead a ray-marched limit set, generated by alternating a modular fold (which wraps space into a repeating cell) with a spherical inversion (which throws points outward through a sphere). The two operations together generate an infinite group whose limit set is the nested-sphere packing you see. It looks like a volumetric Apollonian gasket, but the engine is inversion geometry, not the circle theorem.

That makes it a close conceptual cousin of the pseudo-Kleinian fractal — both are inversion-fold limit sets — distinguished by its rounder, bubbier, more closed character.

modular fold: p → −1 + 2·frac(½p + ½)

Wrap space into a repeating unit cell, so the inversion that follows acts on infinitely many copies at once.

spherical inversion: k = K / |p|², p → p·k

Throw points outward through a sphere of strength K. Alternating this with the fold generates the nested-sphere limit set.

DE = 0.25 · |p_y| / scale

A conformal distance estimate from the accumulated inversion scaling — what lets the packing be ray-marched in real time.

In Spiralyst Lab

Spiralyst Lab builds this by inversion, not Descartes circles: a fractional-wrap fold alternating with a spherical inversion whose strength K is the headline control, rendered with a 0.25·|p_y|/scale distance estimate. Packing density follows from K and the iteration count; a touch of glow on the small spheres gives it real sparkle as the camera orbits.

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.

ParameterRange (in-app)
Inversion K0.7 – 1.7
Iterations3 – 12
Surface ε0.0001 – 0.005
Ray steps16 – 200

Audio-reactive by default: uK 0.9→1.6, fov 0.8→1.6. 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).

Apollonian 3D still 1 Apollonian 3D still 2 Apollonian 3D still 3

Watch it in action

Full-length showcase video — coming soon
assets/video/fractals/24-apollonian-3d.mp4

Did you know: The exact arithmetic of 3D sphere packing was published by the Nobel-winning chemist Frederick Soddy as a poem, 'The Kiss Precise', in Nature in 1936 — though this fractal reaches a similar look by a different, inversion-based road.

Get Spiralyst Lab — $24.99/yr ← Back to the gallery