Write me a presentation on Theories of Vision with Clinical interpretations with the reference to Guyton book of physiology for a 5 minutes
mkdir -p /home/daytona/workspace/theories-of-vision && ls /home/daytona/workspac…
~/theories-of-vision/build.js
const pptxgen = require("pptxgenjs");
const pres = new pptxgen();
pres.layout = "LAYOUT_16x9";
pres.title = "Theories of Vision with Clinical Interpretations";
pres.author = "Guyton & Hall Textbook of Medical Physiology";
// ─── PALETTE ────────────────────────────────────────────────────────────────
const C = {
navy: "0A1931", // dominant background
teal: "1A6B72", // accent header bar
gold: "F5C842", // highlight / accent
white: "FFFFFF",
light: "D6EAF8", // soft content text bg
gray: "B0BEC5",
red: "E53935",
green: "43A047",
blue: "1565C0",
};
// ─── HELPERS ────────────────────────────────────────────────────────────────
function sectionBar(slide, label) {
slide.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 0.55, fill: { color: C.teal }, line: { color: C.teal } });
slide.addText(label, { x: 0.15, y: 0.05, w: 9.7, h: 0.46, fontSize: 13, bold: true, color: C.gold, fontFace: "Calibri" });
}
function sourceTag(slide) {
slide.addText("Source: Guyton & Hall Textbook of Medical Physiology, 14th Ed.", {
x: 0.15, y: 5.3, w: 9.7, h: 0.25, fontSize: 8, italic: true, color: C.gray, fontFace: "Calibri"
});
}
// ═══════════════════════════════════════════════════════════════════════════
// SLIDE 1 — TITLE
// ═══════════════════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: C.navy }, line: { color: C.navy } });
// Decorative accent bar left
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 0.18, h: 5.625, fill: { color: C.gold }, line: { color: C.gold } });
s.addShape(pres.ShapeType.rect, { x: 0.22, y: 0, w: 0.06, h: 5.625, fill: { color: C.teal }, line: { color: C.teal } });
s.addText("THEORIES OF VISION", {
x: 0.6, y: 0.7, w: 8.8, h: 1.0,
fontSize: 38, bold: true, color: C.gold, fontFace: "Calibri", align: "left"
});
s.addText("with Clinical Interpretations", {
x: 0.6, y: 1.65, w: 8.8, h: 0.6,
fontSize: 22, color: C.white, fontFace: "Calibri", align: "left"
});
// Divider line
s.addShape(pres.ShapeType.rect, { x: 0.6, y: 2.38, w: 7.5, h: 0.04, fill: { color: C.teal }, line: { color: C.teal } });
s.addText("Reference: Guyton & Hall Textbook of Medical Physiology\nUnit X | Chapters 50–52 | 14th Edition", {
x: 0.6, y: 2.6, w: 8.8, h: 0.75,
fontSize: 13, color: C.gray, fontFace: "Calibri", align: "left"
});
s.addText([
{ text: "Topics: ", options: { bold: true, color: C.gold } },
{ text: "Phototransduction | Duplicity Theory | Young-Helmholtz Trichromatic Theory | Opponent-Color Theory | Visual Pathways | Clinical Correlations", options: { color: C.light } }
], { x: 0.6, y: 3.55, w: 9, h: 0.9, fontSize: 11, fontFace: "Calibri", align: "left" });
s.addText("5-Minute Presentation", {
x: 0.6, y: 4.7, w: 4, h: 0.35, fontSize: 10, color: C.gray, italic: true, fontFace: "Calibri"
});
}
// ═══════════════════════════════════════════════════════════════════════════
// SLIDE 2 — ANATOMY OF VISION: RODS & CONES
// ═══════════════════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: C.navy }, line: { color: C.navy } });
sectionBar(s, "Foundation: Photoreceptors — Rods & Cones");
// Left column
s.addText("RODS", { x: 0.3, y: 0.7, w: 4.3, h: 0.45, fontSize: 16, bold: true, color: C.teal, fontFace: "Calibri" });
s.addText([
{ text: "• 120 million in each retina\n", options: { breakLine: false } },
{ text: "• Contain rhodopsin (scotopsin + 11-cis retinal)\n", options: { breakLine: false } },
{ text: "• Highly sensitive — function in dim light\n", options: { breakLine: false } },
{ text: "• Responsible for scotopic (night) vision\n", options: { breakLine: false } },
{ text: "• Peak absorption: 505 nm\n", options: { breakLine: false } },
{ text: "• Absent in fovea centralis", options: {} },
], {
x: 0.3, y: 1.18, w: 4.3, h: 2.5,
fontSize: 12, color: C.white, fontFace: "Calibri",
bullet: false
});
// Divider
s.addShape(pres.ShapeType.rect, { x: 4.85, y: 0.65, w: 0.04, h: 3.5, fill: { color: C.teal }, line: { color: C.teal } });
// Right column
s.addText("CONES", { x: 5.1, y: 0.7, w: 4.5, h: 0.45, fontSize: 16, bold: true, color: C.gold, fontFace: "Calibri" });
s.addText([
{ text: "• 6 million in each retina\n" },
{ text: "• Contain photopsins — 3 types\n" },
{ text: "• Red-sensitive: peak 570 nm\n" },
{ text: "• Green-sensitive: peak 535 nm\n" },
{ text: "• Blue-sensitive: peak 445 nm\n" },
{ text: "• Responsible for photopic (color) vision\n" },
{ text: "• Concentrated in fovea centralis" },
], {
x: 5.1, y: 1.18, w: 4.5, h: 2.7,
fontSize: 12, color: C.white, fontFace: "Calibri"
});
// Clinical note box
s.addShape(pres.ShapeType.rect, { x: 0.3, y: 4.2, w: 9.4, h: 0.75, fill: { color: "1A3A50" }, line: { color: C.teal } });
s.addText([
{ text: "Clinical Note: ", options: { bold: true, color: C.gold } },
{ text: "Vitamin A deficiency depletes rhodopsin synthesis → Night blindness (nyctalopia). Tx: IV Vitamin A can reverse within 1 hour.", options: { color: C.white } }
], { x: 0.45, y: 4.25, w: 9.1, h: 0.65, fontSize: 11, fontFace: "Calibri" });
sourceTag(s);
}
// ═══════════════════════════════════════════════════════════════════════════
// SLIDE 3 — PHOTOCHEMISTRY / PHOTOTRANSDUCTION
// ═══════════════════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: C.navy }, line: { color: C.navy } });
sectionBar(s, "Theory 1: Photochemical Theory of Vision (Rhodopsin-Retinal Cycle)");
// Step boxes
const steps = [
{ num: "1", title: "Rhodopsin Activation", body: "Light absorbed by rhodopsin → 11-cis retinal converts to all-trans retinal", color: "1A4F72" },
{ num: "2", title: "Signal Cascade", body: "Metarhodopsin II (activated rhodopsin) activates transducin → inhibits cGMP phosphodiesterase → ↓ cGMP", color: "1A5C4A" },
{ num: "3", title: "Rod Hyperpolarization", body: "↓ cGMP closes Na+ channels in outer segment → membrane hyperpolarizes (unique: opposite of depolarization in other sensory cells)", color: "4A2D6F" },
{ num: "4", title: "Re-formation", body: "All-trans retinal → 11-cis retinal (via retinal isomerase) + Vitamin A pathway; rhodopsin regenerates", color: "6F3A1A" },
];
steps.forEach((st, i) => {
const x = (i % 2) * 4.8 + 0.3;
const y = Math.floor(i / 2) * 1.9 + 0.75;
s.addShape(pres.ShapeType.roundRect, { x, y, w: 4.4, h: 1.7, fill: { color: st.color }, line: { color: C.teal } });
s.addShape(pres.ShapeType.ellipse, { x: x + 0.1, y: y + 0.15, w: 0.45, h: 0.45, fill: { color: C.gold }, line: { color: C.gold } });
s.addText(st.num, { x: x + 0.1, y: y + 0.15, w: 0.45, h: 0.45, fontSize: 13, bold: true, color: C.navy, align: "center", valign: "middle", fontFace: "Calibri" });
s.addText(st.title, { x: x + 0.65, y: y + 0.12, w: 3.6, h: 0.38, fontSize: 13, bold: true, color: C.gold, fontFace: "Calibri" });
s.addText(st.body, { x: x + 0.1, y: y + 0.52, w: 4.2, h: 1.1, fontSize: 11, color: C.white, fontFace: "Calibri", wrap: true });
});
// Clinical note
s.addShape(pres.ShapeType.rect, { x: 0.3, y: 4.6, w: 9.4, h: 0.6, fill: { color: "1A3A50" }, line: { color: C.teal } });
s.addText([
{ text: "Clinical Note: ", options: { bold: true, color: C.gold } },
{ text: "Retinitis Pigmentosa — mutations in rhodopsin gene → photoreceptor degeneration → starts as peripheral vision loss (tunnel vision) progressing centrally.", options: { color: C.white } }
], { x: 0.45, y: 4.63, w: 9.1, h: 0.52, fontSize: 10.5, fontFace: "Calibri" });
sourceTag(s);
}
// ═══════════════════════════════════════════════════════════════════════════
// SLIDE 4 — DUPLICITY THEORY + LIGHT/DARK ADAPTATION
// ═══════════════════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: C.navy }, line: { color: C.navy } });
sectionBar(s, "Theory 2: Duplicity Theory & Light/Dark Adaptation (von Kries, 1894)");
s.addText("Duplicity Theory", {
x: 0.3, y: 0.65, w: 9.4, h: 0.45, fontSize: 17, bold: true, color: C.gold, fontFace: "Calibri"
});
s.addText(
"The retina contains two independent receptor systems:\n • Rods: scotopic system — active at low light intensities, achromatic\n • Cones: photopic system — active at high light intensities, chromatic",
{ x: 0.3, y: 1.12, w: 9.4, h: 0.85, fontSize: 12, color: C.white, fontFace: "Calibri" }
);
// Adaptation box
s.addShape(pres.ShapeType.rect, { x: 0.3, y: 2.05, w: 9.4, h: 1.55, fill: { color: "112244" }, line: { color: C.teal } });
s.addText("Light & Dark Adaptation", {
x: 0.45, y: 2.1, w: 5, h: 0.38, fontSize: 14, bold: true, color: C.teal, fontFace: "Calibri"
});
s.addText(
"Light adaptation: prolonged bright light degrades rhodopsin → ↓ retinal sensitivity (fast, minutes)\nDark adaptation: darkness allows rhodopsin regeneration → ↑ sensitivity\n • Cone adaptation: ~5–10 min | Rod adaptation: ~20–30 min (Guyton Fig. 51.9)\n • Full dark adaptation increases retinal sensitivity ~500,000-fold",
{ x: 0.45, y: 2.5, w: 9.0, h: 1.05, fontSize: 11.5, color: C.white, fontFace: "Calibri" }
);
// Two clinical boxes
s.addShape(pres.ShapeType.rect, { x: 0.3, y: 3.7, w: 4.55, h: 1.55, fill: { color: "1A3A50" }, line: { color: C.red } });
s.addText("Clinical — Night Blindness", { x: 0.42, y: 3.74, w: 4.3, h: 0.38, fontSize: 12, bold: true, color: C.red, fontFace: "Calibri" });
s.addText("Prolonged Vit. A deficiency → inadequate rhodopsin regeneration → poor dark adaptation. Measured clinically with dark adaptometry.", {
x: 0.42, y: 4.14, w: 4.3, h: 1.05, fontSize: 11, color: C.white, fontFace: "Calibri"
});
s.addShape(pres.ShapeType.rect, { x: 5.15, y: 3.7, w: 4.55, h: 1.55, fill: { color: "1A3A50" }, line: { color: C.green } });
s.addText("Clinical — Photophobia", { x: 5.28, y: 3.74, w: 4.3, h: 0.38, fontSize: 12, bold: true, color: C.green, fontFace: "Calibri" });
s.addText("Failure of normal light adaptation (e.g., cone dystrophies, albinism, meningitis) → hypersensitivity to normal light levels.", {
x: 5.28, y: 4.14, w: 4.3, h: 1.05, fontSize: 11, color: C.white, fontFace: "Calibri"
});
sourceTag(s);
}
// ═══════════════════════════════════════════════════════════════════════════
// SLIDE 5 — YOUNG-HELMHOLTZ + OPPONENT COLOR THEORIES
// ═══════════════════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: C.navy }, line: { color: C.navy } });
sectionBar(s, "Theory 3 & 4: Trichromatic Theory & Opponent-Color Theory of Color Vision");
// Left — Trichromatic
s.addShape(pres.ShapeType.rect, { x: 0.2, y: 0.65, w: 4.6, h: 4.6, fill: { color: "0D2137" }, line: { color: C.teal } });
s.addText("Young-Helmholtz\nTrichromatic Theory (1802/1860)", {
x: 0.35, y: 0.72, w: 4.3, h: 0.75, fontSize: 13, bold: true, color: C.gold, fontFace: "Calibri"
});
s.addText([
{ text: "3 cone types detect color:\n" },
{ text: " \u2022 Red cones (L): peak 570 nm\n" },
{ text: " \u2022 Green cones (M): peak 535 nm\n" },
{ text: " \u2022 Blue cones (S): peak 445 nm\n\n" },
{ text: "The brain interprets color by comparing the RATIO of stimulation:\n" },
{ text: " Orange = 99:42:0 (R:G:B)\n" },
{ text: " Yellow = 83:83:0\n" },
{ text: " White = equal stimulation of all 3\n\n" },
{ text: "Basis: Nobel Prize 1967 (Granit), confirmed by Marks et al. & Brown & Wald 1964" },
], { x: 0.35, y: 1.5, w: 4.3, h: 3.6, fontSize: 10.5, color: C.white, fontFace: "Calibri" });
// Right — Opponent Color
s.addShape(pres.ShapeType.rect, { x: 5.05, y: 0.65, w: 4.75, h: 4.6, fill: { color: "0D2137" }, line: { color: C.gold } });
s.addText("Opponent-Color Theory\n(Hering, 1878 / Hurvich & Jameson 1957)", {
x: 5.2, y: 0.72, w: 4.5, h: 0.75, fontSize: 13, bold: true, color: C.teal, fontFace: "Calibri"
});
s.addText([
{ text: "Colors are processed in opponent pairs:\n" },
{ text: " \u2022 Red vs. Green\n" },
{ text: " \u2022 Blue vs. Yellow\n" },
{ text: " \u2022 Black vs. White (luminance)\n\n" },
{ text: "Neural opponent cells in LGN & V1 are excited by one color and inhibited by its opponent.\n\n" },
{ text: "Color contrast: a red area contrasted against green enhances color perception (Guyton, Ch. 52)\n\n" },
{ text: "Color constancy: the brain adjusts for illuminant changes using these opponent signals — keeps 'red' looking red under different lights." },
], { x: 5.2, y: 1.5, w: 4.5, h: 3.6, fontSize: 10.5, color: C.white, fontFace: "Calibri" });
sourceTag(s);
}
// ═══════════════════════════════════════════════════════════════════════════
// SLIDE 6 — COLOR BLINDNESS (Clinical)
// ═══════════════════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: C.navy }, line: { color: C.navy } });
sectionBar(s, "Clinical Correlation: Color Vision Defects (Anomalous Trichromacy & Dichromacy)");
const types = [
{ label: "Protanopia\n(Red Blindness)", desc: "L-cone absent. Cannot distinguish red from green. Reds appear dark. X-linked recessive. Males >> Females.", col: "4A0A0A", acc: C.red },
{ label: "Deuteranopia\n(Green Blindness)", desc: "M-cone absent. Most common type. Also X-linked. Green, yellow, orange, red confused.", col: "0A3A0A", acc: C.green },
{ label: "Tritanopia\n(Blue Blindness)", desc: "S-cone absent. Rare. Autosomal dominant. Blue-yellow confusion. Not X-linked.", col: "0A2050", acc: C.gold },
{ label: "Total Color Blindness\n(Achromatopsia)", desc: "Complete absence of cone function. Only rods function. World appears in shades of grey. Associated with severe photophobia and poor visual acuity.", col: "2A2A2A", acc: C.gray },
];
types.forEach((t, i) => {
const x = (i % 2) * 4.8 + 0.2;
const y = Math.floor(i / 2) * 2.1 + 0.7;
s.addShape(pres.ShapeType.roundRect, { x, y, w: 4.5, h: 1.95, fill: { color: t.col }, line: { color: t.acc } });
s.addShape(pres.ShapeType.rect, { x, y, w: 4.5, h: 0.12, fill: { color: t.acc }, line: { color: t.acc } });
s.addText(t.label, { x: x + 0.1, y: y + 0.15, w: 4.3, h: 0.5, fontSize: 13, bold: true, color: t.acc, fontFace: "Calibri" });
s.addText(t.desc, { x: x + 0.1, y: y + 0.65, w: 4.3, h: 1.2, fontSize: 11, color: C.white, fontFace: "Calibri", wrap: true });
});
s.addText("Diagnosis: Ishihara plates test | Farnsworth-Munsell 100-hue test | Color arrangement tests", {
x: 0.3, y: 5.1, w: 9.4, h: 0.35, fontSize: 10, italic: true, color: C.gray, fontFace: "Calibri"
});
sourceTag(s);
}
// ═══════════════════════════════════════════════════════════════════════════
// SLIDE 7 — VISUAL PATHWAYS
// ═══════════════════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: C.navy }, line: { color: C.navy } });
sectionBar(s, "Visual Pathway Theory: From Retina to Visual Cortex (Guyton Ch. 52)");
// Pathway chain
const nodes = [
{ label: "Retina\n(Photoreceptors)", color: "1A4F72" },
{ label: "Optic Nerve\n(CN II)", color: "1A5C4A" },
{ label: "Optic Chiasm\n(Nasal fibers cross)", color: "4A2D6F" },
{ label: "Optic Tract", color: "6F3A1A" },
{ label: "LGN\n(Thalamus)", color: "1A4F72" },
{ label: "Optic Radiation\n(Geniculo-calcarine)", color: "1A5C4A" },
{ label: "Primary Visual\nCortex (V1, Area 17)", color: "4A2D6F" },
];
nodes.forEach((n, i) => {
const x = (i % 4) * 2.35 + 0.25;
const y = Math.floor(i / 4) * 2.3 + 0.7;
s.addShape(pres.ShapeType.roundRect, { x, y, w: 2.1, h: 0.95, fill: { color: n.color }, line: { color: C.teal } });
s.addText(n.label, { x, y, w: 2.1, h: 0.95, fontSize: 11, bold: true, color: C.white, fontFace: "Calibri", align: "center", valign: "middle" });
if (i < nodes.length - 1 && i !== 3) {
const ax = x + 2.13;
const ay = y + 0.4;
s.addShape(pres.ShapeType.rect, { x: ax, y: ay, w: 0.2, h: 0.1, fill: { color: C.gold }, line: { color: C.gold } });
}
});
// LGN detail
s.addShape(pres.ShapeType.rect, { x: 0.25, y: 2.6, w: 9.5, h: 0.85, fill: { color: "112244" }, line: { color: C.teal } });
s.addText([
{ text: "LGN (6 layers): ", options: { bold: true, color: C.gold } },
{ text: "Layers II, III, V = ipsilateral retina | Layers I, IV, VI = contralateral retina | Parvocellular layers (3–6): color & fine detail | Magnocellular layers (1–2): motion & depth", options: { color: C.white } }
], { x: 0.35, y: 2.63, w: 9.3, h: 0.78, fontSize: 11, fontFace: "Calibri" });
// Visual field defects box
s.addShape(pres.ShapeType.rect, { x: 0.25, y: 3.6, w: 9.5, h: 1.7, fill: { color: "1A3A50" }, line: { color: C.gold } });
s.addText("Clinical — Visual Field Defects (Perimetry)", {
x: 0.4, y: 3.64, w: 6, h: 0.38, fontSize: 13, bold: true, color: C.gold, fontFace: "Calibri"
});
s.addText([
{ text: "Optic nerve lesion: ", options: { bold: true, color: C.teal } },
{ text: "Monocular blindness (ipsilateral) | ", options: {} },
{ text: "Optic chiasm: ", options: { bold: true, color: C.teal } },
{ text: "Bitemporal hemianopia (pituitary tumor)\n", options: { breakLine: false } },
{ text: "Optic tract lesion: ", options: { bold: true, color: C.teal } },
{ text: "Contralateral homonymous hemianopia | ", options: {} },
{ text: "Optic radiation (Meyer's loop): ", options: { bold: true, color: C.teal } },
{ text: "Upper quadrantanopia ('pie in the sky')\n", options: { breakLine: false } },
{ text: "V1 cortex destruction: ", options: { bold: true, color: C.teal } },
{ text: "Cortical blindness but subconscious light/movement responses preserved via superior colliculus (blindsight)", options: {} },
], { x: 0.4, y: 4.05, w: 9.2, h: 1.2, fontSize: 11, color: C.white, fontFace: "Calibri" });
sourceTag(s);
}
// ═══════════════════════════════════════════════════════════════════════════
// SLIDE 8 — SPATIAL VISION: CONTRAST SENSITIVITY + MACH BANDS
// ═══════════════════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: C.navy }, line: { color: C.navy } });
sectionBar(s, "Theory 5: Contrast Vision — Lateral Inhibition & Spatial Frequency Theory");
s.addText("Lateral Inhibition & Mach Bands", {
x: 0.3, y: 0.65, w: 6, h: 0.45, fontSize: 16, bold: true, color: C.gold, fontFace: "Calibri"
});
s.addText(
"Horizontal and amacrine cells in the retina mediate lateral inhibition:\n" +
" • A stimulated photoreceptor inhibits its neighbors via horizontal cells\n" +
" • This enhances contrast at edges (border enhancement)\n" +
" • Mach bands: illusory bright/dark stripes perceived at luminance borders — a direct consequence of lateral inhibition\n" +
" • The same principle underlies edge detection by simple cells in V1",
{ x: 0.3, y: 1.15, w: 9.4, h: 1.5, fontSize: 12, color: C.white, fontFace: "Calibri" }
);
s.addText("Spatial Frequency Theory (Hubel & Wiesel, Nobel 1981)", {
x: 0.3, y: 2.75, w: 8, h: 0.45, fontSize: 16, bold: true, color: C.teal, fontFace: "Calibri"
});
s.addText(
" • Simple cells in V1: respond to bars/edges of specific orientation\n" +
" • Complex cells: respond regardless of exact position within their receptive field\n" +
" • Hypercomplex cells: selective for edge length/curvature\n" +
" • Dorsal stream (Where/How): parietal cortex — motion, depth, spatial location\n" +
" • Ventral stream (What): inferotemporal cortex — form, object, face recognition",
{ x: 0.3, y: 3.22, w: 9.4, h: 1.4, fontSize: 12, color: C.white, fontFace: "Calibri" }
);
s.addShape(pres.ShapeType.rect, { x: 0.3, y: 4.7, w: 9.4, h: 0.6, fill: { color: "1A3A50" }, line: { color: C.teal } });
s.addText([
{ text: "Clinical Note: ", options: { bold: true, color: C.gold } },
{ text: "Amblyopia — impaired spatial frequency processing due to visual deprivation during critical period. Contrast sensitivity testing (Pelli-Robson chart) detects early optic nerve & cortical dysfunction before Snellen acuity loss.", options: { color: C.white } }
], { x: 0.45, y: 4.73, w: 9.1, h: 0.53, fontSize: 10.5, fontFace: "Calibri" });
sourceTag(s);
}
// ═══════════════════════════════════════════════════════════════════════════
// SLIDE 9 — SUMMARY TABLE
// ═══════════════════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: C.navy }, line: { color: C.navy } });
sectionBar(s, "Summary: Theories of Vision at a Glance");
const rows = [
["Theory", "Proposed By", "Core Concept", "Clinical Relevance"],
["Photochemical Theory", "Wald, Granit (1967)", "Rhodopsin → phototransduction via cGMP cascade", "Night blindness, Retinitis pigmentosa"],
["Duplicity Theory", "von Kries (1894)", "Dual receptor systems: rods (scotopic) + cones (photopic)", "Nyctalopia, Cone dystrophy, Photophobia"],
["Young-Helmholtz\nTrichromatic", "Young 1802,\nHelmholtz 1860", "3 cone types with peak absorption at R/G/B wavelengths", "Color blindness (protanopia, deuteranopia, tritanopia)"],
["Opponent-Color\nTheory", "Hering 1878,\nHurvich & Jameson", "R-G, B-Y, B-W opponent neural channels", "Color constancy, After-images, Color agnosia"],
["Visual Pathway\nTheory", "Guyton Ch. 52", "Retina → LGN → V1 with spatial mapping", "Hemianopia, Scotoma, Cortical blindness"],
["Contrast/Spatial\nFrequency Theory", "Hubel & Wiesel (1981)", "Lateral inhibition + orientation-selective cortical cells", "Amblyopia, Optic neuritis CSF testing"],
];
const colWidths = [2.2, 1.8, 3.2, 2.7];
const rowHeight = 0.65;
const startY = 0.65;
const startX = 0.1;
rows.forEach((row, ri) => {
let cx = startX;
row.forEach((cell, ci) => {
const isHeader = ri === 0;
s.addShape(pres.ShapeType.rect, {
x: cx, y: startY + ri * rowHeight, w: colWidths[ci], h: rowHeight,
fill: { color: isHeader ? C.teal : (ri % 2 === 0 ? "0D2137" : "112244") },
line: { color: "1A4060" }
});
s.addText(cell, {
x: cx + 0.05, y: startY + ri * rowHeight + 0.05,
w: colWidths[ci] - 0.1, h: rowHeight - 0.1,
fontSize: isHeader ? 11 : 9.5,
bold: isHeader,
color: isHeader ? C.navy : C.white,
fontFace: "Calibri",
valign: "middle"
});
cx += colWidths[ci];
});
});
sourceTag(s);
}
// ═══════════════════════════════════════════════════════════════════════════
// SLIDE 10 — CLOSING
// ═══════════════════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: C.navy }, line: { color: C.navy } });
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 0.08, fill: { color: C.gold }, line: { color: C.gold } });
s.addShape(pres.ShapeType.rect, { x: 0, y: 5.55, w: 10, h: 0.075, fill: { color: C.teal }, line: { color: C.teal } });
s.addText("Key Takeaways", {
x: 0.5, y: 0.35, w: 9, h: 0.55, fontSize: 24, bold: true, color: C.gold, fontFace: "Calibri", align: "center"
});
const pts = [
["Phototransduction", "11-cis retinal + scotopsin = rhodopsin; light activates cGMP cascade → hyperpolarization"],
["Duplicity Theory", "Rods = night vision (scotopic); Cones = color/day vision (photopic); both clinically critical"],
["Trichromatic Theory", "3 cone types (R/G/B); brain reads their ratio to determine perceived color"],
["Opponent-Color Theory", "Color processed in R-G, B-Y opponent pairs; explains color contrast & color constancy"],
["Visual Pathways", "Retina → Optic chiasm (nasal fibers cross) → LGN (6 layers) → V1 → dorsal/ventral streams"],
["Lateral Inhibition", "Horizontal cells enhance contrast; simple/complex/hypercomplex cells in V1 detect form"],
];
pts.forEach((p, i) => {
const y = 1.05 + i * 0.7;
s.addShape(pres.ShapeType.rect, { x: 0.3, y, w: 0.25, h: 0.42, fill: { color: C.gold }, line: { color: C.gold } });
s.addText(p[0], { x: 0.7, y: y + 0.01, w: 2.6, h: 0.4, fontSize: 12, bold: true, color: C.teal, fontFace: "Calibri" });
s.addText(p[1], { x: 3.35, y: y + 0.01, w: 6.4, h: 0.4, fontSize: 11.5, color: C.white, fontFace: "Calibri" });
});
s.addText("Reference: Guyton & Hall Textbook of Medical Physiology, 14th Ed. | Chapters 50, 51, 52", {
x: 0.5, y: 5.22, w: 9, h: 0.3, fontSize: 10, italic: true, color: C.gray, fontFace: "Calibri", align: "center"
});
}
// ─── WRITE FILE ─────────────────────────────────────────────────────────────
pres.writeFile({ fileName: "/home/daytona/workspace/theories-of-vision/Theories_of_Vision_Clinical.pptx" })
.then(() => console.log("Done!"))
.catch(e => { console.error(e); process.exit(1); });
cd /home/daytona/workspace/theories-of-vision && node build.js 2>&1
ls -lh /home/daytona/workspace/theories-of-vision/
Theories of Vision Clinical
Presentation · PPTX
| Slide | Content |
|---|---|
| 1 | Title slide — topic overview, chapter references |
| 2 | Foundation: Rods & Cones — structure, photopigments, numbers + Night blindness (clinical note) |
| 3 | Theory 1: Photochemical Theory — Rhodopsin-Retinal visual cycle, cGMP cascade, rod hyperpolarization + Retinitis Pigmentosa |
| 4 | Theory 2: Duplicity Theory — Scotopic vs photopic systems, dark/light adaptation curves (Guyton Fig 51.9) + Night blindness & Photophobia |
| 5 | Theory 3 & 4: Young-Helmholtz Trichromatic Theory + Opponent-Color Theory (Hering/Hurvich) side by side |
| 6 | Clinical: Color vision defects — Protanopia, Deuteranopia, Tritanopia, Achromatopsia with inheritance patterns |
| 7 | Visual Pathway Theory — Retina → LGN (6-layer detail) → V1 + field defect map (bitemporal hemianopia, homonymous hemianopia, cortical blindness) |
| 8 | Theory 5: Contrast/Spatial Frequency — Lateral inhibition, Mach bands, Hubel & Wiesel simple/complex cells, dorsal/ventral streams + Amblyopia |
| 9 | Summary table — all 6 theories, authors, core concept, clinical relevance |
| 10 | Key Takeaways — one-liner per theory, reference line |