This is the 3D counterpart of the Dendritic Spine Plasticity Lab, rendering the same structural-plasticity rule on a real 3D dendrite segment (a Three.js tube geometry along a gently curved centerline) instead of a flat schematic. Every spine is an instanced stalk-and-head mesh protruding radially from the tube surface; its head radius always equals its live structural size S, and its color always tracks its live calcium trace Ca.
Each spine integrates local synaptic input into a leaky calcium trace, exactly as in the 2D lab — an event with probability proportional to the local input rate adds a fixed quantum, and Ca decays exponentially between events:
event with probability r(x,t)·dt → Ca += q
every step: dCa/dt = −Ca/τ_Ca
Spine size S follows the same bidirectional calcium-threshold rule: growth above a potentiation threshold, shrinkage below a depression threshold, plus constant baseline turnover — and outright pruning once S collapses near zero.
dS/dt = k_grow·σ(Ca−θ_p)·(S_max−S)
− k_shrink·σ(θ_d−Ca)·S
− turnover·S
- Local burst zone places a Gaussian patch of high input rate at the chosen position along the tube — spines under it visibly swell; spines elsewhere don't.
- Spontaneous background keeps already-grown spines alive with a small uniform input rate everywhere.
- Deprivation pulse zeroes all input for 6 seconds, so unrescued spines visibly shrink and vanish.
- Thin new filopodia sprout at random positions and angles around the tube at a steady baseline rate; most retract within seconds, but ones inside an active zone accumulate enough calcium to stabilize — drag to orbit and watch where on the dendrite that actually happens.
Real-world relevance: this is the same activity-dependent structural rewiring believed to physically encode long-term learning in real neurons — shown here as an actual 3D dendrite so the spatial pattern of growth (which patches of dendrite get denser, which thin out) is visible directly.