My friend is a cardiac surgery resident and she has presentation tomorrow on cardiac surgical physiology I want you to make the best and understandable presentation with keypoints added in it and it should be oriented from cardiac surgery in adults by lawrence and david book having following contents: Cellular components and cellular activation Electrical activation of the heart Regulation of cellular function Contraction of cardiac muscle The pump Energetics Functional response to metabolic needs Coronary blood flow Physiology of heart failure
mkdir -p /home/daytona/workspace/cardiac-physiology-pptx && ls /home/daytona/workspace/
~/cardiac-physiology-pptx/build.js
const pptxgen = require("pptxgenjs");
const pres = new pptxgen();
pres.layout = "LAYOUT_WIDE";
pres.title = "Cardiac Surgical Physiology";
pres.subject = "Adult Cardiac Surgery – Physiological Foundations";
pres.author = "Cardiac Surgery Residency";
// ─── COLOR PALETTE ───────────────────────────────────────────────
const C = {
bg: "0A1628", // deep navy (dominant dark)
panel: "112240", // slightly lighter navy
accent1: "1E88E5", // bright blue
accent2: "E53935", // vivid red (surgical)
gold: "FFB300", // amber highlight
text: "E8F0FE", // near-white text
subtext: "90CAF9", // light-blue subtext
bullet: "42A5F5", // bullet color
divider: "1E3A5F", // subtle divider
keypoint_bg: "162B50", // key-point box bg
white: "FFFFFF",
green: "00E676",
};
// ─── HELPERS ──────────────────────────────────────────────────────
function titleSlide(title, subtitle) {
const s = pres.addSlide();
s.background = { color: C.bg };
// Left accent bar
s.addShape(pres.ShapeType.rect, {
x: 0, y: 0, w: 0.25, h: 7.5,
fill: { color: C.accent1 }, line: { color: C.accent1 },
});
// Decorative heart shape (circle approximation)
s.addShape(pres.ShapeType.ellipse, {
x: 10, y: 1.2, w: 2.8, h: 2.8,
fill: { color: C.accent2, transparency: 80 },
line: { color: C.accent2, pt: 1 },
});
s.addShape(pres.ShapeType.ellipse, {
x: 10.5, y: 1.7, w: 1.8, h: 1.8,
fill: { color: C.accent2, transparency: 60 },
line: { color: C.accent2, pt: 1 },
});
s.addText("CARDIAC SURGICAL PHYSIOLOGY", {
x: 0.6, y: 1.3, w: 9.8, h: 1.0,
fontSize: 36, bold: true, color: C.white,
charSpacing: 4, fontFace: "Calibri",
});
s.addText(title, {
x: 0.6, y: 2.5, w: 9.8, h: 0.7,
fontSize: 22, color: C.gold, bold: true, fontFace: "Calibri",
});
s.addShape(pres.ShapeType.rect, {
x: 0.6, y: 3.3, w: 8.0, h: 0.04,
fill: { color: C.accent1 }, line: { color: C.accent1 },
});
s.addText(subtitle, {
x: 0.6, y: 3.5, w: 9.8, h: 0.6,
fontSize: 14, color: C.subtext, fontFace: "Calibri",
});
s.addText("Adult Cardiac Surgery – Physiological Foundations", {
x: 0.6, y: 6.8, w: 9.8, h: 0.4,
fontSize: 11, color: C.divider, italic: true, fontFace: "Calibri",
});
return s;
}
function sectionHeader(num, title, subtitle) {
const s = pres.addSlide();
s.background = { color: C.bg };
// Full-width top accent
s.addShape(pres.ShapeType.rect, {
x: 0, y: 0, w: 13.3, h: 0.18,
fill: { color: C.accent1 }, line: { color: C.accent1 },
});
// Circle number badge
s.addShape(pres.ShapeType.ellipse, {
x: 0.5, y: 1.4, w: 1.4, h: 1.4,
fill: { color: C.accent2 }, line: { color: C.accent2 },
});
s.addText(String(num), {
x: 0.5, y: 1.5, w: 1.4, h: 1.2,
fontSize: 40, bold: true, color: C.white, align: "center", fontFace: "Calibri",
});
s.addText(title.toUpperCase(), {
x: 2.3, y: 1.4, w: 10.5, h: 1.0,
fontSize: 30, bold: true, color: C.white, charSpacing: 2, fontFace: "Calibri",
});
s.addShape(pres.ShapeType.rect, {
x: 2.3, y: 2.55, w: 7.0, h: 0.05,
fill: { color: C.gold }, line: { color: C.gold },
});
s.addText(subtitle, {
x: 2.3, y: 2.75, w: 10.5, h: 0.7,
fontSize: 16, color: C.subtext, fontFace: "Calibri",
});
return s;
}
function contentSlide(title, bullets, keypoints) {
const s = pres.addSlide();
s.background = { color: C.bg };
// Top bar
s.addShape(pres.ShapeType.rect, {
x: 0, y: 0, w: 13.3, h: 0.12,
fill: { color: C.accent1 }, line: { color: C.accent1 },
});
// Title panel
s.addShape(pres.ShapeType.rect, {
x: 0, y: 0.12, w: 13.3, h: 0.9,
fill: { color: C.panel }, line: { color: C.panel },
});
s.addText(title, {
x: 0.3, y: 0.15, w: 12.7, h: 0.82,
fontSize: 21, bold: true, color: C.white, fontFace: "Calibri", valign: "middle",
});
// Bullet column
const bulletItems = bullets.map((b, i) => {
if (b.startsWith("##")) {
return [
{ text: b.replace("##", "").trim(), options: { bold: true, color: C.gold, fontSize: 13.5, breakLine: true } }
];
}
return [
{ text: "◆ ", options: { color: C.accent1, bold: true, fontSize: 12 } },
{ text: b, options: { color: C.text, fontSize: 12, breakLine: i < bullets.length - 1 } },
];
}).flat();
s.addText(bulletItems, {
x: 0.35, y: 1.15, w: keypoints ? 7.9 : 12.8, h: 5.9,
fontFace: "Calibri", valign: "top", paraSpaceAfter: 5,
});
// Key Points panel (right side)
if (keypoints && keypoints.length > 0) {
s.addShape(pres.ShapeType.roundRect, {
x: 8.6, y: 1.15, w: 4.4, h: 5.9,
fill: { color: C.keypoint_bg }, line: { color: C.accent1, pt: 1.5 },
rectRadius: 0.12,
});
s.addText("🔑 KEY POINTS", {
x: 8.7, y: 1.2, w: 4.2, h: 0.4,
fontSize: 11, bold: true, color: C.gold, fontFace: "Calibri", charSpacing: 1,
});
s.addShape(pres.ShapeType.rect, {
x: 8.7, y: 1.62, w: 4.1, h: 0.03,
fill: { color: C.gold }, line: { color: C.gold },
});
const kpItems = keypoints.map((k, i) => [
{ text: "▸ ", options: { color: C.green, bold: true, fontSize: 11 } },
{ text: k, options: { color: C.text, fontSize: 11, breakLine: i < keypoints.length - 1 } },
]).flat();
s.addText(kpItems, {
x: 8.75, y: 1.72, w: 4.1, h: 5.2,
fontFace: "Calibri", valign: "top", paraSpaceAfter: 8,
});
}
return s;
}
function twoColumnSlide(title, col1Title, col1Items, col2Title, col2Items) {
const s = pres.addSlide();
s.background = { color: C.bg };
s.addShape(pres.ShapeType.rect, {
x: 0, y: 0, w: 13.3, h: 0.12,
fill: { color: C.accent1 }, line: { color: C.accent1 },
});
s.addShape(pres.ShapeType.rect, {
x: 0, y: 0.12, w: 13.3, h: 0.9,
fill: { color: C.panel }, line: { color: C.panel },
});
s.addText(title, {
x: 0.3, y: 0.15, w: 12.7, h: 0.82,
fontSize: 21, bold: true, color: C.white, fontFace: "Calibri", valign: "middle",
});
// Col 1
s.addShape(pres.ShapeType.rect, {
x: 0.3, y: 1.15, w: 6.0, h: 0.4,
fill: { color: C.accent2 }, line: { color: C.accent2 },
});
s.addText(col1Title, {
x: 0.3, y: 1.15, w: 6.0, h: 0.4,
fontSize: 13, bold: true, color: C.white, align: "center", fontFace: "Calibri",
});
const c1 = col1Items.map((b, i) => [
{ text: "◆ ", options: { color: C.accent1, bold: true, fontSize: 12 } },
{ text: b, options: { color: C.text, fontSize: 11.5, breakLine: i < col1Items.length - 1 } },
]).flat();
s.addText(c1, { x: 0.3, y: 1.65, w: 6.0, h: 5.5, fontFace: "Calibri", valign: "top", paraSpaceAfter: 6 });
// Col 2
s.addShape(pres.ShapeType.rect, {
x: 6.9, y: 1.15, w: 6.1, h: 0.4,
fill: { color: C.accent1 }, line: { color: C.accent1 },
});
s.addText(col2Title, {
x: 6.9, y: 1.15, w: 6.1, h: 0.4,
fontSize: 13, bold: true, color: C.white, align: "center", fontFace: "Calibri",
});
const c2 = col2Items.map((b, i) => [
{ text: "◆ ", options: { color: C.gold, bold: true, fontSize: 12 } },
{ text: b, options: { color: C.text, fontSize: 11.5, breakLine: i < col2Items.length - 1 } },
]).flat();
s.addText(c2, { x: 6.9, y: 1.65, w: 6.1, h: 5.5, fontFace: "Calibri", valign: "top", paraSpaceAfter: 6 });
return s;
}
function tableSlide(title, headers, rows) {
const s = pres.addSlide();
s.background = { color: C.bg };
s.addShape(pres.ShapeType.rect, {
x: 0, y: 0, w: 13.3, h: 0.12,
fill: { color: C.accent1 }, line: { color: C.accent1 },
});
s.addShape(pres.ShapeType.rect, {
x: 0, y: 0.12, w: 13.3, h: 0.9,
fill: { color: C.panel }, line: { color: C.panel },
});
s.addText(title, {
x: 0.3, y: 0.15, w: 12.7, h: 0.82,
fontSize: 21, bold: true, color: C.white, fontFace: "Calibri", valign: "middle",
});
const tableData = [
headers.map(h => ({
text: h,
options: { bold: true, color: C.white, fill: { color: C.accent2 }, fontSize: 13, align: "center" },
})),
...rows.map((row, ri) => row.map(cell => ({
text: cell,
options: { color: C.text, fill: { color: ri % 2 === 0 ? C.keypoint_bg : C.panel }, fontSize: 12 },
}))),
];
s.addTable(tableData, {
x: 0.4, y: 1.2, w: 12.5,
border: { pt: 0.5, color: C.divider },
rowH: 0.5,
});
return s;
}
// ═══════════════════════════════════════════════════════════════════
// SLIDE DECK
// ═══════════════════════════════════════════════════════════════════
// ── TITLE SLIDE ──────────────────────────────────────────────────
{
const s = pres.addSlide();
s.background = { color: C.bg };
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 0.35, h: 7.5, fill: { color: C.accent1 }, line: { color: C.accent1 } });
s.addShape(pres.ShapeType.rect, { x: 0, y: 7.2, w: 13.3, h: 0.3, fill: { color: C.accent2 }, line: { color: C.accent2 } });
// Decorative circles
s.addShape(pres.ShapeType.ellipse, { x: 10.5, y: 0.5, w: 3, h: 3, fill: { color: C.accent1, transparency: 88 }, line: { color: C.accent1, pt: 1 } });
s.addShape(pres.ShapeType.ellipse, { x: 11.2, y: 1.2, w: 1.8, h: 1.8, fill: { color: C.accent2, transparency: 80 }, line: { color: C.accent2, pt: 1 } });
s.addText("CARDIAC SURGICAL", {
x: 0.7, y: 0.9, w: 10, h: 1.1,
fontSize: 42, bold: true, color: C.white, charSpacing: 6, fontFace: "Calibri",
});
s.addText("PHYSIOLOGY", {
x: 0.7, y: 1.9, w: 10, h: 1.1,
fontSize: 42, bold: true, color: C.accent1, charSpacing: 12, fontFace: "Calibri",
});
s.addShape(pres.ShapeType.rect, { x: 0.7, y: 3.1, w: 9, h: 0.06, fill: { color: C.gold }, line: { color: C.gold } });
s.addText("Adult Cardiac Surgery in Adults — Lawrence H. Cohn & David H. Adams", {
x: 0.7, y: 3.3, w: 11, h: 0.5,
fontSize: 14, color: C.gold, fontFace: "Calibri", italic: true,
});
s.addText([
{ text: "Topics Covered: ", options: { bold: true, color: C.subtext } },
{ text: "Cellular Components • Electrical Activation • Regulation of Cellular Function • Cardiac Contraction • The Pump • Energetics • Functional Response to Metabolic Needs • Coronary Blood Flow • Physiology of Heart Failure", options: { color: C.text } },
], {
x: 0.7, y: 4.1, w: 12.2, h: 1.6,
fontSize: 12, fontFace: "Calibri", paraSpaceAfter: 4,
});
s.addText("Cardiac Surgery Residency Presentation • " + new Date().toLocaleDateString("en-US", { year: "numeric", month: "long", day: "numeric" }), {
x: 0.7, y: 6.8, w: 12, h: 0.35,
fontSize: 11, color: C.subtext, italic: true, fontFace: "Calibri",
});
}
// ── TABLE OF CONTENTS ────────────────────────────────────────────
{
const s = pres.addSlide();
s.background = { color: C.bg };
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 13.3, h: 0.18, fill: { color: C.accent1 }, line: { color: C.accent1 } });
s.addText("CONTENTS", {
x: 0.5, y: 0.35, w: 12, h: 0.7,
fontSize: 28, bold: true, color: C.white, charSpacing: 4, fontFace: "Calibri",
});
s.addShape(pres.ShapeType.rect, { x: 0.5, y: 1.1, w: 6, h: 0.04, fill: { color: C.gold }, line: { color: C.gold } });
const topics = [
"01 Cellular Components & Cellular Activation",
"02 Electrical Activation of the Heart",
"03 Regulation of Cellular Function",
"04 Contraction of Cardiac Muscle",
"05 The Pump",
"06 Energetics",
"07 Functional Response to Metabolic Needs",
"08 Coronary Blood Flow",
"09 Physiology of Heart Failure",
];
const col1 = topics.slice(0, 5);
const col2 = topics.slice(5);
const mkItems = (arr) => arr.map((t, i) => [
{ text: t.slice(0, 2) + " ", options: { bold: true, color: C.accent2, fontSize: 14 } },
{ text: t.slice(4), options: { color: C.text, fontSize: 14, breakLine: i < arr.length - 1 } },
]).flat();
s.addText(mkItems(col1), { x: 0.5, y: 1.3, w: 6.0, h: 5.8, fontFace: "Calibri", paraSpaceAfter: 14, valign: "top" });
s.addText(mkItems(col2), { x: 7.1, y: 1.3, w: 5.8, h: 5.8, fontFace: "Calibri", paraSpaceAfter: 14, valign: "top" });
}
// ═══════════════════════════════════════════════════════════════════
// SECTION 1 – CELLULAR COMPONENTS & CELLULAR ACTIVATION
// ═══════════════════════════════════════════════════════════════════
sectionHeader(1, "Cellular Components & Cellular Activation", "Structural basis of cardiac cell function and how cardiomyocytes are organized");
contentSlide(
"Cellular Architecture of the Heart",
[
"Three major components: contracting cardiomyocytes, conducting cells, and extracellular connective tissue",
"Cardiomyocytes: 20 μm (atrial) to 140 μm (ventricular) in length",
"~50% of cardiomyocyte volume = myofibrils; remainder = mitochondria, nucleus, SR, cytosol",
"Sarcolemma (outer plasma membrane) invaginates via T-tubules into myofibrils",
"##Extracellular Matrix",
"Collagen — main determinant of myocardial stiffness",
"Elastin — chief constituent of elastic fibers; provides elastic properties",
"Proteoglycans: heparan sulfate, chondroitin, fibronectin, laminin",
"Matrix metalloproteinases (MMPs) — degrade collagen; balance synthesis vs. breakdown governs mechanical properties",
"##Myofibril & Sarcomere",
"Sarcomere = basic unit of contraction (actin + myosin filaments)",
"Contractile proteins ~80% of myofibrillar protein; regulatory & structural proteins make up remainder",
],
[
"Cardiomyocyte volume ~50% myofibrils",
"T-tubules are 5× wider than skeletal muscle — abundant Ca²⁺ storage",
"Collagen determines myocardial stiffness",
"Sarcomere = smallest functional unit of contraction",
"MMP–collagen balance governs cardiac mechanics",
]
);
contentSlide(
"Intercalated Discs, Syncytium & Gap Junctions",
[
"Intercalated discs are cell membranes separating individual cardiac muscle cells",
"Each disc forms permeable communicating junctions — gap junctions — allowing rapid ion diffusion",
"Ions move freely along longitudinal axis → action potentials propagate without interruption",
"Heart acts as a functional syncytium: electrical signal in one cell rapidly spreads to all",
"##Fiber Organization",
"Atrial and ventricular muscle: contract similarly to skeletal muscle but with longer duration",
"Specialized excitatory/conductive fibers: few contractile fibrils; provide automaticity and conduction",
"##Left Ventricular Torsion",
"Subepicardial fibers spiral leftward; subendocardial fibers spiral rightward — double helix arrangement",
"During systole: apex rotates counterclockwise; base rotates clockwise → wringing/twisting motion",
"At end-systole: LV acts as loaded spring; recoils/untwists during diastole for rapid filling",
],
[
"Gap junctions allow cell-to-cell electrical coupling",
"Functional syncytium: all cells depolarize as one unit",
"LV torsion improves ejection efficiency",
"Intercalated discs are unique to cardiac muscle",
"Conduction fibers: automaticity > contractility",
]
);
// ═══════════════════════════════════════════════════════════════════
// SECTION 2 – ELECTRICAL ACTIVATION
// ═══════════════════════════════════════════════════════════════════
sectionHeader(2, "Electrical Activation of the Heart", "Pacemaker cells, action potentials, conduction system, and the ECG");
contentSlide(
"Cardiac Action Potential – 5 Phases",
[
"##Phase 0 — Rapid Depolarization",
"Fast Na⁺ channels open → rapid upstroke (membrane potential reaches +20 to +30 mV)",
"##Phase 1 — Initial Repolarization",
"Fast Na⁺ channels inactivate; brief K⁺ efflux causes small repolarization",
"##Phase 2 — Plateau",
"Slow L-type Ca²⁺ channels open; inward Ca²⁺ balances K⁺ efflux → prolonged plateau (unique to cardiac muscle)",
"Plateau prevents tetanic contraction — physiologically critical for cardiac function",
"##Phase 3 — Rapid Repolarization",
"K⁺ channels predominate; Ca²⁺ channels close → return to resting potential",
"##Phase 4 — Resting Membrane Potential",
"SA/AV node cells: slow spontaneous depolarization due to funny current (If) → automaticity",
"Ventricular myocytes: stable at −90 mV (no spontaneous depolarization)",
],
[
"Plateau (Phase 2) is unique to cardiac muscle — no tetany",
"L-type Ca²⁺ channels are the target of CCBs",
"SA node fires at 60–100 bpm (highest automaticity)",
"AV node: 40–60 bpm; Ventricles: 20–40 bpm",
"Absolute refractory period prevents re-stimulation during contraction",
]
);
twoColumnSlide(
"Conduction System & ECG Correlation",
"Conduction Pathway",
[
"SA Node → primary pacemaker; T1–T4 sympathetic control; vagus for parasympathetic",
"Internodal tracts → carry impulse to AV node (delay: ~0.1 sec)",
"AV Node → gate-keeper; allows ventricular filling before systole",
"Bundle of His → only electrical connection AV–ventricular",
"Left & Right Bundle Branches → fast conduction to ventricular myocardium",
"Purkinje Fibers → terminal distribution; fastest conduction (2–4 m/s)",
],
"ECG Correlations",
[
"P wave — atrial depolarization (SA → AV)",
"PR interval — AV nodal delay (0.12–0.20 sec normal)",
"QRS complex — ventricular depolarization; width < 0.12 sec normal",
"ST segment — ventricular plateau (Phase 2)",
"T wave — ventricular repolarization",
"QT interval — total ventricular action potential duration",
"Escape pacemakers: atria → AV node → ventricles (in order of rate hierarchy)",
]
);
// ═══════════════════════════════════════════════════════════════════
// SECTION 3 – REGULATION OF CELLULAR FUNCTION
// ═══════════════════════════════════════════════════════════════════
sectionHeader(3, "Regulation of Cellular Function", "Neural, hormonal, and calcium-mediated control of cardiomyocyte performance");
contentSlide(
"Autonomic & Hormonal Regulation",
[
"##Sympathetic (β₁-Adrenergic)",
"Norepinephrine/Epinephrine → ↑cAMP via adenylyl cyclase → PKA activation",
"PKA phosphorylates: L-type Ca²⁺ channels (↑inotropy), phospholamban (↑lusitropy), troponin I (↑relaxation rate)",
"Net effect: ↑HR (chronotropy), ↑force (inotropy), ↑conduction (dromotropy), ↑relaxation (lusitropy)",
"##Parasympathetic (Muscarinic M₂)",
"ACh → ↓cAMP; ↑IKACh → hyperpolarization → ↓HR, ↓AV conduction",
"Mediated by vagus nerve — dominant at rest",
"##Hormonal",
"Thyroid hormones: ↑β-receptor density; ↑SERCA expression → hyperdynamic state",
"ANP/BNP: released by myocytes under stretch → natriuresis, vasodilation, ↓preload",
"Cardiomyocytes themselves synthesize/secrete hormones (autocrine/paracrine)",
"Cardiac reflexes (Bainbridge, Bezold-Jarisch) fine-tune output via afferent loops",
],
[
"β₁ stimulation → ↑Ca²⁺ → ↑contractility",
"PKA is the master kinase of cardiac inotropy",
"Vagal tone dominates resting HR",
"BNP = clinical marker of ventricular wall stress",
"Thyroid excess → sinus tachycardia & high-output state",
"Calcium is the universal second messenger",
]
);
contentSlide(
"Calcium — The Master Regulator",
[
"##Excitation-Contraction (EC) Coupling",
"Action potential → T-tubule depolarization → voltage-gated L-type Ca²⁺ channels open",
"Small Ca²⁺ entry triggers Calcium-Induced Calcium Release (CICR) via Ryanodine Receptors (RyR2) on SR",
"Cytosolic Ca²⁺ rises from 10⁻⁷ to 10⁻⁵ mol/L → binds troponin C → cross-bridge cycling begins",
"##Calcium Removal (Relaxation)",
"SERCA2a (SR Ca²⁺-ATPase) — pumps Ca²⁺ back into SR; regulated by phospholamban",
"NCX (Na⁺/Ca²⁺ exchanger) — extrudes Ca²⁺ from cell; driven by Na⁺ gradient",
"Na⁺/K⁺-ATPase maintains Na⁺ gradient for NCX to function",
"##Clinical Significance",
"T-tubule Ca²⁺ concentration depends on extracellular Ca²⁺ → cardiac muscle more sensitive than skeletal",
"Ca²⁺-free solution → cardiac arrest (basis of cardioplegia!)",
"SERCA2a downregulated in HF → impaired relaxation (diastolic dysfunction)",
],
[
"CICR via RyR2 amplifies small trigger Ca²⁺",
"SERCA2a is key target in HF therapeutics",
"Phospholamban = brake on SERCA; phosphorylation removes brake",
"Ca²⁺-free solution stops the heart — basis of cardioplegia",
"NCX driven by Na⁺ gradient — digitalis works here",
"Ca²⁺-sparks are local, spatially patterned release events",
]
);
// ═══════════════════════════════════════════════════════════════════
// SECTION 4 – CONTRACTION OF CARDIAC MUSCLE
// ═══════════════════════════════════════════════════════════════════
sectionHeader(4, "Contraction of Cardiac Muscle", "Sarcomeric mechanics, cross-bridge cycling, and length-tension relationships");
contentSlide(
"Sliding Filament Theory & Cross-Bridge Cycling",
[
"##Sarcomere Structure",
"Thick filaments: myosin (motor protein) with globular heads",
"Thin filaments: actin + troponin complex (TnC, TnI, TnT) + tropomyosin",
"At rest: tropomyosin blocks myosin-binding sites on actin",
"##Steps of Cross-Bridge Cycling",
"1. Ca²⁺ binds TnC → conformational change → tropomyosin shifts → active site on actin exposed",
"2. Myosin head (ADP+Pi bound) attaches to actin → power stroke → filament slides",
"3. ATP binds myosin head → detachment from actin",
"4. ATP hydrolysis recharges myosin head (ADP+Pi) → ready for next cycle",
"5. Cycle repeats as long as Ca²⁺ remains elevated",
"##Rigor",
"ATP depletion → myosin stuck to actin → rigor mortis; same mechanism in ischemic contracture",
],
[
"Tropomyosin is the gatekeeper — Ca²⁺ is the key",
"Each cross-bridge cycle consumes 1 ATP",
"No ATP → rigor (ischemic contracture in surgery!)",
"Thin filament regulation: TnC (Ca²⁺ sensor), TnI (inhibitory), TnT (anchors to tropomyosin)",
"Myosin ATPase rate determines speed of contraction",
]
);
contentSlide(
"Length-Tension Relationship & Frank-Starling Law",
[
"##Length-Tension Relationship",
"Optimal sarcomere length: 2.0–2.2 μm — maximum overlap of actin & myosin → maximum force",
"Underfilling: too little overlap → reduced cross-bridge formation → reduced force",
"Overfilling: sarcomeres stretched beyond optimal → reduced overlap → force declines",
"##Frank-Starling Mechanism",
"Greater end-diastolic volume (EDV) → greater sarcomere stretch → increased force of contraction",
"Heart automatically pumps all blood returned to it (within physiological limits)",
"Molecular basis: increased Ca²⁺ sensitivity of myofilaments at longer sarcomere length",
"Bainbridge reflex: right atrial stretch → ↑HR by 10–20% (additional mechanism)",
"##Ventricular Function Curves",
"Starling curves plot stroke work vs. atrial filling pressure",
"Upward shift = increased inotropy (catecholamines); Downward shift = heart failure",
"Pressure-Volume loops: gold standard for assessing ventricular mechanics",
],
[
"Frank-Starling: stretch → ↑Ca²⁺ sensitivity → ↑force",
"Clinical: adequate preload = optimal cardiac output",
"Overfilling causes systolic dysfunction (stretched sarcomeres)",
"ESPVR slope = Emax = load-independent contractility index",
"Preload = EDV; Afterload = aortic pressure (wall stress)",
]
);
// ═══════════════════════════════════════════════════════════════════
// SECTION 5 – THE PUMP
// ═══════════════════════════════════════════════════════════════════
sectionHeader(5, "The Pump", "Cardiac cycle, determinants of output, and ventricular mechanics in the surgical context");
contentSlide(
"The Cardiac Cycle & Cardiac Output",
[
"Heart = two-pump circuit in series; RV faces low-resistance pulmonary circuit; LV faces high-resistance systemic circuit",
"##Cardiac Output (CO)",
"CO = HR × Stroke Volume; Normal resting adult: 4–6 L/min",
"Cardiac Index (CI) = CO / BSA (normalizes for body size)",
"Oxygen Delivery: DO₂ = CO × (Hb × 1.3 × SaO₂ + 0.003 × PaO₂)",
"##Four Determinants of CO",
"Heart Rate (chronotropy) — SA node driven; modulated by ANS",
"Preload — ventricular EDV (Frank-Starling); governed by venous return",
"Afterload — resistance against ejection; SVR (LV) or PVR (RV)",
"Contractility (inotropy) — intrinsic myocardial force independent of preload/afterload",
"##Vascular Resistance",
"Ohm's Law equivalent: Pressure gradient = CO × Resistance",
"MAP – CVP = CO × SVR; Low PVR → RV uses less energy → RV cannot tolerate acute PVR rises (e.g., pneumonectomy, PE)",
],
[
"CI < 2.2 L/min/m² = cardiogenic shock threshold",
"Hemoglobin & SaO₂ dominate DO₂ — not just CO",
"Preload: use CVP/PCWP for monitoring",
"Afterload: vasoplegia after CPB drops SVR → vasopressors needed",
"RV has limited PVR reserve — danger after pneumonectomy",
"SVR = (MAP – CVP) / CO × 80",
]
);
twoColumnSlide(
"Systole & Diastole — Phases of the Cardiac Cycle",
"Systolic Events",
[
"Isovolumetric contraction: AV valves close (S1); pressure rises with no volume change",
"Rapid ejection: aortic/pulmonic valves open; ~70% of SV ejected",
"Reduced ejection: pressure declines; valves still open",
"Aortic valve closure (S2): marks end of systole; dicrotic notch on aortic trace",
"Normal EF = 55–65%; surgical EF concern < 35%",
"Coronary ostia partially covered by aortic cusps during systole → minimal coronary filling during systole",
],
"Diastolic Events",
[
"Isovolumetric relaxation: all valves closed; pressure drops rapidly",
"Rapid filling (E wave): mitral/tricuspid open; 70–80% of filling",
"Diastasis: slow filling phase",
"Atrial contraction (A wave): 20–30% of filling; lost in AF",
"LVEDP normal: 5–12 mmHg; elevation = diastolic dysfunction",
"Subendocardial supply: heart supplied primarily DURING DIASTOLE (critical during CPR/cardiac surgery)",
]
);
// ═══════════════════════════════════════════════════════════════════
// SECTION 6 – ENERGETICS
// ═══════════════════════════════════════════════════════════════════
sectionHeader(6, "Energetics", "Myocardial oxygen consumption, ATP production, and substrate utilization");
contentSlide(
"Myocardial Oxygen Consumption & Energy Demands",
[
"Heart = obligate aerobe; cannot sustain function on anaerobic metabolism alone",
"MVO₂ (myocardial O₂ consumption) correlates with cardiac minute work",
"##Pressure Work vs. Volume Work",
"Pressure work = far more O₂-costly than volume work (internal work/heat)",
"Aortic stenosis → LV develops high pressure → markedly ↑MVO₂ even with ↓CO",
"Exercise → volume work ↑ up to 50% total → MVO₂ increases but less than with pressure load",
"LV wall is thicker than RV wall: compensates for higher pressure work (LV mean = 100 mmHg vs. PA = 15 mmHg)",
"##Law of Laplace",
"P = 2HT / r (sphere approximation)",
"↑Wall thickness (H) → ↑pressure capability; ↑radius (dilation) → ↑wall stress → ↑MVO₂",
"Compensatory hypertrophy in HTN/AS — eventually maladaptive (→ HF)",
"Systemic HTN: LV hypertrophies → ↑MVO₂ → demand-supply mismatch → ischemia",
],
[
"Pressure work >> volume work in O₂ cost",
"AS: ↑MVO₂ despite ↓CO — high surgical risk",
"Laplace: ↑radius → ↑wall stress (dilated CM)",
"Hypertrophy = compensation; then decompensation",
"Key determinants of MVO₂: HR, contractility, wall stress",
"Double product (HR × SBP) estimates MVO₂",
]
);
contentSlide(
"ATP Production & Metabolic Substrate Utilization",
[
"##Normal Energy Metabolism",
"Adult heart derives 60–70% energy from fatty acid β-oxidation in mitochondria",
"FA metabolism governed by PPARα / PGC-1α transcription factors",
"Remaining energy from glucose, lactate, ketones, and amino acids",
"##Creatine Kinase (CK) Shuttle",
"ATP generated in mitochondria → transferred to cytosol as phosphocreatine (PCr)",
"PCr + ADP → ATP + Creatine (at contractile sites) — rapid energy buffering",
"##In Heart Failure",
"ATP, total adenine nucleotide pool, CK activity, PCr, and PCr/ATP ratio ALL decreased",
"Shift from FA oxidation → glycolytic metabolism (fetal gene program)",
"Enhanced ketone use may be adaptive; exogenous ketone therapy under study",
"Mitochondrial dynamics disrupted: reduced fusion → ↓O₂ consumption, fragmented mitochondria",
"Trimetazidine (FA oxidation inhibitor): improves NYHA class, LVEF (ESC IIb-A for HF + angina)",
],
[
"Heart prefers fatty acids at rest (60–70% of energy)",
"CK shuttle: rapid ATP delivery to sarcomere",
"HF: energetic failure — all systems downregulated",
"PCr/ATP ratio predicts HF severity",
"Glycolytic switch in HF = metabolic remodeling",
"Mitochondrial fusion/fission balance critical",
]
);
// ═══════════════════════════════════════════════════════════════════
// SECTION 7 – FUNCTIONAL RESPONSE TO METABOLIC NEEDS
// ═══════════════════════════════════════════════════════════════════
sectionHeader(7, "Functional Response to Metabolic Needs", "How the heart adjusts output to meet changing physiological demands");
contentSlide(
"Coupling Cardiac Output to Metabolic Demand",
[
"Heart must match CO to O₂ delivery needs — acute and chronic",
"##During Exercise",
"Sympathetic activation: ↑HR, ↑contractility, ↑venous return (Starling mechanism)",
"CO rises 4–7× in young adults at maximal exercise",
"Arterio-venous O₂ difference widens (tissues extract more O₂)",
"Local metabolites (CO₂, adenosine, H⁺, K⁺) cause coronary vasodilation",
"##Bainbridge Reflex",
"Atrial stretch → ↑HR (10–20%) via afferent vagal fibers → helps increase CO with volume loading",
"##Cushing Reflex",
"↑ICP → systemic hypertension + bradycardia (Cushing triad) — protective brainstem perfusion",
"##Anrep Effect",
"Acute ↑afterload → initial ↓SV → gradual recovery via intrinsic myocardial adaptation (↑contractility)",
"##Bowditch / Treppe Effect",
"↑HR → ↑intracellular Ca²⁺ accumulation → ↑force of contraction (positive staircase effect)",
],
[
"Sympathetic surge is primary exercise adaptor",
"Bainbridge: volume → rate increase",
"Bowditch: rate → force increase (frequency-dependent inotropy)",
"Anrep: afterload → delayed contractility increase",
"Anaerobic threshold: CO cannot meet demand beyond VO₂max",
"Chronic training: eccentric hypertrophy, ↑SV, ↓resting HR",
]
);
contentSlide(
"Preload, Afterload & Venous Return in Clinical Context",
[
"##Preload",
"Defined by EDV (end-diastolic volume) or LVEDP",
"Increased by: IV fluids, Trendelenburg, vasodilator withdrawal, leg raising",
"Decreased by: diuresis, vasodilation, positive pressure ventilation, cardiac tamponade",
"##Afterload",
"LV: SVR + aortic impedance; RV: PVR",
"↑Afterload (HTN, AS, vasoconstriction) → ↓SV, ↑MVO₂, wall stress ↑",
"Post-CPB vasoplegia: SVR drops sharply → need vasopressors (NE, vasopressin)",
"##Venous Return",
"Driven by mean systemic filling pressure – RAP",
"Cardiac surgery: controlled by anesthesia (vasodilators, fluids, inotropes)",
"Frank-Starling operating point: intersection of venous return curve and cardiac function curve",
"##Clinical Targets (Post-Cardiac Surgery)",
"CVP: 6–10 mmHg; PCWP: 12–18 mmHg; CI: > 2.2 L/min/m²; MAP > 65 mmHg",
],
[
"Optimal preload ≠ maximum preload",
"SVR guides vasopressor selection",
"PCWP > 18 = pulmonary edema risk",
"Cardiac tamponade: ↓preload all chambers equally",
"Mechanical ventilation: ↓venous return → ↓CO",
"Vasopressor of choice for vasoplegia: NE ± vasopressin",
]
);
// ═══════════════════════════════════════════════════════════════════
// SECTION 8 – CORONARY BLOOD FLOW
// ═══════════════════════════════════════════════════════════════════
sectionHeader(8, "Coronary Blood Flow", "Regulation, phasic flow patterns, and clinical implications for cardiac surgery");
contentSlide(
"Coronary Anatomy & Phasic Flow",
[
"Normal coronary blood flow: ~70 mL/min/100g heart weight (~225 mL/min total = 4–5% of CO)",
"##Phasic Nature of Coronary Flow",
"LEFT coronary flow: high during diastole; reduced during systole (intramyocardial compression)",
"RIGHT coronary flow: phasic changes but less pronounced (lower RV wall stress)",
"Heart is primarily supplied during DIASTOLE — critical implication for surgery and CPR",
"Failure to allow full chest recoil during CPR → reduced subendocardial supply",
"##Epicardial vs. Subendocardial Supply",
"Epicardial arteries: main conduit vessels → penetrate myocardium as intramuscular arteries",
"Subendocardial plexus: most vulnerable to ischemia (highest wall stress, furthest from epicardial supply)",
"During systole: subendocardial vessels most severely compressed",
"Subendocardial plexus normally compensated by extra vessel density — fails in disease",
],
[
"Coronary perfusion = diastolic dominant",
"Heart rate ↑ → shorter diastole → ↓coronary filling",
"Tachycardia in surgical patient = risk of ischemia",
"Subendocardium: highest risk zone in ischemia",
"Diastolic time: target for IABP augmentation",
]
);
contentSlide(
"Regulation of Coronary Blood Flow",
[
"##Local Metabolic Control (Primary)",
"Adenosine: most potent endogenous coronary vasodilator; released with ↑MVO₂ or ischemia",
"CO₂, H⁺, K⁺, lactate: vasodilators accumulating with myocardial work",
"Nitric oxide (NO): endothelium-derived; tonic vasodilation; impaired in atherosclerosis",
"##Autoregulation",
"Coronary flow maintained constant over perfusion pressure range 60–150 mmHg",
"Below 60 mmHg: flow becomes pressure-dependent (supply-demand crisis)",
"Maximal vasodilation (coronary reserve) revealed by adenosine/dipyridamole stress",
"##Neural Control",
"Sympathetic (α₁): vasoconstriction of large conduit vessels (offset by metabolic vasodilation)",
"β₂ stimulation: vasodilation of resistance vessels",
"##During Exercise",
"Coronary flow increases 3–4× during strenuous exercise (vs. 6–9× increase in cardiac work)",
"Ratio favors increased efficiency at peak demand",
],
[
"Adenosine = primary metabolic vasodilator",
"Autoregulation: 60–150 mmHg range",
"Below 60 mmHg → ischemia (pressure-passive flow)",
"NO impairment = endothelial dysfunction in CAD",
"CPB: maintained MAP > 50–60 mmHg to preserve autoregulation",
"Coronary steal: collateral-dependent territory at risk with vasodilators",
]
);
// ═══════════════════════════════════════════════════════════════════
// SECTION 9 – PHYSIOLOGY OF HEART FAILURE
// ═══════════════════════════════════════════════════════════════════
sectionHeader(9, "Physiology of Heart Failure", "Mechanisms, hemodynamics, and cardiac surgical implications");
contentSlide(
"Defining Heart Failure — A Physiological Framework",
[
"Heart failure (HF): inability of heart to meet metabolic demands or doing so only at elevated filling pressures",
"##Key Formula",
"CO = HR × EDV × EF [= Chronotropy × Lusitropy × Inotropy]",
"HF criterion: ↓CO (forward failure) AND/OR ↑intracardiac pressures (backward failure)",
"##HFrEF (Systolic Dysfunction)",
"EF < 40%; ↓inotropy; dilated ventricle; ↑EDV and LVEDP",
"Causes: ischemic CM, dilated CM, myocarditis, valvular disease",
"##HFpEF (Diastolic Dysfunction)",
"EF ≥ 50%; ↓lusitropy; stiff ventricle; ↑filling pressures with normal volumes",
"Causes: hypertensive CM, hypertrophic CM, restrictive CM, amyloid",
"##Mixed HF",
"Both systolic and diastolic components — common in end-stage disease, seen pre-operatively",
],
[
"CO = Chronotropy × Lusitropy × Inotropy",
"HFpEF: normal EF, abnormal diastole — don't be fooled",
"BNP/NT-proBNP reflects ventricular wall stress",
"EF < 35%: high surgical mortality; requires optimization",
"LVEDP > 25 mmHg → pulmonary congestion",
]
);
contentSlide(
"Pathophysiology: Ventricular Remodeling & Neurohormonal Activation",
[
"##Frank-Starling in Heart Failure",
"Initial compensation: ↑EDV → ↑SV (Starling mechanism exploited)",
"Inflection point: sarcomere overstretch → no further ↑inotropy (flat Starling curve)",
"Excessive EDV → subendocardial ischemia, troponin release, stunning, sarcomere remodeling → AHF",
"##Ventricular Remodeling",
"Repeated ↑LVEDV → fibrosis, hypertrophy → stiff, noncompliant ventricle",
"Diastolic dysfunction compounds systolic dysfunction over time",
"LV wall thinning + dilation → ↑afterload (Laplace) → afterload mismatch → ↓CO",
"##Neurohormonal Activation",
"RAAS: ↑Ang II → vasoconstriction, Na⁺ retention, aldosterone → ↑preload, ↑afterload",
"SNS: ↑NE → ↑HR, inotropy (short-term benefit); chronic → receptor downregulation, myocyte apoptosis",
"ADH (vasopressin): water retention → hyponatremia; ↑filling pressures",
"Counter-regulatory: ANP/BNP attempt to reduce preload — overwhelmed in advanced HF",
],
[
"Remodeling: from compensation to decompensation",
"Starling overexploitation → ischemia and troponin leak",
"RAAS blockade (ACEi/ARB/ARNI) cornerstone of HFrEF treatment",
"β-blockers: block SNS overdrive → ↑EF long-term",
"Loop diuretics: ↓preload, symptom relief",
"Surgical context: LVAD supports failing myocardium",
]
);
contentSlide(
"Cardiac Surgery in Heart Failure — Surgical Implications",
[
"##Pre-operative Optimization",
"Target PCWP < 18 mmHg, CI > 2.0 L/min/m², MAP > 65 mmHg before surgery",
"Diuresis, ACEi withdrawal, inotrope support (dobutamine/milrinone) to optimize hemodynamics",
"IABP: ↑diastolic coronary perfusion, ↓afterload — bridge to surgery or recovery",
"##Cardioplegia & Myocardial Protection",
"Cardioplegia exploits Ca²⁺-free arrest principle: depolarized (K⁺) or hyperpolarized (Mg²⁺/adenosine) arrest",
"Cold crystalloid or blood cardioplegia: hypothermia ↓MVO₂ ~50% per 10°C drop",
"##Post-operative Low Cardiac Output Syndrome",
"Definition: CI < 2.2 L/min/m² post-CPB despite adequate preload",
"Causes: myocardial stunning, ischemia/reperfusion injury, vasoplegia, SIRS",
"Management: inotropes (dobutamine, milrinone), vasopressors (NE), IABP, ECMO/LVAD",
"##Myocardial Stunning",
"Post-ischemic contractile dysfunction despite no necrosis — Ca²⁺ overload mechanism",
"Recovery expected within 24–48 hours with adequate support",
],
[
"IABP: ↑diastolic perfusion, ↓systolic afterload",
"Cardioplegia: arrest + protect during ischemia",
"Stunning ≠ infarction — recovery expected",
"Milrinone: PDE3 inhibitor; ↑cAMP → inotropy + vasodilation (ideal for low CO + ↑SVR)",
"ECMO: last resort for refractory low CO post-CPB",
"β-blocker withdrawal pre-op → rebound tachycardia risk",
]
);
// ─── SUMMARY SLIDE ───────────────────────────────────────────────
{
const s = pres.addSlide();
s.background = { color: C.bg };
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 13.3, h: 0.18, fill: { color: C.accent1 }, line: { color: C.accent1 } });
s.addShape(pres.ShapeType.rect, { x: 0, y: 7.2, w: 13.3, h: 0.3, fill: { color: C.accent2 }, line: { color: C.accent2 } });
s.addText("SUMMARY: CARDIAC SURGICAL PHYSIOLOGY", {
x: 0.4, y: 0.3, w: 12.5, h: 0.7,
fontSize: 22, bold: true, color: C.white, charSpacing: 2, fontFace: "Calibri",
});
s.addShape(pres.ShapeType.rect, { x: 0.4, y: 1.05, w: 12.5, h: 0.04, fill: { color: C.gold }, line: { color: C.gold } });
const summaryItems = [
["Cellular Components", "Cardiomyocytes + ECM + gap junctions form a functional syncytium; sarcomere = unit of contraction"],
["Electrical Activation", "SA node → AV node → Purkinje; Ca²⁺-plateau prevents tetany; 5-phase action potential"],
["Cellular Regulation", "β₁/M₂ autonomic control via Ca²⁺ & cAMP; SERCA2a governs relaxation"],
["Muscle Contraction", "Sliding filament + Ca²⁺-troponin switch; Frank-Starling: stretch → ↑force"],
["The Pump", "CO = HR × SV; determined by preload, afterload, contractility, HR"],
["Energetics", "FA oxidation dominant; MVO₂ ∝ pressure work; Laplace law governs wall stress"],
["Metabolic Response", "Bainbridge, Bowditch, Anrep effects; catecholamine surge during exercise/stress"],
["Coronary Flow", "Diastolic dominant; adenosine = primary metabolic vasodilator; autoregulation 60–150 mmHg"],
["Heart Failure", "CO = Chronotropy × Lusitropy × Inotropy; RAAS + SNS activation; surgical: IABP, LVAD, inotropes"],
];
const sumItems = summaryItems.map((row, i) => [
{ text: row[0] + ": ", options: { bold: true, color: C.gold, fontSize: 11.5 } },
{ text: row[1], options: { color: C.text, fontSize: 11.5, breakLine: i < summaryItems.length - 1 } },
]).flat();
s.addText(sumItems, {
x: 0.4, y: 1.2, w: 12.5, h: 5.9,
fontFace: "Calibri", valign: "top", paraSpaceAfter: 10,
});
}
// ─── SAVE ─────────────────────────────────────────────────────────
const outPath = "/home/daytona/workspace/cardiac-physiology-pptx/Cardiac_Surgical_Physiology.pptx";
pres.writeFile({ fileName: outPath }).then(() => {
console.log("✅ Saved:", outPath);
}).catch(err => {
console.error("❌ Error:", err);
process.exit(1);
});