This 2D cross-section uses the same rigid-body-plus-force-feedback model as the 3D version — the sternum is a point mass on a nonlinear spring-damper, driven every frame by Newton's second law:
m·a = F_hand(t) − k(x)·x − c·v
k(x) = k0 + k1·x² (rib cage stiffens as it compresses)
x = compression depth (m), v = ẋ, a = ẍ
In Auto mode a proportional feedback controller adjusts push amplitude every cycle so the simulated rescuer converges on the requested target depth:
F_amp ← F_amp + Kp·(x_target − x_peak,last)
This 2D companion adds a live estimate of coronary perfusion pressure (CPP) — the pressure gradient that actually drives blood into the coronary arteries during CPR, and the single best predictor of return of spontaneous circulation (ROSC) in real resuscitation research (Paradis et al., 1990: ROSC essentially never occurred below ~15 mmHg CPP). It is modelled here as scaling with three of the same quality factors the guideline box already tracks:
CPP ≈ CPP_max · depthFactor · rateFactor · (0.4 + 0.6·recoilFactor)
- Depth & rate factors peak at 1.0 inside the 5–6 cm / 100–120 min⁻¹ guideline window and fall off outside it — too shallow under-perfuses, too fast or too deep wastes the diastolic refill time the heart needs between pushes.
- Recoil factor is weighted the heaviest of the three: leaning on the chest (incomplete recoil) keeps intrathoracic pressure elevated, blocks venous return to the right atrium, and directly suppresses CPP — a real, guideline-flagged mechanism, not just a cosmetic penalty.
- Auto Compressions — drives repeated half-sine pushes at the chosen rate; the controller tunes their strength to hit the target depth.
- Hold to Compress — apply your own downward force directly (mouse/touch/space); release to watch the spring recoil the sternum.
- AHA/ERC guidelines target 5–6 cm depth at 100–120 compressions/min with full recoil between pushes — the guideline box and the CPP estimate both reward hitting all three at once.