Overview
NeuroViz 3D is an advanced interactive WebGL biophysical laboratory engineered for real-time 3D simulation of multi-compartmental neural electrophysiology, fluid action potential wave propagation, dendritic cable decay, and dual-probe virtual patch-clamp electrophysiology. In mammalian central nervous system architectures, neural computation is governed by continuous non-linear ionic flux across complex spatial arborizations. Membrane potential state transitions ($V_m$) evolve across distinct soma, dendritic, and axonal compartments controlled by voltage-gated sodium ($\text{Na}^+$), potassium ($\text{K}^+$), and passive leak conductance channels.
At rest, neuronal compartments maintain a polarized equilibrium baseline ($V_{rest} \approx -70\text{ mV}$), actively sustained via $\text{Na}^+/\text{K}^+$-ATPase ATP-dependent exchange pumps. When dendritic spatial and temporal summation depolarizes the initial segment past firing threshold ($V_{thresh} \approx -55\text{ mV}$), rapid opening of voltage-gated $\text{Na}^+$ channels induces a regenerative influx of positive ionic charge, driving local membrane potential to peak overshoot ($+40\text{ mV}$). Sodium channel inactivation combined with delayed-rectifier $\text{K}^+$ efflux repolarizes and hyperpolarizes the compartment back toward baseline.
The non-linear differential dynamics governing local ionic current density $I_{ion}$ are characterized through Hodgkin-Huxley formulations:
$$C_m \frac{dV_m}{dt} = I_{ext} - \bar{g}_{Na} m^3 h (V_m - E_{Na}) - \bar{g}_K n^4 (V_m - E_K) - \bar{g}_L (V_m - E_L)$$
where $C_m$ denotes specific membrane capacitance ($\approx 1.0\ \mu\text{F/cm}^2$), $\bar{g}_{Na}, \bar{g}_K, \bar{g}_L$ represent maximal conductance densities, and $m, h, n$ represent dimensionless gating probabilities. NeuroViz 3D maps these numerical state transitions onto 3D structural models of major cell classes—including neocortical Layer V Pyramidal cells, GABAergic Basket Interneurons, cerebellar Purkinje cells, and spiny Stellate cells.
How to Use
The interactive terminal interface enables precise control over WebGL rendering parameters, cellular morphology selection, time-domain scrubbing, and dual electrophysiological probe placement:
- Dual Virtual Patch-Clamp Probes: Click or tap directly on any 3D dendritic or axonal compartment in the WebGL viewport. Probe E1 (Cyan glass microelectrode) remains anchored to the soma, while Probe E2 (Green glass microelectrode) snaps precisely onto the targeted outer membrane surface. The bottom-left Oscilloscope HUD plots live dual $V_m(t)$ voltage traces comparing local compartment potential against soma baseline in real time.
- Start Demo Mode: Click
Start Demo at the top of the control panel to initiate an automated demonstration fly-through. The system continuously rotates the 3D WebGL camera, scrubs timeline frames, and cycles through Pyramidal, Interneuron, Purkinje, and Stellate cell structures. Interacting with any control or viewport immediately restores your exact pre-demo configuration.
- Reset Baseline: Click the red
Reset Baseline button to instantly wipe runtime overrides, returning camera zoom, orientation, speed, and cell types to factory baseline settings.
- Sound Synthesis Toggle: Click
🔇 SOUND OFF to initialize the Web Audio context. When active, action potential spikes synthesize real-time audio tones whose fundamental frequency is dynamically pitch-modulated by peak membrane potential ($V_m$).
- Neuron Morphology Selector: Switch between distinct cell classes:
- Pyramidal Cell: Features an anatomical axon hillock, prominent apical dendrite, basal trees, instanced dendritic spines, and a myelinated axon with Nodes of Ranvier.
- Basket Interneuron: Displays a dense spherical dendritic arbor and local inhibitory axon plexus.
- Purkinje Cell: Renders a massively branched planar dendritic fan characteristic of cerebellar coordination circuits.
- Stellate Cell: Features multipolar radial dendrites with uniform spatial distribution.
- Timeline Scrubbing & Speed: Drag the timeline slider to freeze and inspect microsecond-level propagation state across 200 simulation frames. Adjust propagation speed from $0.1\times$ to $3.0\times$.
Technical Details
NeuroViz 3D pairs a high-performance Three.js WebGL graphics pipeline with compartmental cable theory dynamics. Electrotonic signal attenuation along dendritic branches is governed by the 1D cable equation:
$$\frac{\lambda^2}{r_m} \frac{\partial^2 V}{\partial x^2} = C_m \frac{\partial V}{\partial t} + I_{ion}$$
where electrotonic length constant $\lambda$ dictates spatial decay:
$$\lambda = \sqrt{\frac{r_m}{r_i}} = \sqrt{\frac{a R_m}{2 R_i}}$$
Here $a$ is branch radius, $R_m$ is specific membrane resistivity ($\Omega \cdot \text{cm}^2$), and $R_i$ is intracellular axial resistivity ($\Omega \cdot \text{cm}$). Branch diameter tapering across bifurcations adheres to Rall's 3/2 Power Law:
$$d_{parent}^{3/2} = d_{child1}^{3/2} + d_{child2}^{3/2}$$
To eliminate visual seams and gaps at branch splits, spherical joint caps match local branch radii at every bifurcation node. Branch cylinders utilize multi-segment height subdivisions ($h=8$) with per-vertex color attribute updates (`BufferAttribute`), creating a **fluid continuous voltage gradient** along branch lengths as action potentials propagate. All branch cylinders are oriented using mathematically stable **quaternions** (`quaternion.setFromUnitVectors`), completely eliminating gimbal lock singularities. Touch interactions utilize Three.js `Raycaster` for microelectrode surface snapping. Screen pixel ratios are capped (`Math.min(window.devicePixelRatio, 1.5)`) to maintain high FPS on mobile GPUs.
Future Directions
Roadmap milestones for NeuroViz 3D focus on expanding computational physics and network integration:
- Web Worker Multithreading: Offloading Hodgkin-Huxley numerical integration (Crank-Nicolson / RK4 solvers) into background Web Worker threads using zero-copy `ArrayBuffer` transfers.
- SWC File Import: Supporting drag-and-drop loading of standardized `.swc` neuroanatomy reconstructions directly from Neuromorpho.org.
- Synaptic Receptor Kinetics: Modeling AMPA, NMDA (with voltage-dependent $\text{Mg}^{2+}$ unblocking), and $\text{GABA}_A$ receptor conductance curves at postsynaptic contacts.
- WebXR VR Laboratory: Enabling WebXR spatial tracking for immersive virtual reality exploration of 3D neural micro-circuits.