This is the 2D companion to the 3D macrophage polarization simulator, computed independently rather than a flattened render of the same 3D tissue scene. It keeps the identical N = 140 cell population and the identical per-cell relaxation ODE:
dP/dt = k·sens·[ S1·(1−P) − S2·(1+P) ] − β·P + noise
k = 1.15 (fixed receptor-engagement gain), sens ~ U(0.7, 1.6) per cell
Deterministic steady state: P* = k·sens·(S1−S2) / [ k·sens·(S1+S2) + β ]
Instead of placing 140 spheres in an orbit-camera tissue volume, this view exposes the same population through two genuinely 2D-native, distribution-based lenses:
- The top strip is a live histogram of every cell's polarization index P — the population's actual probability distribution across the M2↔M0↔M1 spectrum, redrawn every frame. The dashed yellow line marks the analytic deterministic steady state P* for a cell of average sensitivity (sens=1), so you can watch the live distribution converge onto (or scatter noisily around) the exact fixed point the ODE predicts.
- The bottom strip is a receptor-sensitivity/time kymograph: cells are grouped into 14 bins by their fixed receptor sensitivity (x-axis, low→high), and each bin's mean P is plotted as a color at the current time (a new row every ~0.1s, scrolling downward). Because sensitivity multiplies both stimulus terms but not the β decay, higher-sensitivity cells polarize further toward whichever stimulus dominates — this map makes that receptor-density heterogeneity directly visible as a left-to-right gradient in color intensity, something the 3D scatter cloud does not show explicitly.
Real-world relevance is unchanged from the 3D source: this spectrum model underlies how tumor-associated macrophages (mostly M2-skewed), wound-healing macrophages (M1→M2 switch after the acute phase), and chronic-inflammation macrophages (stuck M1) are understood and targeted therapeutically — and the sensitivity kymograph makes concrete why a mixed-receptor-density population never polarizes in perfect lockstep.