This page hosts an all‑in‑one interactive sampler of random domino tilings of the Aztec diamond. The sampling is done by the traditional shuffling algorithm. The original python code was created by Sunil Chhita, and here it is adapted to JavaScript
and WebAssembly
.
See also the individual simulations page which include bite-size examples with more readable code.
Two complementary visualizations are available:
- 3‑D height‑function view – A rendering of the stepped surface encoding the domino tiling. The 3-D visualization is inspired by Alexei and Matvey Borodin's work while being rewritten here in modern
WebGL/Three.js
, and with interactive sampling by shuffling. Large sizes ($n > 100$) may take a while; everything is computed client‑side, so be patient on slower machines.
- 2‑D SVG view – A faster 2-D drawing that adds several friedly overlays:
- checkerboard coloring of the underlying grid
- grayscale shading for distinguishing domino orientations (handy for the gas phase of the $2 \times 2$ periodic model)
- non‑intersecting Motzkin (or Scrhoeder) paths
- dimers inscribed into dominos
- integer‑valued height function labels (shown only for orders $n \leq 30$ to avoid clutter).
- Glauber dynamics – Markov process of flipping pairs of adjacent dominoes forming a square. It uses
the currently selected parameters - so you can sample a tiling with one set of parameters, and evolve it into another.
See what happens!
There is also an on‑the‑fly LaTeX/TikZ export, which supports all 2-D viewmodes.
Use the controls below to switch between uniform, \(2 \times 2\), and \(3 \times 3\) periodic weightings, adjust border thickness, zoom/pan, and copy or download the generated TikZ code.
Tip. The simulation caches the most recent tiling in localStorage
; press Sample again to force a fresh run.
Last updated: 2025-04-21
Dear colleagues:
Feel free to use code (unless otherwise specified next to the corresponding link),
data, and visualizations to illustrate your research in talks and papers,
with attribution (
CC BY-SA 4.0).
Some images are available in very high resolution upon request.
I can also produce other simulations upon request - email me at
lenia.petrov@gmail.com