Visualizations
385 / 500

385 · Math

Tessellation Morph

Drag one edge of an Escher-style creature and every copy reshapes while still tiling.

Six of Heesch's isohedral types, from TTTT (translations) and CCCC (half-turns) to TGTG (glide reflections) and the three- and four-fold C3 and C4 types. Only the master edges are free, Catmull-Rom splines through a few handles; each partner edge is computed from its master by the isometry that pairs them, and C edges are made symmetric under a half-turn about their own midpoint, so the tile always fits its neighbors. A breadth first search over the same isometries fills the screen, and a search over colorings of the form (class + a i + b j) mod n finds the fewest colors with no two neighbors alike. Every creature gets an eye at the point deepest inside the tile, and it watches your pointer.

Try it. Drag the dots on any edge of any tile and its partners move with it everywhere (a drag stops just before the tile would fold over itself). The highlighted tile shows which edges are linked (solid master, dashed copy). Click the type chips or press 1 to 6 or the arrows to change type, Space for a new random creature, R for straight edges and C for another palette. Left alone, a ghost hand sculpts the tiles.

  • Heesch isohedral types
  • Isometry-paired spline edges
  • Breadth-first tiling
  • Minimal coloring search

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 an Escher-style tessellation editor with JavaScript and the HTML canvas element: the screen is filled with interlocking creatures, and dragging a point on one tile's edge reshapes every copy while they still fit perfectly. 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, stays sharp on high-DPI screens (scale by devicePixelRatio), and resizes with the window.
- Start with the easiest case: a square tile whose bottom edge is a free curve and whose top edge is the same curve moved up by one tile, and likewise left and right. Store the bottom and left edges as a few draggable control points and draw each as a smooth Catmull-Rom curve.
- Build the tile outline in order: bottom edge, right edge (the left edge shifted right), top edge (the bottom edge shifted up, traversed backwards), left edge.
- Draw the same Path2D at every grid position with ctx.translate, alternating two colors like a checkerboard, with a dark outline.
- Let me drag the control points. Show them as small dots on every tile, and map a dot on any copy back to the master edge it came from.

Once that works, make it beautiful:
- Give every tile an eye placed at the point deepest inside the outline (sample a grid of points and keep the one farthest from the boundary), with a pupil that follows the mouse.
- Use a warm woodcut palette: cream, ochre, rust and slate with near-black ink.
- Add a second tile type where the left and right edges are linked by a glide reflection instead of a translation, so neighboring columns are mirror images.

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 hexagonal tiles with third-turn edges, filling the plane with a breadth first search over the edge pairings, or an autopilot that slowly sculpts the creature.
PreviousCache LinesFour loop orders of one matrix multiply race through a simulated cache hierarchy. NextHoney CoilingHoney falls onto toast and coils, loops and meanders like a real viscous rope.

Related visualizations

  • Einstein Hat TilingMath The 2023 aperiodic monotile, grown from its metatiles and morphed toward the spectre.
  • Hyperbolic TilingMath An endless koi garden of {p,q} ponds tiling the Poincare disk, with fish circling.
  • Multiscale TruchetGenerative art Truchet tiles at five scales lock together seamlessly, flipping color at each level.
  • Tutte EmbeddingAlgorithms A hopeless tangle of edges relaxes into a crossing-free drawing, as Tutte proved it must.
  • Girih Star PatternsGenerative art Interlaced Islamic star patterns built live from one angle over a hidden tiling.
  • Roman MosaicGenerative art Thousands of tesserae laid in rows that follow every outline, as a Roman mosaicist would.
  • Penrose PentagridMath Five grids of parallel lines dualize into a living Penrose tiling of stained glass.
  • Catalan BijectionsMath One Catalan object drawn five ways at once, linked piece by piece as it morphs.
  • Wallpaper GroupsGenerative art Paint once and any of the 17 plane symmetry groups repeats the stroke across the plane.

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

← More from Emergent Mind Labs