Home▸Medicine & Biophysics▸Code Blue Physiology Engine (2D)

Code Blue Physiology Engine (2D)

Closed-loop cardiac-arrest physiology simulator in 2D: run CPR, epinephrine and defibrillation on a schematic patient monitor driven by a real hemodynamic model (CO = HR x SV, MAP = CO x SVR) and watch HR, MAP, SpO2 and EtCO2 respond in real time.

Medicine & Biophysics2DModerate60 FPS📱 Mobile-adapted⇄ 3D version
2d-medicine-topic-25 ↗ Open standalone

A closed-loop cardiac-arrest simulator built on the same modeling idea used inside real high-fidelity mannequin trainers: a small hemodynamic engine (cardiac output = heart rate × stroke volume, mean arterial pressure ≈ cardiac output × systemic vascular resistance) drives four live vitals — heart rate, MAP, SpO₂ and EtCO₂ — for a schematic 2D patient and monitor in ventricular fibrillation. Start CPR and tune compression depth toward the 5–6 cm target to raise CPR quality and EtCO₂, give epinephrine to boost coronary perfusion pressure, and time a defibrillation shock once quality and energy are in your favor. Succeed and the rhythm converts to sinus with return of spontaneous circulation; neglect the arrest too long and it deteriorates into asystole, forcing a scenario reset.

⚙ Under the hood

Run CPR, epinephrine and defibrillation on a schematic 2D patient monitor driven by a closed-loop hemodynamic model (CO = HR x SV, MAP = CO x SVR) and watch heart rate, MAP, SpO2 and EtCO2 respond in real time as the arrest resolves or deteriorates.

cardiac-arrestcprdefibrillationphysiology-enginehemodynamicsmedical-simulation

2D · HTML5 Canvas 2D · 60 FPS target · runs fully client-side, no install

What did you find?

Add reproduction steps (optional)