This is a genuinely 2D, Fourier-space version of the free-streaming problem — not a flattened 3D scene. A 128×128 Gaussian random density field is built directly in k-space (white noise shaped by a primordial envelope), exactly the way linear cosmological perturbation theory constructs an initial density contrast field δ(x). Thermal velocity and free-streaming length use the same physics as the 3D companion sim:
v_rms = √(3kT/m)
λ_fs ≈ 0.2 Mpc × (1 keV / m)^(4/3)
Instead of moving pre-placed particle clumps, the particle mass here suppresses the density field's own power spectrum through a real linear transfer function (Bode–Ostriker–Turok thermal-relic shape):
T(k) = [1 + (k / k_fs)^(2ν)]^(−5/ν), ν = 1.12
δ_suppressed(k) = δ_primordial(k) · T(k)
k_fs is set by the free-streaming length: modes with wavelength shorter than λ_fs (k > k_fs) get erased, exactly as free streaming demands. λ_fs itself spans ten orders of magnitude across the slider (sub-parsec for a WIMP to thousands of Mpc for a light neutrino) — far more than any one 25 Mpc / 128-cell box can resolve at once. Just like the 3D companion sim clamps its visual diffusion rate while still showing the true λ_fs number, k_fs here is driven by a monotonic remapping of λ_fs onto the grid's own resolvable range (cell size → box size), so suppression stays visible across the whole slider while the λ_fs/v_rms readouts above are always the true, unclamped physics values.
The suppressed field is evolved with the standard linear-growth law δ(x,t) = D(t)·δ(x,0), and any cell whose grown density exceeds the spherical-collapse critical threshold δ_c ≈ 1.686 is marked "collapsed". Collapsed cells are grouped into connected regions (flood fill) and classified by area into dwarf-scale and cluster-scale halos — a genuine excursion-set-style structure-formation diagnostic. Turning gravity off disables collapse entirely: no threshold crossing is ever honoured, since without self-gravity nothing can bind into a halo regardless of density.
- Cold dark matter (heavy, e.g. a WIMP): k_fs is far beyond the box's finest scale, so almost no power is removed — small-scale structure collapses readily.
- Warm dark matter (keV-scale sterile neutrino): k_fs falls inside the box — fine detail is suppressed while the largest, cluster-scale modes mostly survive.
- Hot dark matter (eV-scale neutrino): k_fs collapses below the box's largest scale — even the biggest overdensities are erased, and almost nothing ever crosses the collapse threshold.