Visual pathway ppt only introduction not lesion in black and white formate
mkdir -p /home/daytona/workspace/visual-pathway-ppt && ls /home/daytona/workspac…
~/visual-pathway-ppt/visual_pathway_intro.js
const pptxgen = require("pptxgenjs");
const pres = new pptxgen();
pres.layout = "LAYOUT_16x9";
pres.title = "Visual Pathway - Introduction";
// ─── Color palette (black & white) ───────────────────────────────────────────
const C = {
black: "000000",
white: "FFFFFF",
dark: "1A1A1A",
mid: "3D3D3D",
light: "AAAAAA",
vlight: "D0D0D0",
offwhite: "F5F5F5",
gray1: "222222",
gray2: "555555",
gray3: "888888",
gray4: "CCCCCC",
};
// ─── Helper: section divider line ─────────────────────────────────────────────
function addDivider(slide, y, color) {
slide.addShape(pres.ShapeType.rect, {
x: 0.5, y, w: 9.0, h: 0.04,
fill: { color: color || C.mid },
line: { type: "none" },
});
}
// ─── Helper: bold heading ─────────────────────────────────────────────────────
function heading(slide, text, x, y, w, h, size, color) {
slide.addText(text, {
x, y, w, h,
fontSize: size || 28,
bold: true,
color: color || C.white,
fontFace: "Calibri",
align: "left",
valign: "middle",
margin: 0,
});
}
// ─── Helper: body text ────────────────────────────────────────────────────────
function body(slide, text, x, y, w, h, size, color, opts) {
slide.addText(text, {
x, y, w, h,
fontSize: size || 16,
color: color || C.dark,
fontFace: "Calibri",
align: "left",
valign: "top",
margin: 0,
...(opts || {}),
});
}
// ─── Helper: bullet list ──────────────────────────────────────────────────────
function bullets(slide, items, x, y, w, h, size, color) {
const lines = items.map((t, i) => ({
text: t,
options: {
bullet: { type: "bullet", indent: 15 },
breakLine: i < items.length - 1,
},
}));
slide.addText(lines, {
x, y, w, h,
fontSize: size || 15,
color: color || C.dark,
fontFace: "Calibri",
align: "left",
valign: "top",
paraSpaceAfter: 4,
margin: 0,
});
}
// ─── Helper: number box ───────────────────────────────────────────────────────
function numBox(slide, num, x, y, size) {
const s = size || 0.42;
slide.addShape(pres.ShapeType.rect, {
x, y, w: s, h: s,
fill: { color: C.dark },
line: { type: "none" },
});
slide.addText(String(num), {
x, y, w: s, h: s,
fontSize: 14, bold: true, color: C.white,
fontFace: "Calibri", align: "center", valign: "middle", margin: 0,
});
}
// ─── Helper: pathway step arrow shape ────────────────────────────────────────
function addPathwayArrow(slide, x, y, w, h, fill) {
slide.addShape(pres.ShapeType.rightArrow, {
x, y, w, h,
fill: { color: fill || C.mid },
line: { color: C.black, pt: 0.5 },
});
}
// ─── Helper: label tag ───────────────────────────────────────────────────────
function labelTag(slide, text, x, y, w, h, bgColor) {
slide.addShape(pres.ShapeType.rect, {
x, y, w, h,
fill: { color: bgColor || C.gray2 },
line: { type: "none" },
shadow: { type: "outer", color: "000000", opacity: 0.3, blur: 3, offset: 2, angle: 45 },
});
slide.addText(text, {
x, y, w, h,
fontSize: 11, bold: true, color: C.white,
fontFace: "Calibri", align: "center", valign: "middle", margin: 2,
});
}
// ══════════════════════════════════════════════════════════════════════════════
// SLIDE 1 — Title Slide
// ══════════════════════════════════════════════════════════════════════════════
{
const sl = pres.addSlide();
// Full black background
sl.addShape(pres.ShapeType.rect, {
x: 0, y: 0, w: 10, h: 5.625,
fill: { color: C.black }, line: { type: "none" },
});
// White accent stripe (left)
sl.addShape(pres.ShapeType.rect, {
x: 0, y: 0, w: 0.18, h: 5.625,
fill: { color: C.white }, line: { type: "none" },
});
// Top accent line
sl.addShape(pres.ShapeType.rect, {
x: 0.18, y: 1.35, w: 9.82, h: 0.05,
fill: { color: C.gray3 }, line: { type: "none" },
});
// Subtitle label
sl.addText("NEUROSCIENCE | OPHTHALMOLOGY", {
x: 0.5, y: 1.0, w: 9.0, h: 0.4,
fontSize: 11, bold: false, color: C.gray3,
fontFace: "Calibri", align: "left", valign: "middle",
charSpacing: 4, margin: 0,
});
// Main title
sl.addText("VISUAL PATHWAY", {
x: 0.5, y: 1.55, w: 9.0, h: 1.2,
fontSize: 58, bold: true, color: C.white,
fontFace: "Calibri", align: "left", valign: "middle",
charSpacing: 2, margin: 0,
});
// Subtitle
sl.addText("Introduction & Anatomical Overview", {
x: 0.5, y: 2.75, w: 9.0, h: 0.55,
fontSize: 22, bold: false, color: C.light,
fontFace: "Calibri", align: "left", valign: "middle", margin: 0,
});
// Bottom tag line
sl.addShape(pres.ShapeType.rect, {
x: 0.5, y: 4.8, w: 9.0, h: 0.04,
fill: { color: C.gray2 }, line: { type: "none" },
});
sl.addText("From Retina → Optic Nerve → Chiasm → Tract → LGN → Optic Radiation → Visual Cortex", {
x: 0.5, y: 4.87, w: 9.0, h: 0.4,
fontSize: 10, color: C.gray3,
fontFace: "Calibri", align: "left", valign: "middle", charSpacing: 1, margin: 0,
});
}
// ══════════════════════════════════════════════════════════════════════════════
// SLIDE 2 — Overview / Agenda
// ══════════════════════════════════════════════════════════════════════════════
{
const sl = pres.addSlide();
// White background
sl.addShape(pres.ShapeType.rect, {
x: 0, y: 0, w: 10, h: 5.625,
fill: { color: C.white }, line: { type: "none" },
});
// Top black header bar
sl.addShape(pres.ShapeType.rect, {
x: 0, y: 0, w: 10, h: 1.1,
fill: { color: C.black }, line: { type: "none" },
});
heading(sl, "WHAT IS THE VISUAL PATHWAY?", 0.5, 0.25, 9.0, 0.65, 22);
// Left accent bar
sl.addShape(pres.ShapeType.rect, {
x: 0, y: 1.1, w: 0.12, h: 4.525,
fill: { color: C.dark }, line: { type: "none" },
});
body(sl,
"The visual pathway is the chain of neural structures that transmit visual information from the photoreceptors of the retina to the primary visual cortex in the occipital lobe. It constitutes a major component of the central nervous system and is essential for conscious visual perception.",
0.4, 1.2, 9.1, 1.0, 14, C.dark
);
addDivider(sl, 2.25);
// Topics in grid
const topics = [
["01", "Retina & Photoreceptors", "Rod and cone cells; ganglion cell axons; optic disc"],
["02", "Optic Nerve (CN II)", "Course from orbit → optic canal → cranial cavity"],
["03", "Optic Chiasm", "Partial decussation; nasal vs temporal fibers"],
["04", "Optic Tract", "Post-chiasmal pathway to LGN"],
["05", "Lateral Geniculate Nucleus", "Thalamic relay station; 6 layers; M & P cells"],
["06", "Optic Radiations", "Meyer's loop; visual radiations to cortex"],
];
const cols = [
{ x: 0.4, y: 2.35 },
{ x: 3.55, y: 2.35 },
{ x: 6.7, y: 2.35 },
{ x: 0.4, y: 3.65 },
{ x: 3.55, y: 3.65 },
{ x: 6.7, y: 3.65 },
];
topics.forEach((t, i) => {
const pos = cols[i];
sl.addShape(pres.ShapeType.rect, {
x: pos.x, y: pos.y, w: 2.9, h: 1.1,
fill: { color: i % 2 === 0 ? C.dark : C.gray2 },
line: { type: "none" },
});
sl.addText(t[0], {
x: pos.x + 0.08, y: pos.y + 0.06, w: 0.4, h: 0.3,
fontSize: 10, bold: true, color: C.gray4,
fontFace: "Calibri", align: "left", valign: "top", margin: 0,
});
sl.addText(t[1], {
x: pos.x + 0.12, y: pos.y + 0.32, w: 2.68, h: 0.32,
fontSize: 12, bold: true, color: C.white,
fontFace: "Calibri", align: "left", valign: "middle", margin: 0,
});
sl.addText(t[2], {
x: pos.x + 0.12, y: pos.y + 0.65, w: 2.68, h: 0.36,
fontSize: 9, color: C.gray4,
fontFace: "Calibri", align: "left", valign: "top", margin: 0,
});
});
}
// ══════════════════════════════════════════════════════════════════════════════
// SLIDE 3 — The Retina
// ══════════════════════════════════════════════════════════════════════════════
{
const sl = pres.addSlide();
sl.addShape(pres.ShapeType.rect, {
x: 0, y: 0, w: 10, h: 5.625,
fill: { color: C.offwhite }, line: { type: "none" },
});
// Header
sl.addShape(pres.ShapeType.rect, {
x: 0, y: 0, w: 10, h: 1.0,
fill: { color: C.dark }, line: { type: "none" },
});
heading(sl, "THE RETINA — Starting Point", 0.5, 0.18, 7, 0.65, 22);
labelTag(sl, "STEP 1", 8.2, 0.25, 1.3, 0.45, C.black);
// Left panel: layers
sl.addShape(pres.ShapeType.rect, {
x: 0.3, y: 1.15, w: 4.4, h: 4.1,
fill: { color: C.white }, line: { color: C.vlight, pt: 1 },
});
sl.addText("RETINAL LAYERS (light travels right → left)", {
x: 0.4, y: 1.2, w: 4.2, h: 0.35,
fontSize: 10, bold: true, color: C.gray2, charSpacing: 1,
fontFace: "Calibri", align: "left", valign: "middle", margin: 0,
});
const layers = [
["Vitreous", "Light entry point"],
["Ganglion Cell Layer", "Axons → optic nerve (innermost)"],
["Inner Plexiform Layer", "Ganglion + bipolar synapses"],
["Inner Nuclear Layer", "Bipolar, amacrine, horizontal cells"],
["Outer Plexiform Layer", "Photoreceptor → bipolar synapses"],
["Outer Nuclear Layer", "Photoreceptor cell bodies"],
["Photoreceptor Layer", "Rods (~120M) & Cones (~6M)"],
["Retinal Pigment Epithelium", "Nourishment, waste removal"],
];
layers.forEach((row, i) => {
const yy = 1.65 + i * 0.43;
const dark = i % 2 === 0;
sl.addShape(pres.ShapeType.rect, {
x: 0.35, y: yy, w: 4.3, h: 0.38,
fill: { color: dark ? C.offwhite : C.white }, line: { type: "none" },
});
sl.addText(row[0], {
x: 0.42, y: yy + 0.03, w: 1.8, h: 0.3,
fontSize: 10, bold: true, color: C.dark,
fontFace: "Calibri", align: "left", valign: "middle", margin: 0,
});
sl.addText(row[1], {
x: 2.3, y: yy + 0.03, w: 2.3, h: 0.3,
fontSize: 9, color: C.gray2,
fontFace: "Calibri", align: "left", valign: "middle", margin: 0,
});
});
// Right panel
sl.addShape(pres.ShapeType.rect, {
x: 5.0, y: 1.15, w: 4.7, h: 4.1,
fill: { color: C.white }, line: { color: C.vlight, pt: 1 },
});
sl.addText("KEY FACTS", {
x: 5.15, y: 1.22, w: 4.4, h: 0.35,
fontSize: 10, bold: true, color: C.gray2, charSpacing: 1,
fontFace: "Calibri", align: "left", valign: "middle", margin: 0,
});
addDivider(sl, 1.6, C.gray3);
const facts = [
"Photoreceptors convert light into electrical signals (phototransduction).",
"Rods: low-light, scotopic vision; detect achromatic light.",
"Cones (3 types — S, M, L): photopic vision; colour discrimination.",
"Bipolar cells transmit signals vertically through the retina.",
"Retinal ganglion cells (RGCs) are the output neurons — their axons form the optic nerve.",
"Optic disc (blind spot): no photoreceptors; axons converge here and exit the eye.",
"Fovea centralis: highest cone density; sharpest visual acuity (20/20 vision).",
"~1.2 million RGC axons make up the optic nerve.",
];
facts.forEach((f, i) => {
const yy = 1.72 + i * 0.42;
sl.addShape(pres.ShapeType.rect, {
x: 5.1, y: yy + 0.06, w: 0.22, h: 0.22,
fill: { color: i < 3 ? C.dark : C.gray2 }, line: { type: "none" },
});
sl.addText(f, {
x: 5.42, y: yy, w: 4.18, h: 0.38,
fontSize: 10, color: C.dark,
fontFace: "Calibri", align: "left", valign: "middle", margin: 0,
});
});
}
// ══════════════════════════════════════════════════════════════════════════════
// SLIDE 4 — Optic Nerve
// ══════════════════════════════════════════════════════════════════════════════
{
const sl = pres.addSlide();
sl.addShape(pres.ShapeType.rect, {
x: 0, y: 0, w: 10, h: 5.625,
fill: { color: C.black }, line: { type: "none" },
});
// Header strip
sl.addShape(pres.ShapeType.rect, {
x: 0, y: 0, w: 10, h: 1.0,
fill: { color: C.gray1 }, line: { type: "none" },
});
heading(sl, "OPTIC NERVE (Cranial Nerve II)", 0.5, 0.18, 7.5, 0.65, 22, C.white);
labelTag(sl, "STEP 2", 8.2, 0.25, 1.3, 0.45, C.white);
// 4 segment cards
const segments = [
{ label: "Intraocular", dist: "0.7 mm", detail: "Unmyelinated axons at optic disc. Surrounded by retinal pigment epithelium." },
{ label: "Intraorbital", dist: "25–30 mm", detail: "Myelinated. Covered by cranial meninges. Slack allows eye movement." },
{ label: "Intracanalicular", dist: "4–10 mm", detail: "Traverses optic canal in sphenoid bone; dural sheath fuses to canal wall." },
{ label: "Intracranial", dist: "10 mm", detail: "Passes over cavernous sinus to optic chiasm. Surrounded by subarachnoid space." },
];
segments.forEach((s, i) => {
const x = 0.3 + i * 2.37;
sl.addShape(pres.ShapeType.rect, {
x, y: 1.15, w: 2.2, h: 3.8,
fill: { color: i % 2 === 0 ? C.gray1 : C.mid },
line: { color: C.gray3, pt: 1 },
});
sl.addText(String(i + 1), {
x: x + 0.12, y: 1.22, w: 0.35, h: 0.35,
fontSize: 16, bold: true, color: C.gray3,
fontFace: "Calibri", align: "left", valign: "middle", margin: 0,
});
sl.addText(s.label, {
x: x + 0.12, y: 1.65, w: 2.0, h: 0.5,
fontSize: 13, bold: true, color: C.white,
fontFace: "Calibri", align: "left", valign: "middle", margin: 0,
});
sl.addShape(pres.ShapeType.rect, {
x: x + 0.1, y: 2.2, w: 2.0, h: 0.04,
fill: { color: C.gray3 }, line: { type: "none" },
});
sl.addText(s.dist, {
x: x + 0.12, y: 2.3, w: 2.0, h: 0.35,
fontSize: 11, color: C.gray4,
fontFace: "Calibri", align: "left", valign: "middle", margin: 0,
});
sl.addText("Length", {
x: x + 0.12, y: 2.25, w: 1.5, h: 0.24,
fontSize: 8, color: C.gray3, charSpacing: 2,
fontFace: "Calibri", align: "left", valign: "middle", margin: 0,
});
sl.addText(s.detail, {
x: x + 0.12, y: 2.7, w: 2.0, h: 2.0,
fontSize: 10, color: C.vlight,
fontFace: "Calibri", align: "left", valign: "top",
paraSpaceAfter: 4, margin: 0,
});
});
// Bottom note
sl.addText("Note: The optic nerve is embryologically and anatomically a tract of the CNS (not a peripheral nerve). It is ensheathed by meninges and myelinated by oligodendrocytes.", {
x: 0.3, y: 5.15, w: 9.4, h: 0.42,
fontSize: 10, italic: true, color: C.gray3,
fontFace: "Calibri", align: "left", valign: "middle", margin: 0,
});
}
// ══════════════════════════════════════════════════════════════════════════════
// SLIDE 5 — Optic Chiasm
// ══════════════════════════════════════════════════════════════════════════════
{
const sl = pres.addSlide();
sl.addShape(pres.ShapeType.rect, {
x: 0, y: 0, w: 10, h: 5.625,
fill: { color: C.offwhite }, line: { type: "none" },
});
sl.addShape(pres.ShapeType.rect, {
x: 0, y: 0, w: 10, h: 1.0,
fill: { color: C.dark }, line: { type: "none" },
});
heading(sl, "OPTIC CHIASM — The Crossroads", 0.5, 0.18, 7.5, 0.65, 22);
labelTag(sl, "STEP 3", 8.2, 0.25, 1.3, 0.45, C.white);
// Schematic: hand-drawn H-shape using rectangles
// Left ON
sl.addShape(pres.ShapeType.rect, {
x: 1.2, y: 2.0, w: 1.5, h: 0.22,
fill: { color: C.dark }, line: { type: "none" },
});
// Right ON
sl.addShape(pres.ShapeType.rect, {
x: 6.8, y: 2.0, w: 1.5, h: 0.22,
fill: { color: C.dark }, line: { type: "none" },
});
// Chiasm body
sl.addShape(pres.ShapeType.rect, {
x: 2.7, y: 1.7, w: 4.1, h: 0.85,
fill: { color: C.mid }, line: { color: C.black, pt: 1.5 },
shadow: { type: "outer", color: "000000", opacity: 0.4, blur: 5, offset: 3, angle: 45 },
});
sl.addText("OPTIC CHIASM", {
x: 2.7, y: 1.7, w: 4.1, h: 0.85,
fontSize: 13, bold: true, color: C.white,
fontFace: "Calibri", align: "center", valign: "middle", margin: 0,
});
// Left tract
sl.addShape(pres.ShapeType.rect, {
x: 1.2, y: 2.88, w: 1.7, h: 0.22,
fill: { color: C.gray2 }, line: { type: "none" },
});
// Right tract
sl.addShape(pres.ShapeType.rect, {
x: 6.6, y: 2.88, w: 1.7, h: 0.22,
fill: { color: C.gray2 }, line: { type: "none" },
});
// Labels
sl.addText("L Optic Nerve", { x: 0.1, y: 1.9, w: 1.3, h: 0.35, fontSize: 9, bold: true, color: C.dark, fontFace: "Calibri", align: "right", margin: 0 });
sl.addText("R Optic Nerve", { x: 8.1, y: 1.9, w: 1.5, h: 0.35, fontSize: 9, bold: true, color: C.dark, fontFace: "Calibri", align: "left", margin: 0 });
sl.addText("L Optic Tract", { x: 0.1, y: 2.85, w: 1.3, h: 0.35, fontSize: 9, bold: true, color: C.gray2, fontFace: "Calibri", align: "right", margin: 0 });
sl.addText("R Optic Tract", { x: 8.1, y: 2.85, w: 1.5, h: 0.35, fontSize: 9, bold: true, color: C.gray2, fontFace: "Calibri", align: "left", margin: 0 });
// Explanation box
sl.addShape(pres.ShapeType.rect, {
x: 0.3, y: 3.3, w: 9.4, h: 1.95,
fill: { color: C.white }, line: { color: C.gray4, pt: 1 },
});
const chiassmPoints = [
"The optic chiasm is an X-shaped structure located anterior to the infundibular (pituitary) stalk, directly above the pituitary gland (~10 mm above).",
"Fibres from the NASAL hemiretina (representing TEMPORAL visual field) CROSS to the contralateral optic tract.",
"Fibres from the TEMPORAL hemiretina (representing NASAL visual field) remain IPSILATERAL in the optic tract.",
"Result: each optic tract carries information from the OPPOSITE (contralateral) visual hemifield of BOTH eyes.",
"Chiasm position: pre-fixed (anterior to pituitary, minority), normal (above sella turcica), or post-fixed (above dorsum sellae).",
];
chiassmPoints.forEach((p, i) => {
sl.addShape(pres.ShapeType.rect, {
x: 0.45, y: 3.44 + i * 0.36, w: 0.18, h: 0.18,
fill: { color: C.dark }, line: { type: "none" },
});
sl.addText(p, {
x: 0.72, y: 3.38 + i * 0.36, w: 8.84, h: 0.32,
fontSize: 10, color: C.dark,
fontFace: "Calibri", align: "left", valign: "middle", margin: 0,
});
});
}
// ══════════════════════════════════════════════════════════════════════════════
// SLIDE 6 — Optic Tract & LGN
// ══════════════════════════════════════════════════════════════════════════════
{
const sl = pres.addSlide();
sl.addShape(pres.ShapeType.rect, {
x: 0, y: 0, w: 10, h: 5.625,
fill: { color: C.black }, line: { type: "none" },
});
sl.addShape(pres.ShapeType.rect, {
x: 0, y: 0, w: 10, h: 1.0,
fill: { color: C.gray1 }, line: { type: "none" },
});
heading(sl, "OPTIC TRACT & LATERAL GENICULATE NUCLEUS", 0.5, 0.18, 8.5, 0.65, 20, C.white);
labelTag(sl, "STEPS 4–5", 7.9, 0.25, 1.7, 0.45, C.white);
// LEFT: Optic Tract
sl.addShape(pres.ShapeType.rect, {
x: 0.25, y: 1.15, w: 4.5, h: 4.1,
fill: { color: C.gray1 }, line: { color: C.gray3, pt: 1 },
});
sl.addText("OPTIC TRACT", {
x: 0.4, y: 1.2, w: 4.2, h: 0.42,
fontSize: 14, bold: true, color: C.white, charSpacing: 2,
fontFace: "Calibri", align: "left", valign: "middle", margin: 0,
});
addDivider(sl, 1.66, C.gray3);
const tractFacts = [
["Origin", "Posterior to optic chiasm, wraps around midbrain cerebral peduncles."],
["Content", "Fibres from contralateral visual hemifield (both eyes combined)."],
["Course", "Courses postero-laterally around midbrain to reach LGN."],
["Collaterals", "Some fibres diverge to: Superior Colliculus (eye movement), Pretectal nucleus (pupillary light reflex), Suprachiasmatic nucleus (circadian rhythm)."],
["Termination", "~90% of fibres terminate in the ipsilateral LGN of thalamus."],
];
tractFacts.forEach((f, i) => {
const yy = 1.75 + i * 0.67;
sl.addText(f[0], {
x: 0.4, y: yy, w: 1.3, h: 0.3,
fontSize: 10, bold: true, color: C.gray4,
fontFace: "Calibri", align: "left", valign: "middle", margin: 0,
});
sl.addText(f[1], {
x: 0.4, y: yy + 0.28, w: 4.2, h: 0.35,
fontSize: 10, color: C.vlight,
fontFace: "Calibri", align: "left", valign: "top", margin: 0,
});
});
// RIGHT: LGN
sl.addShape(pres.ShapeType.rect, {
x: 5.05, y: 1.15, w: 4.6, h: 4.1,
fill: { color: C.mid }, line: { color: C.gray3, pt: 1 },
});
sl.addText("LATERAL GENICULATE NUCLEUS (LGN)", {
x: 5.2, y: 1.2, w: 4.3, h: 0.55,
fontSize: 12, bold: true, color: C.white,
fontFace: "Calibri", align: "left", valign: "middle", margin: 0,
});
addDivider(sl, 1.78, C.gray4);
const lgnFacts = [
["Location", "Posteroventral thalamus; part of metathalamus."],
["Layers", "6 laminae; fibres from each eye are kept separate (eye-specific layers: 1,4,6 = contralateral; 2,3,5 = ipsilateral)."],
["Cell types", "Layers 1–2: Magnocellular (M) cells — motion, depth, low contrast.\nLayers 3–6: Parvocellular (P) cells — colour, fine detail.\nInterlaminar zones: Koniocellular (K) cells."],
["Output", "Axons form the optic radiations (geniculocalcarine tract) → primary visual cortex (V1 / Area 17)."],
["Other inputs", "Receives feedback from visual cortex, brainstem (modulates attention/contrast)."],
];
lgnFacts.forEach((f, i) => {
const yy = 1.88 + i * 0.64;
sl.addText(f[0], {
x: 5.2, y: yy, w: 1.3, h: 0.28,
fontSize: 10, bold: true, color: C.gray4,
fontFace: "Calibri", align: "left", valign: "middle", margin: 0,
});
sl.addText(f[1], {
x: 5.2, y: yy + 0.26, w: 4.3, h: 0.34,
fontSize: 9.5, color: C.vlight,
fontFace: "Calibri", align: "left", valign: "top", margin: 0,
});
});
}
// ══════════════════════════════════════════════════════════════════════════════
// SLIDE 7 — Optic Radiations & Visual Cortex
// ══════════════════════════════════════════════════════════════════════════════
{
const sl = pres.addSlide();
sl.addShape(pres.ShapeType.rect, {
x: 0, y: 0, w: 10, h: 5.625,
fill: { color: C.offwhite }, line: { type: "none" },
});
sl.addShape(pres.ShapeType.rect, {
x: 0, y: 0, w: 10, h: 1.0,
fill: { color: C.dark }, line: { type: "none" },
});
heading(sl, "OPTIC RADIATIONS & PRIMARY VISUAL CORTEX", 0.5, 0.18, 8.5, 0.65, 20);
labelTag(sl, "STEPS 6–7", 7.9, 0.25, 1.7, 0.45, C.white);
// Optic Radiation section
sl.addShape(pres.ShapeType.rect, {
x: 0.25, y: 1.15, w: 9.5, h: 2.15,
fill: { color: C.white }, line: { color: C.vlight, pt: 1 },
});
sl.addText("OPTIC RADIATIONS (Geniculocalcarine Tract)", {
x: 0.45, y: 1.22, w: 7, h: 0.38,
fontSize: 13, bold: true, color: C.dark, charSpacing: 1,
fontFace: "Calibri", align: "left", valign: "middle", margin: 0,
});
addDivider(sl, 1.65, C.gray3);
const radRows = [
{ div: "Upper division", fibres: "Superior fibres (parietal lobe route)", field: "Inferior visual field", cortex: "Upper lip of calcarine sulcus" },
{ div: "Meyer's Loop", fibres: "Inferior fibres loop anteriorly through temporal lobe", field: "Superior visual field", cortex: "Lower lip of calcarine sulcus (lingual gyrus)" },
];
const hdrY = 1.7;
["DIVISION", "COURSE", "REPRESENTS", "TERMINATES"].forEach((h, i) => {
const xs = [0.4, 2.15, 4.8, 7.15];
sl.addText(h, {
x: xs[i], y: hdrY, w: i < 3 ? 2.5 : 2.5, h: 0.28,
fontSize: 8, bold: true, color: C.gray2, charSpacing: 2,
fontFace: "Calibri", align: "left", valign: "middle", margin: 0,
});
});
radRows.forEach((r, i) => {
const yy = 2.05 + i * 0.55;
const bg = i % 2 === 0 ? C.offwhite : C.white;
sl.addShape(pres.ShapeType.rect, {
x: 0.35, y: yy, w: 9.35, h: 0.5,
fill: { color: bg }, line: { type: "none" },
});
sl.addText(r.div, { x: 0.4, y: yy + 0.05, w: 1.8, h: 0.4, fontSize: 10, bold: true, color: C.dark, fontFace: "Calibri", margin: 0 });
sl.addText(r.fibres, { x: 2.15, y: yy + 0.05, w: 2.7, h: 0.4, fontSize: 10, color: C.dark, fontFace: "Calibri", align: "left", margin: 0 });
sl.addText(r.field, { x: 4.85, y: yy + 0.05, w: 2.5, h: 0.4, fontSize: 10, color: C.dark, fontFace: "Calibri", align: "left", margin: 0 });
sl.addText(r.cortex, { x: 7.15, y: yy + 0.05, w: 2.4, h: 0.4, fontSize: 10, color: C.dark, fontFace: "Calibri", align: "left", margin: 0 });
});
// Visual Cortex section
sl.addShape(pres.ShapeType.rect, {
x: 0.25, y: 3.45, w: 9.5, h: 1.9,
fill: { color: C.white }, line: { color: C.vlight, pt: 1 },
});
sl.addText("PRIMARY VISUAL CORTEX (V1 / Area 17 / Striate Cortex)", {
x: 0.45, y: 3.52, w: 9.0, h: 0.38,
fontSize: 13, bold: true, color: C.dark, charSpacing: 1,
fontFace: "Calibri", align: "left", valign: "middle", margin: 0,
});
addDivider(sl, 3.95, C.gray3);
const cortexFacts = [
"Location: Medial occipital lobe; banks and depths of the calcarine sulcus (Brodmann area 17).",
"Receives fibres from ipsilateral LGN via the optic radiations.",
"Contains the line of Gennari — a dense myelinated stripe (visible to naked eye), giving the name 'striate cortex'.",
"Retinotopic organisation: The posterior pole (foveal representation) is most posterior; peripheral vision is anterior.",
"Macular representation is disproportionately large (cortical magnification factor) due to high cone density at fovea.",
];
cortexFacts.forEach((f, i) => {
const xs = [0.45, 5.05];
const ys = [4.02, 4.02];
const col = i < 3 ? 0 : 1;
const idx = i < 3 ? i : i - 3;
sl.addShape(pres.ShapeType.rect, {
x: xs[col] + 0.02, y: ys[col] + idx * 0.38 + 0.08, w: 0.16, h: 0.16,
fill: { color: C.dark }, line: { type: "none" },
});
sl.addText(f, {
x: xs[col] + 0.25, y: ys[col] + idx * 0.38, w: 4.55, h: 0.36,
fontSize: 9.5, color: C.dark,
fontFace: "Calibri", align: "left", valign: "middle", margin: 0,
});
});
}
// ══════════════════════════════════════════════════════════════════════════════
// SLIDE 8 — Complete Pathway Flow Diagram
// ══════════════════════════════════════════════════════════════════════════════
{
const sl = pres.addSlide();
sl.addShape(pres.ShapeType.rect, {
x: 0, y: 0, w: 10, h: 5.625,
fill: { color: C.black }, line: { type: "none" },
});
sl.addShape(pres.ShapeType.rect, {
x: 0, y: 0, w: 10, h: 1.0,
fill: { color: C.gray1 }, line: { type: "none" },
});
heading(sl, "THE COMPLETE VISUAL PATHWAY — Flow Overview", 0.5, 0.2, 9.0, 0.65, 20, C.white);
// Step boxes + arrows
const steps = [
{ n: "1", title: "PHOTORECEPTORS", sub: "Rods & Cones\n(Retina)" },
{ n: "2", title: "BIPOLAR CELLS", sub: "Inner Nuclear\nLayer" },
{ n: "3", title: "GANGLION CELLS", sub: "Retinal Ganglion\nCells (RGCs)" },
{ n: "4", title: "OPTIC NERVE\n(CN II)", sub: "4 segments" },
{ n: "5", title: "OPTIC CHIASM", sub: "Partial\ndecussation" },
{ n: "6", title: "OPTIC TRACT", sub: "Contralateral\nhemifield" },
{ n: "7", title: "LGN\n(Thalamus)", sub: "6 laminae\nM, P, K cells" },
{ n: "8", title: "OPTIC\nRADIATIONS", sub: "Meyer's loop" },
{ n: "9", title: "VISUAL CORTEX\n(V1 / Area 17)", sub: "Calcarine\nsulcus" },
];
const boxW = 0.92;
const boxH = 1.55;
const startX = 0.25;
const gapX = 1.065;
const boxY = 1.65;
steps.forEach((s, i) => {
const x = startX + i * gapX;
const shade = i % 2 === 0 ? C.mid : C.gray1;
sl.addShape(pres.ShapeType.rect, {
x, y: boxY, w: boxW, h: boxH,
fill: { color: shade }, line: { color: C.gray3, pt: 1 },
});
// Step number circle
sl.addShape(pres.ShapeType.ellipse, {
x: x + 0.26, y: boxY + 0.08, w: 0.38, h: 0.38,
fill: { color: i === 8 ? C.white : C.gray3 }, line: { type: "none" },
});
sl.addText(s.n, {
x: x + 0.26, y: boxY + 0.08, w: 0.38, h: 0.38,
fontSize: 11, bold: true, color: i === 8 ? C.black : C.black,
fontFace: "Calibri", align: "center", valign: "middle", margin: 0,
});
sl.addText(s.title, {
x, y: boxY + 0.52, w: boxW, h: 0.55,
fontSize: 8.5, bold: true, color: C.white,
fontFace: "Calibri", align: "center", valign: "middle", margin: 0,
});
sl.addText(s.sub, {
x, y: boxY + 1.1, w: boxW, h: 0.42,
fontSize: 7.5, color: C.vlight,
fontFace: "Calibri", align: "center", valign: "top", margin: 0,
});
// Arrow between boxes
if (i < steps.length - 1) {
sl.addShape(pres.ShapeType.rightArrow, {
x: x + boxW + 0.02, y: boxY + 0.62, w: 0.14, h: 0.32,
fill: { color: C.gray3 }, line: { type: "none" },
});
}
});
// Key annotation boxes at bottom
const notes = [
{ label: "WITHIN RETINA", range: "Steps 1–3", desc: "Phototransduction → vertical retinal processing" },
{ label: "OPTIC NERVE", range: "Step 4", desc: "4 anatomical segments; CNS tract" },
{ label: "DECUSSATION", range: "Step 5", desc: "Nasal fibres cross; temporal stay ipsilateral" },
{ label: "THALAMIC RELAY", range: "Steps 6–7", desc: "Optic tract → LGN segregation" },
{ label: "CORTICAL DEST.", range: "Steps 8–9", desc: "Meyer's loop → V1 retinotopic map" },
];
notes.forEach((n, i) => {
const x = 0.3 + i * 1.9;
sl.addShape(pres.ShapeType.rect, {
x, y: 3.42, w: 1.75, h: 1.9,
fill: { color: C.gray1 }, line: { color: C.gray3, pt: 0.75 },
});
sl.addText(n.label, {
x, y: 3.46, w: 1.75, h: 0.38,
fontSize: 8, bold: true, color: C.gray4, charSpacing: 1,
fontFace: "Calibri", align: "center", valign: "middle", margin: 0,
});
sl.addText(n.range, {
x, y: 3.84, w: 1.75, h: 0.32,
fontSize: 9, bold: true, color: C.white,
fontFace: "Calibri", align: "center", valign: "middle", margin: 0,
});
addDivider(sl, 4.18);
sl.addText(n.desc, {
x: x + 0.1, y: 4.22, w: 1.6, h: 0.95,
fontSize: 8.5, color: C.vlight,
fontFace: "Calibri", align: "center", valign: "top", margin: 0,
});
});
}
// ══════════════════════════════════════════════════════════════════════════════
// SLIDE 9 — Retinotopic Organisation & Cortical Magnification
// ══════════════════════════════════════════════════════════════════════════════
{
const sl = pres.addSlide();
sl.addShape(pres.ShapeType.rect, {
x: 0, y: 0, w: 10, h: 5.625,
fill: { color: C.offwhite }, line: { type: "none" },
});
sl.addShape(pres.ShapeType.rect, {
x: 0, y: 0, w: 10, h: 1.0,
fill: { color: C.dark }, line: { type: "none" },
});
heading(sl, "RETINOTOPIC ORGANISATION & KEY CONCEPTS", 0.5, 0.18, 9.0, 0.65, 20);
const concepts = [
{
title: "Retinotopy",
body: "Adjacent points on the retina map to adjacent points in the LGN and visual cortex. This point-to-point topographic organisation is preserved throughout the visual pathway, allowing spatial information to be processed in an orderly manner.",
},
{
title: "Cortical Magnification Factor",
body: "The fovea, though small, has disproportionately large representation in V1 (~50% of V1 is devoted to central 10° of vision). This reflects the high density of cones and RGCs in the fovea, enabling fine spatial resolution.",
},
{
title: "Parallel Processing Streams",
body: "From V1, visual information splits into two main processing streams:\n• Dorsal stream (parietal lobe / 'Where' pathway): spatial location, motion, visually guided action.\n• Ventral stream (temporal lobe / 'What' pathway): object recognition, colour, face processing.",
},
{
title: "Binocular Vision & Stereopsis",
body: "Because each optic tract carries input from both eyes for the same hemifield, V1 receives binocular input. Ocular dominance columns in V1 segregate left-eye and right-eye inputs. Comparison of slightly disparate images enables stereoscopic depth perception.",
},
{
title: "The Pupillary Light Reflex Arc",
body: "Some RGC axons (in the optic tract) diverge to the pretectal nucleus before reaching the LGN. Pretectal neurons project bilaterally to the Edinger-Westphal nucleus → ciliary ganglion → pupillary constrictor. This arc is used clinically to test optic nerve/midbrain integrity.",
},
{
title: "Circadian & Non-Image-Forming Pathways",
body: "Intrinsically photosensitive RGCs (ipRGCs) containing melanopsin project to the suprachiasmatic nucleus (SCN) of the hypothalamus — the master circadian clock — and to the intergeniculate leaflet (IGL), regulating sleep-wake cycles and light adaptation.",
},
];
const cols2 = [
[0.3, 1.15],
[3.45, 1.15],
[6.6, 1.15],
[0.3, 3.2],
[3.45, 3.2],
[6.6, 3.2],
];
concepts.forEach((c, i) => {
const [x, y] = cols2[i];
sl.addShape(pres.ShapeType.rect, {
x, y, w: 3.0, h: 1.85,
fill: { color: C.white }, line: { color: C.vlight, pt: 1 },
});
sl.addShape(pres.ShapeType.rect, {
x, y, w: 3.0, h: 0.38,
fill: { color: i < 3 ? C.dark : C.gray2 }, line: { type: "none" },
});
sl.addText(c.title, {
x: x + 0.12, y, w: 2.82, h: 0.38,
fontSize: 10.5, bold: true, color: C.white,
fontFace: "Calibri", align: "left", valign: "middle", margin: 0,
});
sl.addText(c.body, {
x: x + 0.12, y: y + 0.44, w: 2.82, h: 1.38,
fontSize: 9.5, color: C.dark,
fontFace: "Calibri", align: "left", valign: "top", margin: 0,
paraSpaceAfter: 3,
});
});
}
// ══════════════════════════════════════════════════════════════════════════════
// SLIDE 10 — Summary & Clinical Significance
// ══════════════════════════════════════════════════════════════════════════════
{
const sl = pres.addSlide();
sl.addShape(pres.ShapeType.rect, {
x: 0, y: 0, w: 10, h: 5.625,
fill: { color: C.black }, line: { type: "none" },
});
// White accent bottom strip
sl.addShape(pres.ShapeType.rect, {
x: 0, y: 5.3, w: 10, h: 0.325,
fill: { color: C.gray1 }, line: { type: "none" },
});
sl.addText("VISUAL PATHWAY", {
x: 0.5, y: 0.3, w: 9.0, h: 0.8,
fontSize: 40, bold: true, color: C.white, charSpacing: 3,
fontFace: "Calibri", align: "left", valign: "middle", margin: 0,
});
sl.addText("Summary & Clinical Significance", {
x: 0.5, y: 1.1, w: 9.0, h: 0.4,
fontSize: 16, color: C.gray3,
fontFace: "Calibri", align: "left", valign: "middle", margin: 0,
});
addDivider(sl, 1.58, C.gray2);
// Left column: Pathway summary
sl.addText("PATHWAY AT A GLANCE", {
x: 0.5, y: 1.72, w: 4.5, h: 0.35,
fontSize: 10, bold: true, color: C.gray4, charSpacing: 3,
fontFace: "Calibri", align: "left", valign: "middle", margin: 0,
});
const summaryItems = [
"Photoreceptors → Bipolar cells → Retinal ganglion cells",
"RGC axons → Optic nerve (CN II) → Optic chiasm",
"Partial decussation at chiasm (nasal fibres cross)",
"Optic tract → LGN of thalamus (6 layers)",
"LGN axons → Optic radiations → V1 (Area 17)",
"V1 → Dorsal ('Where') & Ventral ('What') streams",
];
summaryItems.forEach((item, i) => {
sl.addShape(pres.ShapeType.rect, {
x: 0.5, y: 2.14 + i * 0.48, w: 0.22, h: 0.22,
fill: { color: C.gray3 }, line: { type: "none" },
});
sl.addText(item, {
x: 0.82, y: 2.08 + i * 0.48, w: 3.9, h: 0.38,
fontSize: 11, color: C.vlight,
fontFace: "Calibri", align: "left", valign: "middle", margin: 0,
});
});
// Right column: Clinical significance
sl.addShape(pres.ShapeType.rect, {
x: 5.1, y: 1.62, w: 4.5, h: 3.4,
fill: { color: C.gray1 }, line: { color: C.gray3, pt: 1 },
});
sl.addText("CLINICAL SIGNIFICANCE", {
x: 5.25, y: 1.7, w: 4.2, h: 0.35,
fontSize: 10, bold: true, color: C.gray4, charSpacing: 3,
fontFace: "Calibri", align: "left", valign: "middle", margin: 0,
});
addDivider(sl, 2.1, C.gray3);
const clinFacts = [
"Anatomical knowledge of the pathway is essential for localising lesions from visual field defects.",
"Optic nerve lesions cause monocular blindness (ipsilateral).",
"Chiasm lesions (pituitary tumours) classically cause bitemporal hemianopia.",
"Optic tract / LGN lesions: incongruous homonymous hemianopia.",
"Optic radiation lesions: congruous homonymous hemianopia ± macular sparing.",
"V1 lesions: congruous homonymous hemianopia with macular sparing.",
"Pupillary light reflex testing evaluates optic nerve (afferent) & CN III (efferent).",
];
clinFacts.forEach((f, i) => {
sl.addShape(pres.ShapeType.rect, {
x: 5.22, y: 2.22 + i * 0.4 + 0.07, w: 0.16, h: 0.16,
fill: { color: C.gray3 }, line: { type: "none" },
});
sl.addText(f, {
x: 5.46, y: 2.2 + i * 0.4, w: 4.0, h: 0.36,
fontSize: 9.5, color: C.vlight,
fontFace: "Calibri", align: "left", valign: "middle", margin: 0,
});
});
// Footer
sl.addText("Source: Gray's Anatomy for Students | Kandel Principles of Neural Science | Costanzo Physiology | Guyton & Hall", {
x: 0.5, y: 5.32, w: 9.0, h: 0.28,
fontSize: 7.5, color: C.gray3, italic: true,
fontFace: "Calibri", align: "left", valign: "middle", charSpacing: 0.5, margin: 0,
});
}
// ══════════════════════════════════════════════════════════════════════════════
// Save
// ══════════════════════════════════════════════════════════════════════════════
pres.writeFile({ fileName: "/home/daytona/workspace/visual-pathway-ppt/Visual_Pathway_Introduction.pptx" })
.then(() => console.log("Done: Visual_Pathway_Introduction.pptx"))
.catch(e => { console.error(e); process.exit(1); });
cd /home/daytona/workspace/visual-pathway-ppt && node visual_pathway_intro.js 2>…
ls -lh /home/daytona/workspace/visual-pathway-ppt/Visual_Pathway_Introduction.pp…
Visual Pathway Introduction
Presentation · PPTX
| Slide | Content |
|---|---|
| 1 | Title slide - bold black background, white text, pathway overview tagline |
| 2 | What is the Visual Pathway? - 6-topic overview grid |
| 3 | The Retina - 8 retinal layers table + 8 key facts |
| 4 | Optic Nerve (CN II) - 4 segment cards (intraocular, intraorbital, intracanalicular, intracranial) |
| 5 | Optic Chiasm - schematic H-shape diagram + 5-point explanation of decussation |
| 6 | Optic Tract & LGN - side-by-side panels; LGN layers (M, P, K cells) |
| 7 | Optic Radiations & V1 - Meyer's loop table; striate cortex / calcarine sulcus detail |
| 8 | Complete Pathway Flow - 9-step arrow flow diagram with annotation boxes |
| 9 | Retinotopic Organisation - 6-concept grid (retinotopy, magnification, parallel streams, stereopsis, PLR arc, circadian pathway) |
| 10 | Summary & Clinical Significance - pathway-at-a-glance + lesion localisation notes |