CNS organization class predestination i want 15 slides matter
CNS organization brain divisions spinal cord diagram
neuron structure axon dendrites synapse diagram
blood brain barrier structure cerebrospinal fluid
mkdir -p /home/daytona/workspace/cns-organization && ls /home/daytona/workspace/
~/cns-organization/build.js
const pptxgen = require("pptxgenjs");
const { execSync } = require("child_process");
// Fetch images as base64
const imageUrls = [
"https://cdn.orris.care/cdss_images/pmc_clinical_VQA_dd1a0c5b40807243cd7abe3941f4203c8c999b9fda72afc01c6a72b21c53d4d3.jpg", // CNS pathway diagram
"https://cdn.orris.care/cdss_images/pmc_clinical_VQA_48ee03ba79de311dca7df9f62e7a12878a99a326c04c7ee99e3ea6d5cde1c172.jpg", // CNS gray/white matter + BBB
"https://cdn.orris.care/cdss_images/pmc_clinical_VQA_7050d80639aa0a9a8c6bc3856bed1c44ca09e3fbacc38d68ceae5875d5ea854f.jpg", // Classic neuron diagram
"https://cdn.orris.care/cdss_images/pmc_clinical_VQA_124c1b844b43ac0ef77a36501c787ee70a1a3e2b5a27eb180d3834d9c14ea0cd.jpg", // Blood-brain barrier
"https://cdn.orris.care/cdss_images/pmc_clinical_VQA_f615ed31668fb18199f97ee8090d03f15b5c2bcfd1157c943fa3ba58293b5571.jpg", // BBB and CSF compartments
];
console.log("Fetching images...");
const images = JSON.parse(execSync(
`node /home/daytona/skills/shared/scripts/fetch_images.js ${imageUrls.map(u => `"${u}"`).join(" ")}`
).toString());
console.log("Images fetched:", images.map(i => i.error ? "ERROR: " + i.error : "OK"));
let pres = new pptxgen();
pres.layout = "LAYOUT_16x9";
pres.title = "Organization of the Central Nervous System";
pres.subject = "CNS Organization - MBBS Lecture";
// βββ Color Palette βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
const DARK_BG = "0D1B2A"; // deep navy (dominant)
const MID_BLUE = "1B4F72"; // supporting
const TEAL = "1ABC9C"; // accent
const WHITE = "FFFFFF";
const LIGHT_GRAY= "D6EAF8";
const YELLOW = "F4D03F";
const ORANGE = "E67E22";
const LIGHT_BG = "EAF2FF"; // light slides
// βββ Helpers βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
function addTitleBar(slide, text, sub) {
// Full dark header bar
slide.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 1.1, fill: { color: MID_BLUE } });
slide.addText(text, {
x: 0.2, y: 0.05, w: 9.6, h: 0.7,
fontSize: 26, bold: true, color: WHITE, fontFace: "Calibri", margin: 0
});
if (sub) {
slide.addText(sub, {
x: 0.2, y: 0.72, w: 9.6, h: 0.35,
fontSize: 12, color: LIGHT_GRAY, fontFace: "Calibri", italic: true, margin: 0
});
}
}
function addAccentLine(slide, y) {
slide.addShape(pres.ShapeType.rect, { x: 0, y, w: 10, h: 0.04, fill: { color: TEAL } });
}
function bullet(text, sub) {
const items = [{ text, options: { bullet: { type: "bullet" }, bold: false, breakLine: sub ? true : false } }];
if (sub) items.push({ text: sub, options: { bullet: { indent: 30 }, color: "888888", breakLine: false } });
return items;
}
// βββ SLIDE 1: Title ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
{
const s = pres.addSlide();
s.background = { color: DARK_BG };
// Decorative rectangles
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 0.18, h: 5.625, fill: { color: TEAL } });
s.addShape(pres.ShapeType.rect, { x: 0.18, y: 0, w: 0.07, h: 5.625, fill: { color: MID_BLUE } });
// Title
s.addText("Organization of the", {
x: 0.6, y: 0.9, w: 9.2, h: 0.8,
fontSize: 34, color: LIGHT_GRAY, fontFace: "Calibri", bold: false, align: "left"
});
s.addText("Central Nervous System", {
x: 0.6, y: 1.65, w: 9.2, h: 1.0,
fontSize: 44, color: WHITE, fontFace: "Calibri", bold: true, align: "left"
});
s.addShape(pres.ShapeType.rect, { x: 0.6, y: 2.7, w: 3.5, h: 0.05, fill: { color: TEAL } });
s.addText("MBBS Lecture Series | Neuroanatomy & Physiology", {
x: 0.6, y: 2.85, w: 9, h: 0.4,
fontSize: 14, color: TEAL, fontFace: "Calibri", italic: true, align: "left"
});
s.addText("Topics Covered:\nAnatomy β’ Cellular Organization β’ Meninges β’ BBB β’ Functional Divisions", {
x: 0.6, y: 3.5, w: 9, h: 0.8,
fontSize: 13, color: LIGHT_GRAY, fontFace: "Calibri", align: "left"
});
if (images[0] && !images[0].error) {
s.addImage({ data: images[0].base64, x: 6.5, y: 2.2, w: 3.2, h: 3.1 });
}
}
// βββ SLIDE 2: Overview / Objectives βββββββββββββββββββββββββββββββββββββββββ
{
const s = pres.addSlide();
s.background = { color: DARK_BG };
addTitleBar(s, "Learning Objectives");
addAccentLine(s, 1.1);
const pts = [
"Define the CNS and distinguish it from the PNS",
"Identify the 7 main anatomical parts of the CNS",
"Describe the cellular components: neurons and glia",
"Explain gray matter vs white matter",
"Outline the meningeal layers and their clinical significance",
"Understand the BloodβBrain Barrier (BBB) and its importance",
"Distinguish somatic vs autonomic nervous system",
];
const bullets = pts.map((t, i) => ({
text: `${i + 1}. ${t}`,
options: { bullet: false, breakLine: i < pts.length - 1 ? true : false }
}));
s.addText(bullets, {
x: 0.4, y: 1.25, w: 9.2, h: 4.1,
fontSize: 16, color: WHITE, fontFace: "Calibri", lineSpacingMultiple: 1.4
});
}
// βββ SLIDE 3: CNS vs PNS βββββββββββββββββββββββββββββββββββββββββββββββββββββ
{
const s = pres.addSlide();
s.background = { color: LIGHT_BG };
addTitleBar(s, "Nervous System: Overview", "Anatomical & Functional Divisions");
addAccentLine(s, 1.1);
// Two columns
// CNS box
s.addShape(pres.ShapeType.roundRect, { x: 0.3, y: 1.3, w: 4.3, h: 3.9, fill: { color: MID_BLUE }, rectRadius: 0.1 });
s.addText("CENTRAL NERVOUS SYSTEM (CNS)", {
x: 0.3, y: 1.3, w: 4.3, h: 0.55,
fontSize: 14, bold: true, color: WHITE, fontFace: "Calibri", align: "center", valign: "middle"
});
s.addText([
{ text: "β’ Brain (cerebrum, cerebellum, brainstem)", options: { breakLine: true } },
{ text: "β’ Spinal cord", options: { breakLine: true } },
{ text: "β’ Located in cranial cavity & vertebral canal", options: { breakLine: true } },
{ text: "β’ Protected by skull & vertebral column", options: { breakLine: true } },
{ text: "β’ Surrounded by meninges & bathed in CSF", options: { breakLine: true } },
{ text: "β’ Integration & coordination centre", options: { breakLine: false } },
], { x: 0.5, y: 1.95, w: 3.9, h: 3.0, fontSize: 13, color: LIGHT_GRAY, fontFace: "Calibri", lineSpacingMultiple: 1.5 });
// PNS box
s.addShape(pres.ShapeType.roundRect, { x: 5.2, y: 1.3, w: 4.3, h: 3.9, fill: { color: "1A5276" }, rectRadius: 0.1 });
s.addText("PERIPHERAL NERVOUS SYSTEM (PNS)", {
x: 5.2, y: 1.3, w: 4.3, h: 0.55,
fontSize: 14, bold: true, color: WHITE, fontFace: "Calibri", align: "center", valign: "middle"
});
s.addText([
{ text: "β’ Cranial nerves (12 pairs)", options: { breakLine: true } },
{ text: "β’ Spinal nerves (31 pairs)", options: { breakLine: true } },
{ text: "β’ Peripheral nerve ganglia", options: { breakLine: true } },
{ text: "β’ Specialized nerve endings", options: { breakLine: true } },
{ text: "β’ Afferent (sensory) pathways β CNS", options: { breakLine: true } },
{ text: "β’ Efferent (motor) pathways β CNS", options: { breakLine: false } },
], { x: 5.4, y: 1.95, w: 3.9, h: 3.0, fontSize: 13, color: LIGHT_GRAY, fontFace: "Calibri", lineSpacingMultiple: 1.5 });
}
// βββ SLIDE 4: 7 Main Parts of the CNS ββββββββββββββββββββββββββββββββββββββββ
{
const s = pres.addSlide();
s.background = { color: DARK_BG };
addTitleBar(s, "The CNS Has Seven Main Anatomical Parts", "Kandel, Principles of Neural Science, 6th Ed.");
addAccentLine(s, 1.1);
if (images[0] && !images[0].error) {
s.addImage({ data: images[0].base64, x: 5.8, y: 1.2, w: 3.9, h: 4.1 });
}
const parts = [
["1. Spinal Cord", "Cervical, Thoracic, Lumbar, Sacral β sensory/motor of limbs & trunk"],
["2. Medulla Oblongata", "Vital autonomic functions: breathing, heart rate, digestion"],
["3. Pons", "Relays info from cerebral hemispheres to cerebellum"],
["4. Cerebellum", "Modulates force/range of movement; motor skill learning"],
["5. Midbrain", "Controls eye movement; coordinates visual & auditory reflexes"],
["6. Diencephalon", "Thalamus (relay centre) + Hypothalamus (autonomic/endocrine)"],
["7. Cerebrum", "Two hemispheres: cortex, basal ganglia, hippocampus, amygdala"],
];
parts.forEach(([title, desc], i) => {
const y = 1.25 + i * 0.6;
s.addShape(pres.ShapeType.rect, { x: 0.25, y: y, w: 0.05, h: 0.4, fill: { color: TEAL } });
s.addText(title, { x: 0.45, y, w: 2.4, h: 0.35, fontSize: 12, bold: true, color: YELLOW, fontFace: "Calibri", margin: 0 });
s.addText(desc, { x: 2.95, y, w: 2.7, h: 0.45, fontSize: 11, color: LIGHT_GRAY, fontFace: "Calibri", margin: 0 });
});
}
// βββ SLIDE 5: Spinal Cord Organization βββββββββββββββββββββββββββββββββββββββ
{
const s = pres.addSlide();
s.background = { color: LIGHT_BG };
addTitleBar(s, "Organization of the Spinal Cord", "Histology β Ross & Pawlina");
addAccentLine(s, 1.1);
const pts = [
["Segments", "Cervical (C1βC8), Thoracic (T1βT12), Lumbar (L1βL5), Sacral (S1βS5), Coccygeal (Co1)"],
["Gray Matter (central H-shape)", "Contains nerve cell bodies, dendrites, interneurons. Dorsal horn (sensory), Ventral horn (motor), Lateral horn (autonomic at T1βL2, S2βS4)"],
["White Matter (peripheral)", "Contains myelinated axon tracts. Dorsal columns (sensory, ascending), Lateral columns (corticospinal, spinocerebellar), Ventral columns (motor, descending)"],
["Key Tracts", "Dorsal columnsβmedial lemniscal pathway (fine touch/proprioception); Spinothalamic tract (pain/temp); Corticospinal tract (voluntary motor)"],
["Functional Roles", "Reflex arcs, sensorimotor integration, autonomic relay (sympathetic & parasympathetic)"],
];
pts.forEach(([head, body], i) => {
const y = 1.25 + i * 0.82;
s.addShape(pres.ShapeType.roundRect, { x: 0.2, y, w: 9.6, h: 0.72, fill: { color: i % 2 === 0 ? "D6EAF8" : "EBF5FB" }, rectRadius: 0.06 });
s.addText(head, { x: 0.35, y: y + 0.04, w: 2.6, h: 0.28, fontSize: 13, bold: true, color: MID_BLUE, fontFace: "Calibri", margin: 0 });
s.addText(body, { x: 3.05, y: y + 0.04, w: 6.65, h: 0.6, fontSize: 11.5, color: "1A1A2E", fontFace: "Calibri", margin: 0 });
});
}
// βββ SLIDE 6: Brain Stem βββββββββββββββββββββββββββββββββββββββββββββββββββββ
{
const s = pres.addSlide();
s.background = { color: DARK_BG };
addTitleBar(s, "The Brain Stem", "Medulla Oblongata | Pons | Midbrain");
addAccentLine(s, 1.1);
const sections = [
{ label: "MEDULLA OBLONGATA", color: "A93226", pts: [
"Most caudal part of brainstem",
"Vital centres: cardiovascular, respiratory, vomiting",
"Cranial nerves IX, X, XI, XII",
"Pyramidal decussation: motor fibres cross midline here",
]},
{ label: "PONS", color: "1F618D", pts: [
"Relays cortical info to cerebellum via pontine nuclei",
"Contains respiratory centre (apneustic/pneumotaxic)",
"Cranial nerves V, VI, VII, VIII",
"Basis pontis + tegmentum",
]},
{ label: "MIDBRAIN (Mesencephalon)", color: "1E8449", pts: [
"Eye movement control (CN III, IV)",
"Tectum: superior colliculi (visual), inferior colliculi (auditory)",
"Substantia nigra: dopaminergic neurons (Parkinson's disease)",
"Red nucleus: motor coordination",
]},
];
sections.forEach((sec, i) => {
const x = 0.2 + i * 3.27;
s.addShape(pres.ShapeType.roundRect, { x, y: 1.2, w: 3.1, h: 4.15, fill: { color: sec.color }, rectRadius: 0.1 });
s.addText(sec.label, { x: x + 0.1, y: 1.25, w: 2.9, h: 0.5, fontSize: 12, bold: true, color: WHITE, fontFace: "Calibri", align: "center", valign: "middle" });
const bItems = sec.pts.map((t, j) => ({ text: "βΈ " + t, options: { breakLine: j < sec.pts.length - 1 ? true : false } }));
s.addText(bItems, { x: x + 0.12, y: 1.82, w: 2.88, h: 3.3, fontSize: 12, color: WHITE, fontFace: "Calibri", lineSpacingMultiple: 1.5 });
});
}
// βββ SLIDE 7: Diencephalon & Cerebrum ββββββββββββββββββββββββββββββββββββββββ
{
const s = pres.addSlide();
s.background = { color: LIGHT_BG };
addTitleBar(s, "Diencephalon & Cerebrum", "Thalamus, Hypothalamus, Cerebral Cortex, Deep Nuclei");
addAccentLine(s, 1.1);
// Diencephalon
s.addShape(pres.ShapeType.rect, { x: 0.2, y: 1.2, w: 4.5, h: 0.4, fill: { color: MID_BLUE } });
s.addText("DIENCEPHALON", { x: 0.2, y: 1.2, w: 4.5, h: 0.4, fontSize: 14, bold: true, color: WHITE, fontFace: "Calibri", align: "center", valign: "middle" });
s.addText([
{ text: "Thalamus", options: { bold: true, color: MID_BLUE, breakLine: true } },
{ text: "β Gateway: relays almost all sensory info to cortex\nβ Thalamic nuclei: specific (VPL, MGN, LGN) & non-specific\n", options: { color: "1A1A2E", breakLine: true } },
{ text: "Hypothalamus", options: { bold: true, color: MID_BLUE, breakLine: true } },
{ text: "β Regulates: autonomic functions, endocrine (pituitary axis)\nβ Controls temperature, hunger, thirst, sleepβwake cycle\nβ Limbic connections: emotional behaviour", options: { color: "1A1A2E", breakLine: false } },
], { x: 0.3, y: 1.7, w: 4.3, h: 3.6, fontSize: 12, fontFace: "Calibri", lineSpacingMultiple: 1.35 });
// Cerebrum
s.addShape(pres.ShapeType.rect, { x: 5.1, y: 1.2, w: 4.7, h: 0.4, fill: { color: "1E8449" } });
s.addText("CEREBRUM", { x: 5.1, y: 1.2, w: 4.7, h: 0.4, fontSize: 14, bold: true, color: WHITE, fontFace: "Calibri", align: "center", valign: "middle" });
s.addText([
{ text: "Cerebral Cortex (gray matter outer layer):", options: { bold: true, color: "1E5631", breakLine: true } },
{ text: "4 lobes: Frontal (motor, executive), Parietal (somatosensory), Temporal (auditory, memory), Occipital (visual)\n", options: { breakLine: true } },
{ text: "Deep Structures:", options: { bold: true, color: "1E5631", breakLine: true } },
{ text: "Basal ganglia (caudate, putamen, globus pallidus) β movement regulation\nHippocampus β explicit (declarative) memory\nAmygdala β emotional responses, fear memory\n", options: { breakLine: true } },
{ text: "White matter: Corona radiata, internal capsule, commissures", options: { italic: true, breakLine: false } },
], { x: 5.2, y: 1.7, w: 4.4, h: 3.6, fontSize: 12, color: "1A1A2E", fontFace: "Calibri", lineSpacingMultiple: 1.3 });
}
// βββ SLIDE 8: Cerebellum βββββββββββββββββββββββββββββββββββββββββββββββββββββ
{
const s = pres.addSlide();
s.background = { color: DARK_BG };
addTitleBar(s, "Cerebellum", "\"Little Brain\" β Motor Coordination & Learning");
addAccentLine(s, 1.1);
s.addText([
{ text: "Structure:", options: { bold: true, color: TEAL, breakLine: true } },
{ text: "β’ Two hemispheres + vermis (midline)\nβ’ Three lobes: anterior, posterior, flocculonodular\nβ’ Deep nuclei: dentate, emboliform, globose, fastigial\n", options: { breakLine: true } },
{ text: "Cortical layers (3):", options: { bold: true, color: TEAL, breakLine: true } },
{ text: "β’ Molecular layer (outermost) β stellate & basket cells\nβ’ Purkinje cell layer β large Purkinje neurons (sole output)\nβ’ Granular layer β granule cells & Golgi cells\n", options: { breakLine: true } },
{ text: "Functions:", options: { bold: true, color: TEAL, breakLine: true } },
{ text: "β’ Coordinates timing & precision of voluntary movement\nβ’ Maintains posture & balance (flocculonodular lobe)\nβ’ Involved in procedural & motor skill learning\nβ’ Receives input from: spinal cord, brainstem, cortex\nβ’ Output via: thalamus β motor cortex (dentato-rubro-thalamic)", options: { breakLine: false } },
], { x: 0.4, y: 1.2, w: 5.6, h: 4.2, fontSize: 13, color: WHITE, fontFace: "Calibri", lineSpacingMultiple: 1.35 });
if (images[1] && !images[1].error) {
s.addImage({ data: images[1].base64, x: 6.2, y: 1.3, w: 3.6, h: 3.8 });
}
}
// βββ SLIDE 9: Neurons β The Functional Unit βββββββββββββββββββββββββββββββββββ
{
const s = pres.addSlide();
s.background = { color: LIGHT_BG };
addTitleBar(s, "Neurons: The Functional Unit of the CNS", "Goodman & Gilman | Ross & Pawlina");
addAccentLine(s, 1.1);
if (images[2] && !images[2].error) {
s.addImage({ data: images[2].base64, x: 6.3, y: 1.2, w: 3.5, h: 3.9 });
}
s.addText([
{ text: "Structure of a Neuron:", options: { bold: true, color: MID_BLUE, breakLine: true } },
{ text: "β’ Cell body (soma): nucleus, Nissl substance (RER), metabolic centre\nβ’ Dendrites: receive incoming signals; short branched processes\nβ’ Axon: single; conducts impulses away from soma; can be myelinated\nβ’ Axon hillock: site of action potential initiation\nβ’ Synaptic terminals (boutons): release neurotransmitters\n", options: { breakLine: true } },
{ text: "Classification:", options: { bold: true, color: MID_BLUE, breakLine: true } },
{ text: "By shape: Multipolar, Bipolar, Unipolar (pseudounipolar)\nBy function: Sensory (afferent), Motor (efferent), Interneuron\nBy NT: Cholinergic, Dopaminergic, GABAergic, Glutamatergic, etc.\n", options: { breakLine: true } },
{ text: "Key property:", options: { bold: true, color: MID_BLUE, breakLine: true } },
{ text: "Neurons are post-mitotic β do NOT divide in most CNS regions", options: { breakLine: false } },
], { x: 0.3, y: 1.2, w: 5.7, h: 4.2, fontSize: 12, color: "1A1A2E", fontFace: "Calibri", lineSpacingMultiple: 1.35 });
}
// βββ SLIDE 10: Glial Cells βββββββββββββββββββββββββββββββββββββββββββββββββββ
{
const s = pres.addSlide();
s.background = { color: DARK_BG };
addTitleBar(s, "Glial Cells (Neuroglia)", "Supporting Cells of the CNS β More Numerous than Neurons");
addAccentLine(s, 1.1);
const cells = [
{ name: "Astrocytes", color: "1ABC9C", desc: "Most abundant glial cell. Structural support, BBB formation (endfeet around capillaries), ion buffering (KβΊ), glutamate recycling, scar formation after injury (reactive gliosis)" },
{ name: "Oligodendrocytes", color: "2980B9", desc: "Myelinate CNS axons (one cell can myelinate multiple axons). Produce myelin sheath β speeds up action potential conduction via saltatory conduction. Damaged in MS." },
{ name: "Microglia", color: "E74C3C", desc: "CNS immune cells (macrophage equivalent). Surveillance, phagocytosis of debris & pathogens. Activated in neuroinflammation, Alzheimer's, infection." },
{ name: "Ependymal Cells", color: "8E44AD", desc: "Line the ventricles and central canal of spinal cord. Produce & circulate cerebrospinal fluid (CSF). Some form choroid plexus." },
];
cells.forEach((c, i) => {
const y = 1.2 + i * 1.05;
s.addShape(pres.ShapeType.roundRect, { x: 0.2, y, w: 9.6, h: 0.93, fill: { color: "0D2137" }, rectRadius: 0.08 });
s.addShape(pres.ShapeType.rect, { x: 0.2, y, w: 0.12, h: 0.93, fill: { color: c.color } });
s.addText(c.name, { x: 0.45, y: y + 0.05, w: 2.2, h: 0.38, fontSize: 14, bold: true, color: c.color, fontFace: "Calibri", margin: 0 });
s.addText(c.desc, { x: 0.45, y: y + 0.44, w: 9.3, h: 0.43, fontSize: 11.5, color: LIGHT_GRAY, fontFace: "Calibri", margin: 0 });
});
}
// βββ SLIDE 11: Gray Matter vs White Matter ββββββββββββββββββββββββββββββββββββ
{
const s = pres.addSlide();
s.background = { color: LIGHT_BG };
addTitleBar(s, "Gray Matter vs White Matter", "Histology: Ross & Pawlina");
addAccentLine(s, 1.1);
// Gray matter
s.addShape(pres.ShapeType.roundRect, { x: 0.2, y: 1.2, w: 4.5, h: 4.15, fill: { color: "566573" }, rectRadius: 0.1 });
s.addText("GRAY MATTER", { x: 0.2, y: 1.2, w: 4.5, h: 0.45, fontSize: 16, bold: true, color: WHITE, fontFace: "Calibri", align: "center", valign: "middle" });
s.addText([
{ text: "Composition:", options: { bold: true, color: YELLOW, breakLine: true } },
{ text: "Neuronal cell bodies, dendrites, axon terminals, synapses, glia (neuropil)\n", options: { breakLine: true } },
{ text: "Location:", options: { bold: true, color: YELLOW, breakLine: true } },
{ text: "β’ Brain: outer cortex + deep nuclei (basal ganglia, thalamus, etc.)\nβ’ Spinal cord: central H-shaped region\n", options: { breakLine: true } },
{ text: "Colour:", options: { bold: true, color: YELLOW, breakLine: true } },
{ text: "Gray/pink β due to cell bodies & capillaries (no myelin)", options: { breakLine: false } },
], { x: 0.35, y: 1.75, w: 4.2, h: 3.5, fontSize: 12, color: WHITE, fontFace: "Calibri", lineSpacingMultiple: 1.35 });
// White matter
s.addShape(pres.ShapeType.roundRect, { x: 5.2, y: 1.2, w: 4.5, h: 4.15, fill: { color: "1B4F72" }, rectRadius: 0.1 });
s.addText("WHITE MATTER", { x: 5.2, y: 1.2, w: 4.5, h: 0.45, fontSize: 16, bold: true, color: WHITE, fontFace: "Calibri", align: "center", valign: "middle" });
s.addText([
{ text: "Composition:", options: { bold: true, color: TEAL, breakLine: true } },
{ text: "Myelinated axons + associated glia (oligodendrocytes) & blood vessels\n", options: { breakLine: true } },
{ text: "Location:", options: { bold: true, color: TEAL, breakLine: true } },
{ text: "β’ Brain: deep core (beneath cortex)\nβ’ Spinal cord: peripheral surrounding the central gray\n", options: { breakLine: true } },
{ text: "Organization:", options: { bold: true, color: TEAL, breakLine: true } },
{ text: "Fibres grouped into tracts β Functionally related bundles connecting CNS regions. No sharp boundaries between adjacent tracts.", options: { breakLine: false } },
], { x: 5.35, y: 1.75, w: 4.2, h: 3.5, fontSize: 12, color: WHITE, fontFace: "Calibri", lineSpacingMultiple: 1.35 });
}
// βββ SLIDE 12: Meninges ββββββββββββββββββββββββββββββββββββββββββββββββββββββ
{
const s = pres.addSlide();
s.background = { color: DARK_BG };
addTitleBar(s, "Meninges: Protective Coverings of the CNS", "Three Layers | CSF Spaces | Clinical Significance");
addAccentLine(s, 1.1);
const layers = [
{ name: "DURA MATER", sub: "Outermost β \"Tough Mother\"", color: "C0392B", desc: "Dense irregular connective tissue. Cranial: two layers (periosteal + meningeal). Contains venous (dural) sinuses. Forms dural folds: Falx cerebri, Tentorium cerebelli. Spinal: single tube with epidural space (contains fat & venous plexus)." },
{ name: "ARACHNOID MATER", sub: "Middle β Spider-web layer", color: "E67E22", desc: "Delicate sheet. Arachnoid trabeculae bridge subarachnoid space (contains CSF). Arachnoid villi/granulations reabsorb CSF into venous sinuses. No blood vessels of its own (avascular). Damage β subarachnoid haemorrhage." },
{ name: "PIA MATER", sub: "Innermost β Directly on CNS", color: "27AE60", desc: "Delicate vascular membrane adherent to brain & spinal cord surface. Follows every gyrus, sulcus & fissure. Contributes to formation of choroid plexus. Separates grey matter surface from subarachnoid space." },
];
layers.forEach((l, i) => {
const y = 1.2 + i * 1.38;
s.addShape(pres.ShapeType.roundRect, { x: 0.2, y, w: 9.6, h: 1.28, fill: { color: "0D2137" }, rectRadius: 0.08 });
s.addShape(pres.ShapeType.rect, { x: 0.2, y, w: 0.14, h: 1.28, fill: { color: l.color } });
s.addText(l.name, { x: 0.47, y: y + 0.06, w: 3.0, h: 0.35, fontSize: 14, bold: true, color: l.color, fontFace: "Calibri", margin: 0 });
s.addText(l.sub, { x: 0.47, y: y + 0.38, w: 3.0, h: 0.28, fontSize: 11, italic: true, color: LIGHT_GRAY, fontFace: "Calibri", margin: 0 });
s.addText(l.desc, { x: 3.55, y: y + 0.08, w: 6.2, h: 1.12, fontSize: 11.5, color: LIGHT_GRAY, fontFace: "Calibri", margin: 0 });
});
}
// βββ SLIDE 13: BloodβBrain Barrier βββββββββββββββββββββββββββββββββββββββββββ
{
const s = pres.addSlide();
s.background = { color: LIGHT_BG };
addTitleBar(s, "The BloodβBrain Barrier (BBB)", "Goodman & Gilman | Ross & Pawlina");
addAccentLine(s, 1.1);
if (images[3] && !images[3].error) {
s.addImage({ data: images[3].base64, x: 5.6, y: 1.2, w: 4.1, h: 3.9 });
}
s.addText([
{ text: "Definition:", options: { bold: true, color: MID_BLUE, breakLine: true } },
{ text: "Selective barrier between blood & CNS parenchyma, formed by specialized brain capillary endothelial cells.\n", options: { breakLine: true } },
{ text: "Components:", options: { bold: true, color: MID_BLUE, breakLine: true } },
{ text: "β’ Endothelial cells with tight junctions (claudin, occludin, ZO-1)\nβ’ Basement membrane (basal lamina)\nβ’ Pericytes (structural support, regulation)\nβ’ Astrocyte endfeet (AQP4 water channels)\n", options: { breakLine: true } },
{ text: "What crosses the BBB:", options: { bold: true, color: MID_BLUE, breakLine: true } },
{ text: "β Small lipid-soluble molecules (Oβ, COβ, alcohol, anaesthetics)\nβ Glucose (via GLUT1), amino acids (carrier-mediated)\nβ Proteins, bacteria, most drugs (clinical challenge)\n", options: { breakLine: true } },
{ text: "Exceptions β Circumventricular Organs (CVOs):", options: { bold: true, color: "C0392B", breakLine: true } },
{ text: "Area postrema, subfornical organ, pineal gland, pituitary β leaky fenestrated capillaries", options: { breakLine: false } },
], { x: 0.3, y: 1.2, w: 5.1, h: 4.15, fontSize: 12, color: "1A1A2E", fontFace: "Calibri", lineSpacingMultiple: 1.3 });
}
// βββ SLIDE 14: Functional Divisions ββββββββββββββββββββββββββββββββββββββββββ
{
const s = pres.addSlide();
s.background = { color: DARK_BG };
addTitleBar(s, "Functional Divisions of the Nervous System", "Somatic vs Autonomic | Sympathetic vs Parasympathetic");
addAccentLine(s, 1.1);
// Somatic NS
s.addShape(pres.ShapeType.roundRect, { x: 0.2, y: 1.2, w: 4.55, h: 2.1, fill: { color: "154360" }, rectRadius: 0.09 });
s.addText("SOMATIC NERVOUS SYSTEM (SNS)", { x: 0.2, y: 1.2, w: 4.55, h: 0.42, fontSize: 13, bold: true, color: TEAL, fontFace: "Calibri", align: "center", valign: "middle" });
s.addText("β’ Voluntary control\nβ’ Innervates: skeletal muscle, skin, joints\nβ’ Single motor neuron from CNS to effector\nβ’ Under conscious awareness", {
x: 0.3, y: 1.66, w: 4.35, h: 1.5, fontSize: 12, color: LIGHT_GRAY, fontFace: "Calibri"
});
// ANS
s.addShape(pres.ShapeType.roundRect, { x: 5.2, y: 1.2, w: 4.55, h: 2.1, fill: { color: "1A5276" }, rectRadius: 0.09 });
s.addText("AUTONOMIC NERVOUS SYSTEM (ANS)", { x: 5.2, y: 1.2, w: 4.55, h: 0.42, fontSize: 13, bold: true, color: YELLOW, fontFace: "Calibri", align: "center", valign: "middle" });
s.addText("β’ Involuntary control\nβ’ Innervates: smooth muscle, cardiac muscle, glands\nβ’ Two neurons: preganglionic + postganglionic\nβ’ Below level of consciousness (reflex)", {
x: 5.3, y: 1.66, w: 4.35, h: 1.5, fontSize: 12, color: LIGHT_GRAY, fontFace: "Calibri"
});
// Sympathetic & Parasympathetic
s.addShape(pres.ShapeType.roundRect, { x: 0.2, y: 3.45, w: 4.55, h: 1.9, fill: { color: "641E16" }, rectRadius: 0.09 });
s.addText("SYMPATHETIC (\"Fight or Flight\")", { x: 0.2, y: 3.45, w: 4.55, h: 0.38, fontSize: 12, bold: true, color: ORANGE, fontFace: "Calibri", align: "center", valign: "middle" });
s.addText("β’ Thoracolumbar outflow (T1βL2)\nβ’ β HR, β BP, bronchodilation, mydriasis\nβ’ NT: NE at neuroeffector junction (Ach preganglionic)", {
x: 0.3, y: 3.88, w: 4.35, h: 1.35, fontSize: 12, color: LIGHT_GRAY, fontFace: "Calibri"
});
s.addShape(pres.ShapeType.roundRect, { x: 5.2, y: 3.45, w: 4.55, h: 1.9, fill: { color: "0B5345" }, rectRadius: 0.09 });
s.addText("PARASYMPATHETIC (\"Rest & Digest\")", { x: 5.2, y: 3.45, w: 4.55, h: 0.38, fontSize: 12, bold: true, color: TEAL, fontFace: "Calibri", align: "center", valign: "middle" });
s.addText("β’ Craniosacral outflow (CN III, VII, IX, X; S2βS4)\nβ’ β HR, β GI motility, miosis, lacrimation\nβ’ NT: ACh at all junctions (nicotinic & muscarinic)", {
x: 5.3, y: 3.88, w: 4.35, h: 1.35, fontSize: 12, color: LIGHT_GRAY, fontFace: "Calibri"
});
}
// βββ SLIDE 15: Summary & Key Points ββββββββββββββββββββββββββββββββββββββββββ
{
const s = pres.addSlide();
s.background = { color: DARK_BG };
// Top accent bar
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 0.55, fill: { color: TEAL } });
s.addText("SUMMARY & KEY TAKEAWAYS", {
x: 0, y: 0, w: 10, h: 0.55, fontSize: 20, bold: true, color: DARK_BG, fontFace: "Calibri", align: "center", valign: "middle"
});
s.addText("CNS Organization β MBBS Lecture", {
x: 0, y: 0.55, w: 10, h: 0.35, fontSize: 12, italic: true, color: TEAL, fontFace: "Calibri", align: "center"
});
const keyPoints = [
["CNS = Brain + Spinal Cord", "Enclosed in skull & vertebral column; protected by meninges & CSF"],
["7 Main Parts", "Spinal cord β Medulla β Pons β Cerebellum β Midbrain β Diencephalon β Cerebrum"],
["Neurons", "Post-mitotic functional units; multipolar most common; classified by shape, function & neurotransmitter"],
["Glia (Neuroglia)", "Astrocytes, Oligodendrocytes, Microglia, Ependymal cells β support, myelination, immunity, CSF"],
["Gray vs White Matter", "Gray = cell bodies/synapses; White = myelinated axon tracts; inverse in brain vs spinal cord"],
["Meninges", "Dura β Arachnoid β Pia; subarachnoid space contains CSF; dural folds support brain"],
["BloodβBrain Barrier", "Tight junctions + astrocyte endfeet; selective permeability; CVOs are exceptions"],
["Functional Divisions", "Somatic (voluntary/skeletal) vs ANS (involuntary); Sympathetic (T1βL2) vs Parasympathetic (craniosacral)"],
];
keyPoints.forEach(([head, body], i) => {
const col = i < 4 ? 0 : 1;
const row = i < 4 ? i : i - 4;
const x = col === 0 ? 0.2 : 5.1;
const y = 1.05 + row * 1.08;
s.addShape(pres.ShapeType.roundRect, { x, y, w: 4.7, h: 0.95, fill: { color: "0D2137" }, rectRadius: 0.08 });
s.addShape(pres.ShapeType.rect, { x, y, w: 0.1, h: 0.95, fill: { color: TEAL } });
s.addText(head, { x: x + 0.18, y: y + 0.05, w: 4.4, h: 0.3, fontSize: 12, bold: true, color: TEAL, fontFace: "Calibri", margin: 0 });
s.addText(body, { x: x + 0.18, y: y + 0.36, w: 4.4, h: 0.52, fontSize: 10.5, color: LIGHT_GRAY, fontFace: "Calibri", margin: 0 });
});
}
// βββ Write file ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
pres.writeFile({ fileName: "/home/daytona/workspace/cns-organization/CNS_Organization.pptx" })
.then(() => console.log("β
PPTX saved successfully!"))
.catch(err => console.error("β Error:", err));
cd /home/daytona/workspace/cns-organization && node build.js 2>&1
ls -lh /home/daytona/workspace/cns-organization/CNS_Organization.pptx
CNS Organization
Presentation Β· PPTX
| # | Slide Title | Key Content |
|---|---|---|
| 1 | Title Slide | Course title, topic overview with CNS pathway diagram |
| 2 | Learning Objectives | 7 clear objectives for MBBS students |
| 3 | CNS vs PNS | Side-by-side comparison boxes |
| 4 | 7 Main Parts of the CNS | All 7 from Kandel's Principles of Neural Science |
| 5 | Spinal Cord Organization | Segments, gray/white matter, tracts, reflex arcs |
| 6 | Brain Stem | Medulla, Pons, Midbrain β structures, CN nuclei, functions |
| 7 | Diencephalon & Cerebrum | Thalamus, Hypothalamus, 4 lobes, deep nuclei |
| 8 | Cerebellum | 3 cortical layers, deep nuclei, Purkinje cells, functions |
| 9 | Neurons | Structure, classification, neurotransmitters (classic diagram) |
| 10 | Glial Cells | Astrocytes, Oligodendrocytes, Microglia, Ependymal cells |
| 11 | Gray vs White Matter | Composition, location, colour, clinical relevance |
| 12 | Meninges | Dura, Arachnoid, Pia β structure, spaces, clinical notes |
| 13 | BloodβBrain Barrier | Components, permeability, CVOs (with BBB diagram) |
| 14 | Functional Divisions | Somatic, ANS, Sympathetic vs Parasympathetic |
| 15 | Summary & Key Takeaways | 8 rapid-revision cards covering all topics |