This is the 2D counterpart of the 3D SA-node/conduction-pathway simulator — same electrophysiology, a genuinely different computation. Instead of animating a wave along a handful of precomputed geometric tubes, this model discretizes a schematic frontal map of the heart into a grid of tissue cells (atrium, AV segment, His-Purkinje fast paths, ventricular myocardium), assigns each cell a real conduction velocity, and solves for the exact activation time of every single cell with Dijkstra's algorithm run as a discrete fast-marching method — the standard numerical technique for the cardiac eikonal (wavefront-arrival-time) equation:
for every tissue-graph edge (cell i → neighbor j):
travel_time = |step| · dx / harmonic_mean(v_i, v_j)
activation_time(cell) = shortest path length from the SA node
(Dijkstra's algorithm — an exact multi-source solve, not a per-frame animation trick)
Because the wave is solved cell-to-cell over the actual tissue graph, it reroutes itself around damage rather than following a scripted path: block one bundle branch and that side is simply removed as a fast conduit, so Dijkstra finds the real physical detour — activation crawling in cell-by-cell from the working myocardium — which is exactly what happens in a real LBBB/RBBB heart, and visibly widens the QRS.
- SA firing rate — sets how often the pacemaker potential (phase-4 slow diastolic depolarization, the mini chart above) reaches threshold and re-triggers the whole activation-time solve.
- AV nodal delay — sets the conduction velocity across the narrow AV segment corridor; the AV node's characteristic decremental conduction is what separates atrial and ventricular activation enough for the atria to finish emptying first.
- His-Purkinje speed — scales the fast-path velocity; slow it down and the QRS widens because the ventricles lose their high-speed wiring.
- Bundle branch block — deletes one side's fast conduit outright, forcing Dijkstra to find the true slow cell-to-cell route — the same mechanism behind LBBB/RBBB on a real ECG.
Verified numerically: a straight 1D chain of cells fed a known velocity reproduces that exact velocity (distance ÷ measured time, to 6 decimal places) — the solver is not a discretized approximation with timestep error, it is an exact shortest-path computation on the tissue graph.