⚡ Action Potential Propagation
A Hodgkin-Huxley cable model propagates a nerve impulse along an axon; toggle myelination to see saltatory conduction leap between nodes of Ranvier far faster than continuous unmyelinated conduction.
How it Works
The axon is discretized into N compartments arranged along a line, each carrying its own membrane potential V and three Hodgkin-Huxley gating variables m, h and n that track the fraction of open sodium-activation, sodium-inactivation and potassium-activation gates. At every timestep the sodium and potassium conductances are computed from these gates and combined with a leak conductance to give the total membrane current, which is integrated forward with a small Euler step. Neighboring compartments are electrically coupled through an axial current proportional to the local second difference in voltage, exactly like current flowing along a resistive cable, so a spike in one compartment depolarizes its neighbors enough to trigger their own regenerative sodium influx, and the wave rolls forward.
Toggling myelination changes which compartments contain active channels. With myelination off, every compartment actively regenerates the spike, so the wave crawls forward compartment by compartment. With myelination on, only evenly spaced "nodes of Ranvier" carry Na/K channels while the insulated internodes between them are passive and conduct current almost instantly; the action potential effectively jumps from node to node (saltatory conduction), which the live conduction-velocity readout — computed from the time the depolarization wavefront takes to cross a fixed distance — shows to be substantially faster than the continuous case.
Icouple[i] = D·(V[i+1] − 2·V[i] + V[i−1])
dx/dt = α_x(V)·(1−x) − β_x(V)·x, x ∈ {m, h, n}
Myelinated internodes: gNa = gK = 0 (passive, D scaled up)
Frequently Asked Questions
What is an action potential?
An action potential is a rapid, self-propagating reversal of membrane voltage caused by the sequential opening and closing of voltage-gated sodium and potassium channels. It is the electrical signal neurons use to transmit information over long distances.
What do the m, h and n gating variables represent?
They are Hodgkin-Huxley state variables between 0 and 1: m is sodium channel activation, h is sodium channel inactivation, and n is potassium channel activation. Their voltage-dependent rate constants together reproduce the realistic shape of the action potential.
Why does the impulse only travel in one direction?
Immediately behind the advancing wavefront, sodium channels are inactivated (h is near zero), creating a refractory zone. This absolute refractory period prevents the impulse from re-triggering compartments it has just passed, forcing forward-only propagation.
What is saltatory conduction?
Saltatory conduction is the rapid "jumping" of an action potential between nodes of Ranvier in myelinated axons. Myelin insulates the internodes so the signal decays passively but quickly between nodes, letting the impulse regenerate only at the exposed nodes and skip most of the axon's length.
Why is myelinated conduction faster than unmyelinated conduction?
In unmyelinated axons every compartment must actively regenerate the spike, which takes time at each point. In myelinated axons, current spreads passively and almost instantly through insulated internodes, so the active regeneration step happens only at widely spaced nodes, cutting the total travel time dramatically.
What does the axial coupling current represent biologically?
It represents the flow of ions through the cytoplasm between adjacent patches of membrane, driven by the local voltage difference. This local-circuit current depolarizes neighboring membrane ahead of the wavefront, which is the physical mechanism that propagates the impulse.
What is the refractory period and why does it matter?
The refractory period is the brief interval after a spike during which a compartment cannot fire again because sodium channels remain inactivated and potassium channels remain open. It sets an upper limit on firing frequency and ensures action potentials only travel forward.
How is conduction velocity measured in this simulation?
The simulation tracks the time it takes the depolarization wavefront (the point where voltage first crosses a threshold) to travel a fixed distance along the axon, then divides distance by elapsed time to compute a live conduction velocity readout.
What happens if the stimulus amplitude is too low?
If the injected current is below the threshold needed to open enough sodium channels to overcome the leak and potassium currents, the membrane depolarizes only slightly and returns to rest without firing a full regenerative action potential.
Why do demyelinating diseases like multiple sclerosis slow nerve signals?
When myelin is damaged, internodal membrane is exposed and must actively regenerate the spike like unmyelinated tissue, and current also leaks out through the damaged insulation. Both effects slow conduction velocity and can cause the impulse to fail entirely.
About this simulation
Every one of the axon's compartments runs its own miniature Hodgkin-Huxley circuit — sodium channels flinging the membrane positive, potassium channels dragging it back down — and each compartment leaks current sideways into its neighbors exactly like a resistive cable. Flip the myelination switch and watch the same physics produce two wildly different speeds: continuous conduction crawls point by point while saltatory conduction hops between nodes of Ranvier, and the live velocity readout turns that difference into a number you can watch change in real time.
🔬 What it shows
A cable of Hodgkin-Huxley compartments where sodium and potassium gating variables drive a traveling depolarization wave, rendered as both a voltage-vs-position trace and a red/blue heat strip along the axon.
🎮 How to use
Click anywhere on the axon trace to stimulate at that point, or use the Stimulate button for the left end; adjust Stimulus Amplitude, Compartments and Repeat-Stimulus Rate, toggle Myelination to compare conduction speeds, and press P/R to pause/reset.
💡 Did you know?
Saltatory conduction in a myelinated human axon can reach speeds over 100 m/s, while an unmyelinated axon of the same diameter conducts at only about 1-2 m/s — myelin is one of evolution's most effective speed upgrades.
Frequently asked questions
What happens when I click the axon trace?
Clicking queues a 3 ms current injection at the nearest compartment, mimicking an experimenter's stimulating electrode and triggering a fresh action potential if the amplitude is above threshold.
Why does turning on myelination change the node spacing?
With myelination on, only every sixth compartment keeps active sodium and potassium conductances (the nodes of Ranvier); the compartments between them become passive internodes with a higher axial coupling constant, letting current spread through them almost instantly.
Why does raising Stimulus Amplitude matter?
The injected current Iinj is added directly to the membrane current balance; if it's too small the depolarization decays back to rest, but once it pushes enough sodium channels open the regenerative cycle takes over and a full spike fires.
How is the conduction velocity number computed?
The code finds the rightmost compartment whose voltage exceeds -20 mV each frame, records its position and simulation time, and divides the distance traveled by the elapsed time over the tracked history.
Why can't I re-stimulate a spot right after it fires?
The h gating variable (sodium inactivation) drops toward zero right after a spike and needs time to recover via its rate equations, so gNa stays near zero and the compartment can't regenerate another spike until h rises again.
A Hodgkin-Huxley cable model propagates a nerve impulse along an axon; toggle myelination to see saltatory conduction leap between nodes of Ranvier far faster than continuous unmyelinated conduction.
2D · HTML5 Canvas 2D · 60 FPS target · runs fully client-side, no install