Displays two superimposed dimer configurations on an Aztec diamond. Black and red edges show the two independent tilings; purple marks doubled edges present in both. Random IID weights (Bernoulli, Gaussian, or Gamma) control the tiling distribution. Controls set size, weight type, and display options.
This simulation demonstrates double dimer configurations on an Aztec diamond. Two independent dimer configurations are sampled and displayed simultaneously - one in black and one in red. The simulation uses random IID weights sampled from either a Bernoulli distribution or a log-normal distribution (exp(β × X) where X ~ N(0,1)) to generate tilings via the shuffling algorithm. The original python code was created by Sunil Chhita; this version is adapted for JS + WebAssembly. Visualization is done using D3.js.
The sampler works in your browser. Up to $n \sim 120$ it works in reasonable time, but for larger $n$ it may take a while. I set the upper bound at $n=400$ to avoid freezing your browser.
Random Weights: Each edge weight $W_{ij}$ is sampled independently from one of three distributions:
- Bernoulli: Takes value “Value 1” with probability “P(Value 1)” and value “Value 2” with probability $1 - P(\text{Value 1})$. The default values (1/2 and 3/2 with equal probability) create a mildly inhomogeneous environment.
- Gaussian: $W_{ij} = e^{\beta X_{ij}}$ where $X_{ij} \sim N(0,1)$ are independent standard normal random variables. The parameter $\beta$ controls the variance of the log-weights.
- Gamma: $W_{ij} = \text{Gamma}(\alpha, 1)$ for some of the edges (even rows, i.e., $i$ even), and $W_{ij} = 1$ for other edges (odd rows, i.e., $i$ odd). The shape parameter $\alpha$ controls the distribution of the gamma weights.
code
(note: parameters in the code might differ from the ones in simulation results below)-
Link to code(This simulation is interactive, written in JavaScript, see the source code of this page at the link) -
Link to code(C++ code for the simulation)