Presets
Playback
Rhythm and conduction
Wave shape and intervals
Camera
Layers
Quality
Model check
The science
What is modelled
The electrical side of the heart, not the pumping. A beat starts in the sinoatrial (SA) node, spreads over both atria (the P wave), is held back by the atrioventricular (AV) node (the PR segment), runs down the bundle of His and the left and right bundle branches, and is spread over the ventricles by the Purkinje fibres (the QRS complex). The ventricular muscle then recovers (the T wave). The page generates a list of atrial and ventricular activation times for each rhythm, turns them into one moving electrical dipole, and reads that dipole through the six limb leads.
Equations
- Heart vector: at every instant the heart acts like one dipole
H(t) = (Hx, Hy)in the frontal plane. A lead measures its projection on the lead axis:V = |H| cos(theta - theta_lead), with the axes I = 0, II = 60, III = 120, aVF = 90, aVL = -30 and aVR = -150 degrees. - Einthoven's law:
II = I + III. The augmented leads follow Goldberger's definitionsaVR = -(I + II)/2,aVL = (I - III)/2,aVF = (II + III)/2, soaVR + aVL + aVF = 0. - Mean electrical axis:
axis = atan2( (2/sqrt 3) x area(aVF), area(I) ), using the net area of the QRS in each lead; between -30 and +90 degrees is called normal. - Rate correction of the QT interval: Bazett
QTc = QT / sqrt(RR)(RR in seconds); FridericiaQTc = QT / RR^(1/3)is shown as a second opinion because Bazett over-corrects at fast rates. - Conduction rules used for the rhythms: an impulse crosses the AV node only if the node has recovered (refractory time about 300 ms after a ventricular beat, longer after a premature beat), which gives the compensatory pause after an ectopic beat; Wenckebach lengthens the delay by 70 ms per beat until one impulse is dropped (4:3); Mobitz II drops every third impulse with a fixed delay; in complete block the ventricles are driven by an escape rhythm of 38 per minute independent of the atria; atrial fibrillation gives an irregularly irregular ventricular rate (exponential spacing, minimum 280 ms).
Checks run in the page
- Einthoven's law and Goldberger's sum are tested on 10 s of the current rhythm against direct projections (agreement to rounding error).
- The mean axis recovered from the net QRS areas equals the axis you set.
- QT is measured on a reference beat with a threshold detector and compared with QTc x sqrt(RR); PR is measured from the first P-wave sample to the first QRS sample.
- An R-peak detector counts the QRS complexes of the current rhythm over 30 s and the count is compared with the number of ventricular beats the conduction model scheduled.
Honest simplifications
- The ECG is synthesised from a smooth dipole with typical textbook amplitudes and shapes; real traces vary between people and leads, and no chest (V1-V6) leads are drawn because they need the 3D heart-torso geometry.
- The wavefronts on the heart are schematic: the real activation sequence is three-dimensional and the model only sweeps from apex to base (or from the ventricular wall for premature beats).
- The presets show patterns of the kind described in textbooks (AV block, fibrillation, flutter, premature beats, long QT, ST shift); they are teaching illustrations of how the waveform follows the conduction, not examples of real patients.
- This page is for learning only. It cannot diagnose anything and gives no medical advice; anyone worried about their heart should ask a doctor.
What to try
- Choose Wenckebach and watch the ladder diagram: each PR is longer than the last until a P wave is blocked at the AV node.
- Choose Complete AV block: the P waves keep their own regular rhythm and walk through the slow wide escape beats.
- Choose Premature ventricular beats: a wide QRS with an opposite T wave is followed by a pause, because the next sinus impulse arrives while the AV node is still recovering.
- Turn the axis slider and watch the heart vector loop rotate while lead III and aVL change sign; the Einthoven check stays green.
- Raise the rate with the QTc fixed: the QT shortens like the square root of RR.
What you see in 3D
The chambers are semi-transparent so the conduction system shows through. Yellow glow marks muscle that is electrically active (depolarised): the atria light up from the SA node, the ventricles from the apex upwards, or from the ventricular wall for a premature beat. The small white dot is the impulse travelling along a conduction fibre; a red AV node means the impulse was blocked there. The fibre paths and node positions are schematic.