Mathematician + Developer + Cat DadMath, code, cats, books and faith. Since 2024.
Brownian Studio
Paint with Brownian motion. Each mode is a different stochastic differential equation -- click and drag to spawn, stir and trap thousands of glowing walkers, switch the Layer to watch their smooth density emerge, and press Space to pause.
Studio
0 particles
WebGL2 not available -- running the simple renderer
Controls
The math
The simplest stochastic process: position evolves under pure white-noise forcing,
where is a standard Wiener process. The variance of position grows linearly
with time: . In the continuum limit, the density
of many such particles satisfies the heat equation
-- the microscopic side of the
diffusion term in the Reaction-Diffusion toy.
Click or drag to spawn glowing plumes, Shift-drag to stir. Set the Layer to Density to watch the smooth density -- the heat equation's solution -- emerge from the walkers.
Add a drift toward the minimum of a potential :
Particles thermalize in basins of and occasionally hop between them
(thermal activation, Kramers' escape law). In the long-time limit the density
relaxes to the Boltzmann distribution
. This is the stochastic counterpart
to the deterministic gradient flow that underlies
Justin's dissertation work -- see /p/research/.
Click to drop attractive wells, right-click (or Shift-click) for repulsive barriers, and drag to stir. The shaded landscape underneath is the potential itself, with contour lines. Grow your name or the spacecat and the potential becomes the image: the walkers settle into the Boltzmann distribution and paint it.
Mean-reverting noise:
Each particle is tethered to its nearest attractor by a linear restoring
force of strength . The stationary distribution is Gaussian with
variance , so cranking , so raising tightens the cloud
and cranking loosens it.
Click to add traps, right-click (or Shift-click) to remove the nearest, and drag to stir. Each dimple in the landscape is drawn as wide as its stationary cloud. Color by First trap to see where every walker settled.
Replace the Gaussian increment with a heavy-tailed jump law,
with .
Variance is infinite for ; the walk is dominated by rare,
very long flights. Observed in animal foraging, turbulent transport, and
photon scattering in disordered media.
Click or drag to spawn walkers. Color by Speed and each walker flares after a long jump; in Paths style the jump itself is a faint thread across the canvas.
A toy active-matter model. Position drifts along a heading with
fixed speed ; the heading itself diffuses with rotational noise :
Small gives long persistent runs (vortices emerge); large
recovers Brownian motion. The continuum limit is run-and-tumble dynamics.
The spin omega makes each swimmer curve, so low noise draws circles (try the Spinners preset). Click or drag to spawn swimmers, Shift-drag to steer them, and Shift-click to flip nearby headings.
Walkers do unbiased random walks until they touch a growing cluster, at which
point they stick. The result has fractal dimension
in 2D (Witten and Sander, 1981). DLA structures show up
in mineral dendrites, lightning, viscous fingering, and electrodeposition.
Paint a seed, then press Grow Cluster -- or drop extra seeds mid-growth and watch the clusters race and fuse. Lower the Stickiness for thicker, coral-like growth. Each new arrival flashes as it sticks.
Where this comes from
The deterministic limit of these particle dynamics is the reaction-diffusion / gradient-flow PDE
explored in the Reaction-Diffusion toy. The
energy-stable schemes in Justin's dissertation discretize that continuum side; this toy renders
the microscopic side directly. Brownian, Langevin, Ornstein-Uhlenbeck, Levy, and active particles
use periodic geometry, so Torus view shows the same walks on the glued-up surface. See
/p/research/.