1. Clinical & Biophysical Overview
Huntington's Disease (HD) is a fatal, autosomal dominant neurodegenerative disorder driven by a dynamic cytosine-adenine-guanine ($CAG$) trinucleotide repeat expansion within Exon 1 of the Huntingtin ($\text{HTT}$) gene, situated on chromosome 4p16.3. The mutant huntingtin protein ($m\text{HTT}$) incorporates an elongated polyglutamine ($polyQ$) tract at its N-terminus. Healthy alleles typically present between $10$ and $26$ $CAG$ units. Alleles spanning $27\text{ to }35$ repeats are non-penetrant but demonstrate meiotic instability. Tracts containing $36\text{ to }39$ repeats confer reduced penetrance, while $\ge 40$ repeats result in full penetrance with deterministic clinical onset within a typical lifespan. Expansions exceeding $60$ repeats prompt early juvenile HD (the Westphal variant), marked by early onset rigidity, hypokinesia, and epileptic encephalopathy rather than hyperkinetic chorea.
Neuropathologically, Huntington's disease preferentially destroys the striatum—comprising the caudate nucleus and the putamen—before spreading diffusely to the cerebral cortex and subthalamic structures. The benchmark post-mortem pathological classification system, formulated by Jean-Paul Vonsattel et al. (1985), charts this anatomical deterioration across five stages:
- Vonsattel Grade 0: Clinically documented Huntington's disease, but light microscopy and gross morphometry exhibit no distinguishable striatal cell death.
- Vonsattel Grade 1: Macroscopically intact brain contour with preserved ventricular geometry. Microscopic inspection reveals regional depletion of medium spiny projection neurons ($MSNs$) in the dorsomedial head of the caudate, accompanied by early fibrillary astrogliosis.
- Vonsattel Grade 2: Evident macroscopic striatal atrophy. While the medial border of the caudate head maintains its physiological convex bulge towards the lateral ventricle, prominent neuronal loss and widespread reactive astrogliosis occur.
- Vonsattel Grade 3: Severe striatal volume collapse. The hallmark convex medial contour of the caudate head flattens completely into a linear wall, prompting secondary compensatory hydrocephalus ex vacuo and widening of the frontal horns of the lateral ventricles.
- Vonsattel Grade 4: End-stage destruction. Up to $95\%$ of striatal medium spiny neurons are eradicated. The caudate head profile becomes markedly concave (sunken outwards), resulting in the classic radiographic "boxcar" or "butterfly" ventricular dilation pattern. Secondary neocortical thinning, severe white matter volume depletion, and pallidal atrophy become extensive.
The hallmark hyperkinetic motor symptom—chorea (involuntary, jerky, dance-like movements)—arises from an exquisite temporal dissociation in the destruction of two distinct striatal projection populations. Medium spiny neurons expressing Dopamine D2 receptors and Enkephalin (which constitute the striatopallidal indirect pathway) degenerate years before those expressing Dopamine D1 receptors and Substance P (the striatonigral direct pathway). The indirect pathway serves as the physiological "brake" of the motor loop: its destruction disinhibits the external globus pallidus ($GPe$), hyper-suppresses the subthalamic nucleus ($STN$), decreases inhibitory drive to the thalamus from the internal globus pallidus ($GPi$), and triggers uncontrolled chaotic thalamocortical motor bursts. As disease advances, the direct pathway subsequently collapses, leaving the motor thalamus permanently inhibited and transforming chorea into terminal bradykinesia, severe dystonia, and muscular rigidity.
3. Mathematical Formulations & Computational Architecture
The simulation architecture couples numerical integration of nonlinear population rate dynamics with anatomical morphometric spline deformation and Web Audio DSP synthesis.
3.1 Cortico-Basal Ganglia-Thalamocortical Dynamical System
Neural population firing rates are integrated continuously via a 4th-order Runge-Kutta ($\text{RK4}$) algorithm tracking six coupled anatomical regions: Cortex ($CTX$), Striatal D1 MSNs ($D_1$), Striatal D2 MSNs ($D_2$), External Globus Pallidus ($GPe$), Subthalamic Nucleus ($STN$), and the Internal Globus Pallidus / Substantia Nigra pars reticulata complex ($GPi$):
$$\tau_i \frac{dr_i}{dt} = -r_i(t) + \mathcal{S}\left( \sum_{j} W_{ij} r_j(t) + I_i^{\text{ext}} + \xi_i(t) \right)$$
where $\tau_i$ represents population time constants ($\tau_{CTX}=15\text{ ms}$, $\tau_{STN}=10\text{ ms}$, $\tau_{GPe}=12\text{ ms}$, $\tau_{GPi}=14\text{ ms}$), $\xi_i(t)$ represents stochastic synaptic noise, and $\mathcal{S}(u)$ is the nonlinear sigmoidal activation function:
$$\mathcal{S}(u) = \frac{1}{1 + \exp\left(-\beta(u - \theta)\right)}$$
The effective synaptic weights $W_{ij}$ incorporate dynamic cell survival coefficients $\gamma_1 = 1 - \frac{\text{Loss}_{D1}}{100}$ and $\gamma_2 = 1 - \frac{\text{Loss}_{D2}}{100}$:
$$W_{GPe, D2} = -w_{GPe, D2} \cdot \gamma_2, \quad W_{GPi, D1} = -w_{GPi, D1} \cdot \gamma_1$$
When $\gamma_2$ drops below a critical bifurcation parameter $\gamma_2^* \approx 0.45$, the indirect pathway fails to brake thalamocortical projection. The trajectory in 3D phase space $(r_{CTX}, r_{STN}, r_{GPi})$ undergoes a period-doubling cascade into deterministic chaos, reflected by a positive maximal Lyapunov exponent:
$$\lambda_{\max} = \lim_{t \to \infty} \frac{1}{t} \ln \frac{\|\delta \mathbf{r}(t)\|}{\|\delta \mathbf{r}(0)\|}$$
3.2 Cumulative Pathological Exposure: The CAP Score
The cumulative biological exposure to mutant huntingtin is calculated according to the standard centered CAG-Age-Product ($\text{CAP}_R$) index:
$$\text{CAP}_R = \text{Age} \times \frac{\text{CAG} - L_0}{S_0}$$
where $L_0 = 33.66$ represents the zero-penetrance baseline repeat offset and $S_0 = 432.33$ is the scaling denominator. Projected striatal tissue volume loss $V_{\text{loss}}(t)$ and secondary plasma neurofilament light chain ($\text{NfL}$) elevation are parameterized through empirical Track-HD longitudinal non-linear regressions:
$$V_{\text{loss}}(\%) = \min\left(95, \; 2.8 \cdot \exp\left(0.0068 \cdot \text{CAP}_R\right) + 0.45 \cdot \text{Loss}_{D2}\right)$$
$$[\text{NfL}]_{\text{plasma}} = 12.4 \cdot \exp\left(0.0031 \cdot \text{CAP}_R\right) + 0.22 \cdot V_{\text{loss}} \quad (\text{pg/mL})$$
3.3 Anatomical Morphometry & Bézier Spline Deformation
The left visualizer viewport renders a high-precision coronal section through the basal ganglia ($y \approx -2\text{ mm}$ to $-6\text{ mm}$ relative to the anterior commissure). Morphological deformation of the lateral ventricles, caudate head, putamen, and neocortical ribbon is achieved via parameterized cubic Bézier curves:
$$\mathbf{B}(t) = (1-t)^3 \mathbf{P}_0 + 3(1-t)^2 t \mathbf{P}_1 + 3(1-t)t^2 \mathbf{P}_2 + t^3 \mathbf{P}_3, \quad t \in [0, 1]$$
The medial control points of the caudate head $\mathbf{P}_1$ and $\mathbf{P}_2$ displace laterally as a quadratic function of Vonsattel grade $G \in [0, 4]$, transforming from a convex arc ($\Delta x < 0$) into a flat border ($\Delta x = 0$ at Grade 3) and finally an outward-caved concave contour ($\Delta x > 0$ at Grade 4). The Evans index of ventricular enlargement is computed continuously as:
$$\text{Evans Index} = \frac{\text{Maximum Width of Frontal Horns}}{\text{Maximum Inner Skull Diameter}}$$
Normal physiological values span $0.20\text{--}0.28$; advanced Huntington's disease expands this ratio to $> 0.42$.
3.4 Web Audio DSP Signal Pipeline
Sonification is implemented natively using the browser Web Audio API:
- An `AudioContext` remains suspended until explicit user interaction with `#soundToggleBtn`.
- A central carrier oscillator generates a low-frequency hum ($110\text{ Hz}$) representing baseline basal ganglia firing.
- A secondary harmonic oscillator ($220\text{--}440\text{ Hz}$) is frequency-modulated by the instantaneous cortical firing rate $r_{CTX}(t)$.
- Chaotic choreic bursts trigger transient exponentially decaying bandpass noise impulses (`BiquadFilterNode`, $Q=8.0$), acoustically rendering the irregular motor firing storms characteristic of clinical chorea.