How it Works
The canvas renders a scalar height field h(x,y): a Gaussian hill near the top of the canvas represents the pluripotent stem-cell state, and several Gaussian wells arranged near the bottom represent distinct differentiated fates. Between them a gentle overall downward slope biases every cell to eventually leave the peak. Colour encodes height directly, from bright purple at the summit through the mid-tones down to warm valley floors, so the topography of the epigenetic landscape is visible at a glance.
Each cell particle obeys overdamped Langevin dynamics: its velocity is proportional to the negative gradient of the height field, estimated numerically by sampling h at nearby points, plus an independent Gaussian random kick every frame scaled by the noise slider. Because the gradient alone would send every particle down the exact same deterministic path, it is the noise term that lets genetically identical starting cells stochastically diverge into different valleys, exactly as real gene-regulatory network noise lets identical stem cells commit to different lineages. A signaling bias term adds a linear tilt to the whole landscape, mimicking a morphogen gradient that statistically favours one fate valley over the others.
∇h ≈ ( [h(x+ε,y)−h(x−ε,y)] / 2ε , [h(x,y+ε)−h(x,y−ε)] / 2ε )
v = −mobility·∇h + noise·N(0,1)
x(t+dt) = x(t) + v·dt