This simulation computes and visualizes perfect T-embeddings of the Aztec diamond graph with arbitrary edge weights. For the mathematical definitions and recurrence formulas, see the "Perfect T-embeddings and their computation" section below.
The Dimer covering button samples dimer configurations on an Aztec diamond of size N = n − 3, where n is the T-embedding order. The key correspondence is:
Two view modes are available:
Note: Boundary faces are not used. This is just a smaller-size sample (Aztec diamond of size N = n−3) placed onto only the interior quadrilateral faces, for illustration purposes.
The Dual checkbox shows the dual graph of the T-embedding, with vertices at face centers and edges connecting adjacent faces. Two embedding modes are available:
The V and E controls adjust vertex size and edge thickness for the dual graph independently of the T-embedding.
The 🎲 Sample button generates random domino tilings of the Aztec diamond using the domino shuffling algorithm with the currently selected edge weights.
Tip: Press Enter in the Size or Border fields to quickly re-sample.
For small n, explore the T-embedding recurrence level by level:
For small n, this section provides:
Measures computation time for n = 10 to 40 and fits a power law t(n) = c·nα. Uses the currently selected weight preset.
The notion of a t-embedding (also known as a Coulomb gauge) was introduced in [KLRR] and further developed in [CLR1], [CLR2].
Let $\mathcal{G}$ be a weighted, finite, bipartite, planar graph with a marked outer face $f_{\mathrm{out}}$, and let $\mathcal{G}^*$ denote its augmented dual graph. A t-embedding of $\mathcal{G}$ is an embedding $\mathcal{T}: \mathcal{G}^* \to \mathbb{C}$ such that:
A t-embedding $\mathcal{T}$ of a finite weighted planar bipartite graph $\mathcal{G}$ is called perfect if the following additional boundary conditions are satisfied:
Given edge weights $\chi$ on a bipartite graph $\mathcal{G}$, one can associate a face weight $X_{v^*}$ to each face of $\mathcal{G}$ by $$X_{v^*}:=\prod_{s=1}^d\frac{\chi_{b_s w_s}}{\chi_{b_s w_{s+1}}},$$ where the face $v^*$ has degree $2d$ with vertices denoted by $w_1, b_1, \ldots , w_d, b_d$ in counterclockwise order (white vertices $w_i$, black vertices $b_i$, and $w_{d+1}:=w_1$).
The T-embedding $\mathcal{T}$ of the Aztec diamond of size $n$ is computed iteratively as a sequence of embeddings $\mathcal{T}_0, \mathcal{T}_1, \ldots, \mathcal{T}_{n-2}$, where $\mathcal{T}_k$ has vertices at integer points $(i,j)$ with $|i|+|j| \leq k+1$.
Base case ($k=0$): The initial embedding $\mathcal{T}_0$ has 5 vertices:
$$\mathcal{T}_0(0,0) = 0, \quad \mathcal{T}_0(\pm 1, 0) = \pm 1, \quad \mathcal{T}_0(0, \pm 1) = \pm \frac{i}{\sqrt{X_{\mathrm{root}}}}$$where $X_{\mathrm{root}}$ is the face weight of the central (root) face.
Recurrence ($k \geq 1$): Given $\mathcal{T}_{k-1}$, compute $\mathcal{T}_k$ using the following rules:
Given an Aztec diamond with arbitrary edge weights, the T-embedding recurrence uses three types of weights classified by their position in the reduced graph at each level $k$:
The α and β weights are extracted during the urban renewal and double edge combination steps of the Aztec diamond graph reduction. After performing:
the graph develops double edges (pairs of edges connecting the same two vertices). The α and β weights are then computed as ratios of these double edge weights:
$$\alpha = \frac{w_{\text{black} \to \text{white}}}{w_{\text{white} \to \text{black}}}$$where:
The γ weights are simply the face weights at interior positions, stored during the reduction process.
This simulation supports several edge weight distributions:
IID Distributions: Each edge weight drawn independently from:
Gamma Distribution [Duits–Van Peski]: Edges on the bottom of each face have weight $\sim \Gamma(\alpha, 1)$; edges on the right of each face have weight $\sim \Gamma(\beta, 1)$.
Layered Weights (diagonal: [Bufetov–Petrov–Zografos]; straight: [Moulard–Toninelli]): Weight depends on layer index (diagonal $i+j$ or row $y$). Five regimes:
Periodic (k×l): Face weights follow a spatially periodic $k \times l$ pattern, specified via an interactive editor.
The origami map $\mathcal{O}$ is a companion to the T-embedding. Together, $\mathcal{T}$ and $\mathcal{O}$ define a t-surface $\bigl(\mathrm{Re}(\mathcal{T}), \mathrm{Im}(\mathcal{T}), \mathrm{Re}(\mathcal{O}), \mathrm{Im}(\mathcal{O})\bigr)$ in the Minkowski space $\mathbb{R}^{2,2}$. For uniform weights, the surface lies in $\mathbb{R}^{2,1}$ [CLR2]; for periodic weights with gas regions, it is genuinely four-dimensional and converges to a space-like maximal surface [BNR]. The scaling limit for arbitrary (non-periodic) weights remains an open question.
The 3D view shows a projection: the T-embedding as the $(x,y)$ base and $\mathrm{Re}(\mathcal{O})$ as height $z$.
Im(Origami), matched: The imaginary part $\mathrm{Im}(\mathcal{O})$ gives a second height function, but with different boundary conditions than $\mathrm{Re}(\mathcal{O})$. To compare them, we apply a linear transformation $z = \alpha \cdot \mathrm{Im}(\mathcal{O}) + \beta$ where $\alpha, \beta$ are chosen via least squares to match $\mathrm{Re}(\mathcal{O})$ at the four external corners. This "matched" Im surface can be overlaid with Re to visualize how the two components relate.
The XX verification formula checks that all interior vertices satisfy XX · γ + 1 = 0:
XX[n1_, n2_, n3_, n4_][z_] := ((z - n1)(z - n3)) / ((n2 - z)(n4 - z))
where n1, n2, n3, n4 are neighbors in CCW order (R, U, L, D). For T_k, always use γ[k] (the face weight at that level).
Acknowledgement: Developed during the reunion conference for the IPAM long program on Geometry, Statistical Mechanics, and Integrability (December 2025). I thank Mikhail Basok, Dmitry Chelkak, and Marianna Russkikh for helpful discussions. I also thank Matthew Nicoletti for providing face-based T-embedding code. Part of this research was performed while the author was visiting the Institute for Pure and Applied Mathematics (IPAM), which is supported by the National Science Foundation (Grant No. DMS-1925919).
Runs T-embedding computation for n=10 to n=40, measures time for each, and fits a power law t(n) = c · nα (c in nanoseconds). Uses the current weight selection.
Link to code
(JavaScript implementation)
Link to code
(C++ source (WASM))
Link to code
(Standalone C++ CLI for faster domino shuffling)