Visualizations
068 / 500

068 · Generative art

Kintsugi

A glazed tea bowl shatters along branching cracks, then is mended with flowing gold.

The bowl is a surface of revolution: its profile (foot ring, belly, rim and inner wall) is swept around the axis and splatted into a z-buffer that keeps each pixel's normal and surface coordinates, so the glaze (hare's fur streaks, drips above a raw clay foot, speckles, a pooled well) is painted in surface space and relit every frame with Blinn-Phong highlights and a Fresnel sheen. The fracture runs on a Voronoi diagram whose seeds crowd around the impact, where stress is highest. Crack tips race along cell edges from the vertex nearest the blow, prefer the edge that deflects them least, fork more often near the impact, join cracks they run into and stop at the silhouette, and union-find merges the cells no crack separates into shards with shared jagged edges. The shards spring apart showing raw clay at the breaks, glide back, and gold lacquer flows along the seams in the order the cracks were born; old gold is baked into the next break, so a bowl keeps its history.

Try it. Click the bowl to strike it wherever you like, then click or press R to repair it with gold. N drops a new bowl with another glaze (tenmoku, celadon, shino, ruri), and dragging or the arrow keys move the light so the gold catches it.

  • Surface of revolution
  • Z-buffer splatting
  • Voronoi fracture
  • Union-find
  • Blinn-Phong shading

View the source · one module, plus a small shared runtime for sizing, the animation loop and input

Build your own

Paste this into Claude Code, Codex or any coding agent to get a simple version running, then take it wherever you like.

Build a kintsugi animation with JavaScript and the HTML canvas element: a bowl breaks and is mended with gold. Put everything in a single index.html file with no libraries or build step, so I can open it directly in a browser.

Start simple:
- Make a canvas that fills the window and stays sharp on high-DPI screens. Use a dark, warm background.
- Draw a bowl in side view as a shaded shape: a wide ellipse for the rim opening, a curved body below it, and a small foot ring, filled with gradients so it reads as glossy glaze.
- When I click the bowl, scatter about 60 random points around it, denser near the click, and build their Voronoi cells by clipping a big rectangle with the perpendicular bisector to every other point.
- Grow cracks from the cell corner nearest the click: at each corner pick the next cell edge that turns the least, sometimes fork, and stop at the bowl's outline or when meeting another crack.
- Merge cells that no crack separates (union-find) into shards, and animate each shard (clipped from an image of the bowl) springing a little apart, then gliding back.

Once that works, make it beautiful:
- Draw gold along the cracks, flowing outward from the impact in the order the cracks formed, with a small glowing bead at each front.
- Shade the gold like a raised bead of lacquer: brighter where a segment runs across the light, with a thin highlight on the side facing it.
- Roughen every crack edge with seeded noise so neighboring shards share the same jagged boundary, and show a pale clay color on the broken faces while the pieces are apart.
- Add speckles and soft streaks to the glaze and a contact shadow on the table.

Explain the key ideas in short code comments. When you're done, tell me how to open it and suggest three directions I could take it next, such as rendering the bowl per pixel as a true surface of revolution with a moving light, keeping old gold seams through new breaks, or different glazes.
PreviousBubble Bank ShooterA pastel bubble shooter whose AI traces 640 bank shots before every throw. NextRegex AutomatonType a regex and watch it compile into an NFA, a DFA and a minimal DFA.

Related visualizations

  • Shattered PanePhysics A sunny window breaks into radial and ring cracks, then shards tumble and glint.
  • Drying MudSimulation Wet clay dries and cracks into a lakebed of curling plates, primaries first.
  • Basalt ColumnsNature Cooling lava cracks into columns that drift toward hexagons, on an isometric causeway.
  • Celtic KnotworkGenerative art Manuscript knot panels woven from a grid of breaks. Click to reweave the threads.
  • Voronoi MosaicMath Drifting seeds divide the plane into a living stained-glass mosaic.
  • Glenz VectorsRetro Nested glassy checkered polyhedra bounce on a glossy floor, then shatter and rebuild.
  • Floral OrnamentGenerative art Scrolls, acanthus leaves and flowers grow to fill any frame, like an engraver's panel.
  • Differential GrowthGenerative art One closed line grows, buckles and folds into brain coral without ever crossing.
  • Zen GardenGenerative art Raked gravel in low morning sun, its furrows flowing around mossy stones.

Use ← and → to move between demos. While the canvas has focus, keys go to the demo instead.

← More from Emergent Mind Labs