~/cervical-vertebrae-ppt/generate.js
const pptxgen = require("pptxgenjs");
const pres = new pptxgen();
pres.layout = "LAYOUT_16x9";
pres.title = "Cervical Vertebrae Anatomy";
pres.author = "MBBS Anatomy";
// ─── COLOUR PALETTE ───────────────────────────────────────────────────────────
const C = {
navy: "0D2B55", // dominant dark
teal: "1A7BA4", // supporting mid
sky: "4ABFD4", // accent highlight
cream: "F5F0E8", // light bg
white: "FFFFFF",
text: "1A1A2E",
mutedTxt: "5A6A8A",
accent: "E8531A", // warm orange accent
gold: "F0A500",
lightBlue:"D6EEF5",
};
// ─── HELPERS ──────────────────────────────────────────────────────────────────
function slideBg(slide, color) {
slide.addShape(pres.shapes.RECTANGLE, { x:0, y:0, w:10, h:5.625, fill:{color} });
}
function headerBar(slide, text, subtitle) {
// navy bar at top
slide.addShape(pres.shapes.RECTANGLE, { x:0, y:0, w:10, h:1.1, fill:{color:C.navy} });
// teal accent line
slide.addShape(pres.shapes.RECTANGLE, { x:0, y:1.1, w:10, h:0.07, fill:{color:C.sky} });
slide.addText(text, {
x:0.35, y:0, w:9.3, h:1.1,
fontSize:26, bold:true, color:C.white, fontFace:"Calibri",
valign:"middle"
});
if (subtitle) {
slide.addText(subtitle, {
x:0.35, y:0.68, w:9.3, h:0.42,
fontSize:13, color:C.sky, fontFace:"Calibri", italic:true, valign:"top"
});
}
}
function sectionTag(slide, label, x, y) {
slide.addShape(pres.shapes.ROUNDED_RECTANGLE, {
x, y, w:2.4, h:0.35,
fill:{color:C.teal}, rectRadius:0.05
});
slide.addText(label, {
x, y, w:2.4, h:0.35,
fontSize:11, bold:true, color:C.white, fontFace:"Calibri",
align:"center", valign:"middle"
});
}
function card(slide, x, y, w, h, fillColor, radius) {
slide.addShape(pres.shapes.ROUNDED_RECTANGLE, {
x, y, w, h,
fill:{color: fillColor || C.white},
line:{color:"CCDDEE", width:0.5},
rectRadius: radius || 0.08,
shadow:{type:"outer", color:"000000", blur:5, offset:2, angle:135, opacity:0.10}
});
}
function bullet(text, bold) {
return { text, options:{ bullet:{type:"bullet"}, breakLine:true, bold: bold||false } };
}
function subBullet(text) {
return { text, options:{ bullet:{type:"bullet"}, indentLevel:1, breakLine:true, fontSize:12, color:C.mutedTxt } };
}
// ══════════════════════════════════════════════════════════════════════════════
// SLIDE 1 – TITLE
// ══════════════════════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
// deep navy background
slideBg(s, C.navy);
// teal angled shape (decorative)
s.addShape(pres.shapes.RECTANGLE, { x:6.5, y:0, w:3.5, h:5.625, fill:{color:"0A2344"} });
s.addShape(pres.shapes.RECTANGLE, { x:0, y:4.5, w:10, h:1.125, fill:{color:"091D38"} });
// vertical teal accent bar
s.addShape(pres.shapes.RECTANGLE, { x:0, y:0, w:0.18, h:5.625, fill:{color:C.sky} });
s.addText("CERVICAL VERTEBRAE", {
x:0.5, y:0.55, w:6, h:0.75,
fontSize:36, bold:true, color:C.white, fontFace:"Calibri", charSpacing:4
});
s.addText("ANATOMY", {
x:0.5, y:1.25, w:6, h:0.75,
fontSize:36, bold:true, color:C.sky, fontFace:"Calibri", charSpacing:4
});
s.addShape(pres.shapes.RECTANGLE, { x:0.5, y:2.1, w:3.5, h:0.05, fill:{color:C.gold} });
s.addText("A Comprehensive Guide for MBBS 1st Year Students", {
x:0.5, y:2.25, w:6, h:0.5,
fontSize:14, color:"A8C8E8", fontFace:"Calibri", italic:true
});
s.addText([
bullet("Textbook of Anatomy – Head, Neck & Brain"),
bullet("Vishram Singh"),
bullet("Chapter 7 | AN 43.1 / AN 43.7"),
], {
x:0.5, y:3.3, w:5.5, h:1.5,
fontSize:13, color:"7899BB", fontFace:"Calibri"
});
// right-panel decorative labels
const topics = ["C1 Atlas","C2 Axis","C3-C6 Typical","C7 Prominens","Joints","Ligaments","Clinical"];
topics.forEach((t,i) => {
s.addShape(pres.shapes.ROUNDED_RECTANGLE, { x:6.8, y:0.35+i*0.72, w:2.7, h:0.55,
fill:{color:"112E52"}, rectRadius:0.08 });
s.addText(t, { x:6.8, y:0.35+i*0.72, w:2.7, h:0.55,
fontSize:13, color:i===0?C.gold:C.sky, bold:true, fontFace:"Calibri",
align:"center", valign:"middle" });
});
}
// ══════════════════════════════════════════════════════════════════════════════
// SLIDE 2 – OVERVIEW
// ══════════════════════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
slideBg(s, C.cream);
headerBar(s, "Overview of the Cervical Spine", "Structure | Function | Clinical Importance");
// big circle diagram (simplified)
s.addShape(pres.shapes.OVAL, { x:0.35, y:1.4, w:3.0, h:3.0,
fill:{color:C.navy}, line:{color:C.sky, width:2} });
s.addText("CERVICAL\nSPINE", { x:0.35, y:2.55, w:3.0, h:0.7,
fontSize:16, bold:true, color:C.white, fontFace:"Calibri", align:"center" });
const facts = [
["7", "Cervical Vertebrae"],
["C3–C6", "Typical Vertebrae"],
["C1 + C2", "Atypical (Atlas + Axis)"],
["C7", "Vertebra Prominens"],
["Convex\nAnteriorly", "Cervical Lordosis"],
];
facts.forEach(([num,lbl],i) => {
const yy = 1.35 + i * 0.83;
card(s, 3.65, yy, 5.8, 0.72, C.white);
s.addShape(pres.shapes.RECTANGLE, { x:3.65, yy, x:3.65, y:yy, w:0.08, h:0.72,
fill:{color:C.teal} });
s.addText(num, { x:3.8, y:yy, w:1.4, h:0.72,
fontSize:17, bold:true, color:C.navy, fontFace:"Calibri", valign:"middle" });
s.addText(lbl, { x:5.15, y:yy, w:4.2, h:0.72,
fontSize:13, color:C.text, fontFace:"Calibri", valign:"middle" });
});
}
// ══════════════════════════════════════════════════════════════════════════════
// SLIDE 3 – TYPICAL CERVICAL VERTEBRA (C3–C6)
// ══════════════════════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
slideBg(s, C.cream);
headerBar(s, "Typical Cervical Vertebra (C3–C6)", "Features that distinguish cervical from other vertebrae");
const features = [
["Body", "Small, wider side to side; upper surface has raised lateral lip (uncinate process / joint of Luschka)"],
["Vertebral Foramen", "Large and triangular (to accommodate cervical enlargement of spinal cord)"],
["Foramen Transversarium", "In each transverse process; transmits vertebral artery, vertebral veins & sympathetic plexus (except C7 — only veins)"],
["Transverse Process", "Has anterior and posterior tubercles; anterior = costal element (vestigial rib)"],
["Articular Processes", "Facets nearly horizontal → allows wide range of rotation"],
["Spinous Process", "Short, bifid (forked) in C3–C6; gives attachment to ligamentum nuchae"],
["Uncinate Process", "Raised lip on upper lateral surface; forms joint of Luschka with body above"],
];
features.forEach(([feat, desc], i) => {
const row = Math.floor(i / 2);
const col = i % 2;
const x = col === 0 ? 0.3 : 5.15;
const y = 1.25 + row * 1.08;
card(s, x, y, 4.65, 0.95, C.white);
s.addShape(pres.shapes.ROUNDED_RECTANGLE, { x:x+0.08, y:y+0.08, w:1.3, h:0.35,
fill:{color:C.navy}, rectRadius:0.05 });
s.addText(feat, { x:x+0.08, y:y+0.08, w:1.3, h:0.35,
fontSize:11, bold:true, color:C.white, fontFace:"Calibri", align:"center", valign:"middle" });
s.addText(desc, { x:x+0.08, y:y+0.46, w:4.48, h:0.44,
fontSize:10.5, color:C.text, fontFace:"Calibri", valign:"top" });
});
// 7th card spans full
const last = features[6];
}
// ══════════════════════════════════════════════════════════════════════════════
// SLIDE 4 – C1 ATLAS
// ══════════════════════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
slideBg(s, C.navy);
s.addShape(pres.shapes.RECTANGLE, { x:0, y:0, w:10, h:0.08, fill:{color:C.sky} });
s.addText("C1 — THE ATLAS", {
x:0.4, y:0.18, w:9, h:0.65,
fontSize:28, bold:true, color:C.white, fontFace:"Calibri", charSpacing:3
});
s.addText('"First cervical vertebra — named after the Greek Titan who held up the world"', {
x:0.4, y:0.78, w:9, h:0.4,
fontSize:13, italic:true, color:C.sky, fontFace:"Calibri"
});
const points = [
["NO Body", "The body was taken over by the axis to form the dens (odontoid process). Atlas is a ring-shaped bone."],
["NO Spine", "Has only a posterior tubercle instead of a spinous process. Hence NOT palpable as a bony spike."],
["Two Lateral Masses", "Connected by short anterior arch and long posterior arch."],
["Anterior Arch", "Has anterior tubercle on front face and a facet posteriorly for the dens of axis."],
["Posterior Arch", "Has a groove on its upper surface for the vertebral artery and C1 nerve."],
["Superior Articular Facets", "Concave, oval — articulate with occipital condyles → Atlanto-occipital joint (YES/nodding movement)."],
["Inferior Articular Facets", "Circular, slightly concave — articulate with axis → Atlanto-axial joint (NO/rotation movement)."],
];
points.forEach(([title,desc],i) => {
const col = i < 4 ? 0 : 1;
const row = i < 4 ? i : i-4;
const x = col === 0 ? 0.3 : 5.15;
const y = 1.3 + row * 1.05;
card(s, x, y, 4.65, 0.93, "0A2344");
s.addShape(pres.shapes.RECTANGLE, { x:x, y:y, w:0.07, h:0.93, fill:{color:C.gold} });
s.addText(title, { x:x+0.15, y:y+0.07, w:4.4, h:0.3,
fontSize:12, bold:true, color:C.gold, fontFace:"Calibri" });
s.addText(desc, { x:x+0.15, y:y+0.37, w:4.4, h:0.5,
fontSize:10.5, color:"C8D8E8", fontFace:"Calibri" });
});
}
// ══════════════════════════════════════════════════════════════════════════════
// SLIDE 5 – C2 AXIS
// ══════════════════════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
slideBg(s, C.cream);
headerBar(s, "C2 — The Axis", "Pivot vertebra — permits rotation of head");
const features = [
{ label:"Dens (Odontoid Process)", color:C.accent,
desc:"Tooth-like projection upward from the body of axis. It represents the body of C1 (atlas) that fused with axis during development. It projects through the ring of atlas and acts as a pivot for rotation." },
{ label:"Facet for Anterior Arch of Atlas", color:C.teal,
desc:"Articular facet on the anterior surface of dens, articulates with posterior surface of anterior arch of atlas." },
{ label:"Transverse Ligament of Atlas", color:C.navy,
desc:"A strong ligament behind the dens holding it against the anterior arch of atlas. This prevents the dens from injuring the spinal cord." },
{ label:"Inferior Articular Facets", color:C.teal,
desc:"Directed downward and forward. Articulate with C3 to form typical cervical joints." },
{ label:"Body", color:C.mutedTxt,
desc:"Larger than typical cervical vertebrae. Fused with the dens superiorly. Has facets on upper surface for atlas." },
{ label:"Clinical: Hangman's Fracture", color:C.accent,
desc:"Fracture through pedicles of C2 due to hyperextension + axial loading (e.g., hanging). The C2 body separates from posterior arch. Also occurs in vehicular accidents (dashboard injury)." },
];
features.forEach(({ label, color, desc }, i) => {
const col = i % 2;
const row = Math.floor(i / 2);
const x = col === 0 ? 0.3 : 5.15;
const y = 1.25 + row * 1.35;
card(s, x, y, 4.65, 1.22, C.white);
s.addShape(pres.shapes.RECTANGLE, { x:x, y:y, w:0.07, h:1.22, fill:{color} });
s.addText(label, { x:x+0.14, y:y+0.08, w:4.4, h:0.3,
fontSize:12, bold:true, color, fontFace:"Calibri" });
s.addText(desc, { x:x+0.14, y:y+0.4, w:4.4, h:0.75,
fontSize:10.5, color:C.text, fontFace:"Calibri" });
});
}
// ══════════════════════════════════════════════════════════════════════════════
// SLIDE 6 – C7 VERTEBRA PROMINENS
// ══════════════════════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
slideBg(s, C.cream);
headerBar(s, "C7 — Vertebra Prominens", "Transitional vertebra between cervical and thoracic spine");
const cols = [
{
title:"Distinguishing Features",
color: C.navy,
items:[
"Has a long, thick, non-bifid spinous process",
"Spinous process is knob-like — palpable at base of neck",
"Felt as a bony edge immediately above the bulge of the deltoid",
"Its spine marks the lower end of the nuchal furrow",
"Spines of other cervical vertebrae are covered by ligamentum nuchae",
"Used as a landmark for counting vertebrae clinically",
]
},
{
title:"Foramen Transversarium",
color: C.teal,
items:[
"Present but SMALL",
"Transmits only accessory vertebral veins",
"Does NOT transmit vertebral artery (unlike C1–C6)",
"Vertebral artery enters at C6 foramen transversarium",
"This is an important anatomical variation to remember",
"Very rarely: vertebral artery enters at C7 level",
]
},
{
title:"Clinical Significance",
color: C.accent,
items:[
"Cervical rib: costal element of C7 may persist as a cervical rib",
"Cervical rib compresses lower trunk of brachial plexus (C8, T1)",
"Causes thoracic outlet syndrome: pain, weakness, tingling in medial forearm + little finger",
"Also compresses subclavian artery → vascular symptoms",
"Visible as extra bone on X-ray above 1st thoracic rib",
]
},
];
cols.forEach(({ title, color, items }, ci) => {
const x = 0.25 + ci * 3.22;
card(s, x, 1.25, 3.05, 4.0, C.white);
s.addShape(pres.shapes.RECTANGLE, { x:x, y:1.25, w:3.05, h:0.38, fill:{color} });
s.addText(title, { x:x, y:1.25, w:3.05, h:0.38,
fontSize:12, bold:true, color:C.white, fontFace:"Calibri",
align:"center", valign:"middle" });
s.addText(items.map((t,i)=>({
text: "• " + t,
options:{ breakLine: i < items.length-1 }
})), { x:x+0.1, y:1.7, w:2.85, h:3.45,
fontSize:11, color:C.text, fontFace:"Calibri", valign:"top" });
});
}
// ══════════════════════════════════════════════════════════════════════════════
// SLIDE 7 – JOINTS OF LUSCHKA & INTERVERTEBRAL DISC
// ══════════════════════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
slideBg(s, C.navy);
s.addShape(pres.shapes.RECTANGLE, { x:0, y:0, w:10, h:0.08, fill:{color:C.gold} });
s.addText("Intervertebral Discs & Joints of Luschka", {
x:0.4, y:0.15, w:9.2, h:0.6,
fontSize:24, bold:true, color:C.white, fontFace:"Calibri"
});
s.addText("Key structures in cervical stability and mobility", {
x:0.4, y:0.72, w:9.2, h:0.35,
fontSize:12, italic:true, color:C.sky, fontFace:"Calibri"
});
// IVD section
card(s, 0.3, 1.15, 4.65, 4.1, "0A2344");
s.addShape(pres.shapes.RECTANGLE, { x:0.3, y:1.15, w:4.65, h:0.4, fill:{color:C.teal} });
s.addText("Intervertebral Disc (IVD)", { x:0.3, y:1.15, w:4.65, h:0.4,
fontSize:13, bold:true, color:C.white, fontFace:"Calibri", align:"center", valign:"middle" });
s.addText([
{ text:"Structure:", options:{bold:true, color:C.gold, breakLine:true} },
{ text:"• Annulus Fibrosus: outer fibrocartilaginous laminae; peripheral laminae = pure collagen", options:{breakLine:true, color:"C8D8E8"} },
{ text:"• Nucleus Pulposus: inner jelly-like material (water + proteoglycans)", options:{breakLine:true, color:"C8D8E8"} },
{ text:" ", options:{breakLine:true} },
{ text:"Thickness:", options:{bold:true, color:C.gold, breakLine:true} },
{ text:"• Thicker anteriorly → contributes to cervical lordosis (anterior convexity)", options:{breakLine:true, color:"C8D8E8"} },
{ text:"• NO disc between C1 and C2", options:{breakLine:true, color:C.accent} },
{ text:" ", options:{breakLine:true} },
{ text:"Ligament Blending:", options:{bold:true, color:C.gold, breakLine:true} },
{ text:"• Anteriorly: anterior longitudinal ligament (STRONG)", options:{breakLine:true, color:"C8D8E8"} },
{ text:"• Posteriorly: posterior longitudinal ligament (WEAK)", options:{breakLine:true, color:"C8D8E8"} },
{ text:" ", options:{breakLine:true} },
{ text:"⚠ Clinical: Disc prolapse usually posterolateral at C5–C6 or C6–C7", options:{bold:true, color:C.accent} },
], { x:0.45, y:1.65, w:4.35, h:3.5,
fontSize:10.5, fontFace:"Calibri", valign:"top" });
// Joints of Luschka
card(s, 5.2, 1.15, 4.5, 4.1, "0A2344");
s.addShape(pres.shapes.RECTANGLE, { x:5.2, y:1.15, w:4.5, h:0.4, fill:{color:C.gold} });
s.addText("Joints of Luschka (Uncovertebral)", { x:5.2, y:1.15, w:4.5, h:0.4,
fontSize:13, bold:true, color:C.navy, fontFace:"Calibri", align:"center", valign:"middle" });
s.addText([
{ text:"Formation:", options:{bold:true, color:C.gold, breakLine:true} },
{ text:"• Lateral margins of vertebral bodies overlap sides of IVD", options:{breakLine:true, color:"C8D8E8"} },
{ text:"• Directly articulate with each other", options:{breakLine:true, color:"C8D8E8"} },
{ text:"• Small synovial joints of PLANE variety", options:{breakLine:true, color:"C8D8E8"} },
{ text:" ", options:{breakLine:true} },
{ text:"Clinical — Cervical Spondylosis:", options:{bold:true, color:C.accent, breakLine:true} },
{ text:"• Most common in 3rd–4th decade", options:{breakLine:true, color:"C8D8E8"} },
{ text:"• Joints of Luschka = COMMONEST site of osteophyte formation", options:{breakLine:true, color:C.accent} },
{ text:"• Osteophytes = bony spurs projecting downward from vertebral edges", options:{breakLine:true, color:"C8D8E8"} },
{ text:"• Compress cervical nerve roots posterolaterally", options:{breakLine:true, color:"C8D8E8"} },
{ text:"• Vertebral artery runs in foramina transversaria lateral to these joints → vertebrobasilar insufficiency (dizziness)", options:{breakLine:true, color:C.accent} },
{ text:"• Most frequently affected space: C5–C6", options:{color:"C8D8E8"} },
], { x:5.35, y:1.65, w:4.2, h:3.5,
fontSize:10.5, fontFace:"Calibri", valign:"top" });
}
// ══════════════════════════════════════════════════════════════════════════════
// SLIDE 8 – CRANIOVERTEBRAL JOINTS
// ══════════════════════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
slideBg(s, C.cream);
headerBar(s, "Craniovertebral Joints", "Atlanto-occipital & Atlanto-axial | AN 43.1");
// universal joint banner
card(s, 0.3, 1.25, 9.4, 0.6, C.lightBlue);
s.addText("Together these joints form a UNIVERSAL JOINT — permitting horizontal & vertical scanning movements of the head", {
x:0.4, y:1.25, w:9.2, h:0.6,
fontSize:13, bold:true, color:C.navy, fontFace:"Calibri", align:"center", valign:"middle"
});
// Atlanto-occipital
card(s, 0.3, 2.0, 4.55, 3.3, C.white);
s.addShape(pres.shapes.RECTANGLE, { x:0.3, y:2.0, w:4.55, h:0.42, fill:{color:C.navy} });
s.addText("ATLANTO-OCCIPITAL JOINT", { x:0.3, y:2.0, w:4.55, h:0.42,
fontSize:13, bold:true, color:C.white, fontFace:"Calibri", align:"center", valign:"middle" });
s.addText([
{ text:"Type: ", options:{bold:true} }, { text:"Ellipsoid (synovial)\n", options:{} },
{ text:"Articulation: ", options:{bold:true} }, { text:"Occipital condyles ↔ Superior facets of atlas\n\n", options:{} },
{ text:"Movement: ", options:{bold:true, color:C.teal} }, { text:"Flexion + Extension = 'YES movements' (nodding)\n\n", options:{color:C.teal} },
{ text:"Blood supply: ", options:{bold:true} }, { text:"Vertebral artery\n", options:{} },
{ text:"Nerve supply: ", options:{bold:true} }, { text:"1st cervical nerve\n\n", options:{} },
{ text:"Key ligaments:\n", options:{bold:true} },
{ text:"• Fibrous capsule (thick posterolaterally)\n", options:{} },
{ text:"• Anterior atlanto-occipital membrane\n", options:{} },
{ text:"• Posterior atlanto-occipital membrane\n (arches over vertebral artery groove)", options:{} },
], { x:0.45, y:2.5, w:4.3, h:2.7,
fontSize:11, color:C.text, fontFace:"Calibri", valign:"top" });
// Atlanto-axial
card(s, 5.15, 2.0, 4.55, 3.3, C.white);
s.addShape(pres.shapes.RECTANGLE, { x:5.15, y:2.0, w:4.55, h:0.42, fill:{color:C.teal} });
s.addText("ATLANTO-AXIAL JOINT", { x:5.15, y:2.0, w:4.55, h:0.42,
fontSize:13, bold:true, color:C.white, fontFace:"Calibri", align:"center", valign:"middle" });
s.addText([
{ text:"Type: ", options:{bold:true} }, { text:"3 joints (1 median + 2 lateral)\n", options:{} },
{ text:"Median: ", options:{bold:true} }, { text:"Pivot joint (dens ↔ anterior arch of atlas)\n", options:{} },
{ text:"Lateral: ", options:{bold:true} }, { text:"Plane synovial joints\n\n", options:{} },
{ text:"Movement: ", options:{bold:true, color:C.accent} }, { text:"Rotation = 'NO movements' (~50% of total cervical rotation)\n\n", options:{color:C.accent} },
{ text:"Key stabilising ligament:\n", options:{bold:true} },
{ text:"• Transverse ligament of atlas — holds dens against anterior arch, prevents dens from impaling spinal cord\n\n", options:{color:C.text} },
{ text:"⚠ Rupture of transverse ligament ", options:{bold:true, color:C.accent} },
{ text:"(rheumatoid arthritis, Down syndrome) → atlanto-axial instability → risk of cord compression", options:{color:C.text} },
], { x:5.3, y:2.5, w:4.3, h:2.7,
fontSize:11, color:C.text, fontFace:"Calibri", valign:"top" });
}
// ══════════════════════════════════════════════════════════════════════════════
// SLIDE 9 – LIGAMENTS
// ══════════════════════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
slideBg(s, C.cream);
headerBar(s, "Ligaments of the Cervical Spine", "Stabilising structures of the neck");
const ligs = [
{ name:"Ligamentum Nuchae", color:C.navy,
points:["Triangular sheet of fibroelastic tissue","Median fibrous septum between neck muscles","Superior border → external occipital crest","Anterior border → posterior tubercle of atlas + C2–C7 spines","Free posterior border → EOP to C7 spine","Homologue of supraspinous + interspinous ligaments"] },
{ name:"Anterior Longitudinal Ligament", color:C.teal,
points:["Runs along anterior surface of vertebral bodies","From anterior arch of atlas → sacrum","Strong ligament; long fibres bridge several vertebrae","Short fibres bridge one pair of vertebrae","Blends with annulus fibrosus anteriorly","Prevents hyperextension"] },
{ name:"Posterior Longitudinal Ligament", color:C.accent,
points:["Runs inside vertebral canal on posterior surface of bodies","Above C2 it becomes membrana tectoria","Weaker than anterior LL","Wide over discs, narrow over bodies","Space for basivertebral + paravertebral venous plexus","Weakness → disc herniation usually posterolateral"] },
{ name:"Ligamenta Flava", color:C.gold,
points:["Connect adjacent laminae","Predominantly yellow elastic tissue","Extend from lower border of lamina above to upper border of lamina below","Prevent separation of laminae in flexion","Help restore erect posture after flexion","Protect the intervertebral disc from injury"] },
{ name:"Transverse Ligament of Atlas", color:"6A3D9A",
points:["Strong band connecting lateral masses of atlas","Holds dens against anterior arch of atlas","Critical stabiliser of atlanto-axial joint","Most important ligament of craniovertebral region","Rupture → atlanto-axial dislocation → cord injury risk","Associated: rheumatoid arthritis, Down syndrome, trauma"] },
{ name:"Alar Ligaments", color:"2E8B57",
points:["Two cord-like bands","From apex of dens to medial sides of occipital condyles","Check ligaments — limit rotation and lateral flexion","Prevent excessive rotation of atlas on axis","Damaged in whiplash injury","Bilateral — present on both sides"] },
];
ligs.forEach(({ name, color, points }, i) => {
const col = i % 3;
const row = Math.floor(i / 3);
const x = 0.25 + col * 3.22;
const y = 1.25 + row * 2.1;
card(s, x, y, 3.08, 1.95, C.white);
s.addShape(pres.shapes.RECTANGLE, { x:x, y:y, w:3.08, h:0.36, fill:{color} });
s.addText(name, { x:x, y:y, w:3.08, h:0.36,
fontSize:11, bold:true, color:C.white, fontFace:"Calibri",
align:"center", valign:"middle" });
s.addText(points.map((p,idx) => ({
text:"• "+p,
options:{ breakLine: idx < points.length-1 }
})), { x:x+0.08, y:y+0.42, w:2.9, h:1.45,
fontSize:9.5, color:C.text, fontFace:"Calibri", valign:"top" });
});
}
// ══════════════════════════════════════════════════════════════════════════════
// SLIDE 10 – MOVEMENTS OF THE CERVICAL SPINE
// ══════════════════════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
slideBg(s, C.navy);
s.addShape(pres.shapes.RECTANGLE, { x:0, y:0, w:10, h:0.08, fill:{color:C.teal} });
s.addText("Movements of the Cervical Spine", {
x:0.4, y:0.15, w:9.2, h:0.55,
fontSize:26, bold:true, color:C.white, fontFace:"Calibri"
});
s.addText("Craniovertebral joints enhance all movements", {
x:0.4, y:0.68, w:9.2, h:0.32,
fontSize:12, italic:true, color:C.sky, fontFace:"Calibri"
});
const moves = [
{ mv:"FLEXION", icon:"↓", desc:"Forward bending\nExtensive range\nAnterior longitudinal ligament resists", joint:"Atlanto-occipital + all IVDs", color:C.teal },
{ mv:"EXTENSION", icon:"↑", desc:"Backward bending\nExtensive range\nPosterior ligaments resist", joint:"Atlanto-occipital + all IVDs", color:C.sky },
{ mv:"LATERAL FLEXION", icon:"↔", desc:"Side bending\nExtensive range\nIntertransverse ligaments resist", joint:"Facet joints + IVDs", color:"3DA56E" },
{ mv:"ROTATION", icon:"↺", desc:"Twisting movement\nGreatest freedom\n~50% at atlanto-axial joint alone", joint:"Atlanto-axial (primary)", color:C.gold },
{ mv:"CIRCUMDUCTION", icon:"⊙", desc:"Combination of all\nthe above movements\nNot a primary movement", joint:"All cervical joints", color:C.accent },
];
moves.forEach(({ mv, icon, desc, joint, color }, i) => {
const x = i < 3 ? 0.3 + i * 3.2 : 1.8 + (i-3) * 3.2;
const y = i < 3 ? 1.12 : 3.2;
card(s, x, y, 2.95, 1.9, "0A2344");
// circle icon
s.addShape(pres.shapes.OVAL, { x:x+1.22, y:y+0.1, w:0.52, h:0.52,
fill:{color}, line:{color:"FFFFFF", width:0} });
s.addText(icon, { x:x+1.22, y:y+0.1, w:0.52, h:0.52,
fontSize:18, bold:true, color:C.white, fontFace:"Calibri",
align:"center", valign:"middle" });
s.addText(mv, { x:x+0.08, y:y+0.68, w:2.8, h:0.3,
fontSize:12, bold:true, color, fontFace:"Calibri", align:"center" });
s.addText(desc, { x:x+0.08, y:y+0.98, w:2.8, h:0.55,
fontSize:9.5, color:"A8C8E0", fontFace:"Calibri", align:"center" });
s.addText("Joint: "+joint, { x:x+0.08, y:y+1.58, w:2.8, h:0.25,
fontSize:9, color:C.gold, fontFace:"Calibri", align:"center", italic:true });
});
}
// ══════════════════════════════════════════════════════════════════════════════
// SLIDE 11 – CLINICAL CORRELATIONS
// ══════════════════════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
slideBg(s, C.cream);
headerBar(s, "Clinical Correlations", "High-yield exam topics for MBBS");
const clinics = [
{ title:"Cervical Spondylosis", color:C.accent,
body:"Degenerative disease of cervical spine beginning in 3rd–4th decade. Most affected: C5–C6 disc space. Joints of Luschka form osteophytes (bony spurs) → compress nerve roots → radiating arm pain. Vertebral artery compression → vertebrobasilar insufficiency (dizziness, syncope on neck movement)." },
{ title:"Disc Prolapse (PID)", color:C.navy,
body:"Nucleus pulposus herniates posterolaterally through annulus fibrosus, compresses nerve root.\n• C5–C6 disc → C6 nerve root → pain in thumb\n• C6–C7 disc → C7 nerve root → pain, tingling in middle & index fingers, posterior arm" },
{ title:"Hangman's Fracture", color:C.teal,
body:"Fracture-dislocation through pedicles of C2 (axis) due to hyperextension + axial loading. Seen in judicial hangings and road traffic accidents (dashboard injuries). C2 body separates from posterior arch. May cause cord injury or death." },
{ title:"Atlanto-axial Instability", color:"6A3D9A",
body:"Due to rupture/laxity of transverse ligament of atlas. Dens may impinge on spinal cord. Associated with: Rheumatoid Arthritis (pannus erodes ligament), Down Syndrome (ligament laxity), trauma. Presentation: myelopathy, neck pain, upper motor neuron signs." },
{ title:"Cervical Rib", color:C.gold,
body:"Persistent costal element of C7 forms an extra rib. Compresses lower trunk of brachial plexus (C8, T1) and subclavian artery → Thoracic Outlet Syndrome: medial forearm/little finger pain + weakness + vascular symptoms." },
{ title:"Neck Rigidity (Meningism)", color:"2E8B57",
body:"Spasm of extensor muscles of back of neck occurs in meningitis. Caused by irritation of cervical nerve roots in infected subarachnoid space. Kernig and Brudzinski signs positive. Passive neck flexion causes pain as inflamed nerve roots are stretched." },
];
clinics.forEach(({ title, color, body }, i) => {
const col = i % 2;
const row = Math.floor(i / 2);
const x = col === 0 ? 0.3 : 5.15;
const y = 1.25 + row * 1.4;
card(s, x, y, 4.65, 1.28, C.white);
s.addShape(pres.shapes.RECTANGLE, { x:x, y:y, w:0.09, h:1.28, fill:{color} });
s.addText(title, { x:x+0.18, y:y+0.07, w:4.35, h:0.28,
fontSize:12, bold:true, color, fontFace:"Calibri" });
s.addText(body, { x:x+0.18, y:y+0.38, w:4.35, h:0.84,
fontSize:10, color:C.text, fontFace:"Calibri", valign:"top" });
});
}
// ══════════════════════════════════════════════════════════════════════════════
// SLIDE 12 – QUICK REVISION TABLE
// ══════════════════════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
slideBg(s, C.navy);
s.addShape(pres.shapes.RECTANGLE, { x:0, y:0, w:10, h:0.08, fill:{color:C.gold} });
s.addText("Quick Revision — Cervical Vertebrae at a Glance", {
x:0.4, y:0.14, w:9.2, h:0.55,
fontSize:23, bold:true, color:C.white, fontFace:"Calibri"
});
const rows = [
["Vertebra","Body","Spine","Foramen Trans.","Special Feature","Joint / Movement"],
["C1 (Atlas)","ABSENT","ABSENT (tubercle)","Present","Ring-shaped; no body or spine","AO joint → YES (nodding)"],
["C2 (Axis)","Present + Dens","Bifid","Present","Dens = pivot for rotation","AA joint → NO (rotation)"],
["C3","Small, typical","Bifid","Present","Typical cervical","Zygapophyseal facet joint"],
["C4","Small, typical","Bifid","Present","Typical cervical","Zygapophyseal facet joint"],
["C5","Small, typical","Bifid","Present","Typical cervical; C5–C6 disc most affected","Most common spondylosis level"],
["C6","Small, typical","Bifid","Present","Vertebral artery ENTERS at C6","Anterior tubercle = carotid tubercle"],
["C7 (Prominens)","Larger","Long, NON-bifid","Small (veins only)","Palpable landmark at base of neck","VA does NOT pass foramen trans."],
];
const colW = [1.3, 1.2, 1.3, 1.2, 2.2, 2.15];
const colX = [0.2, 1.5, 2.7, 4.0, 5.2, 7.4];
rows.forEach((row, ri) => {
const y = 0.82 + ri * 0.59;
const isHeader = ri === 0;
const bgColor = isHeader ? C.teal : (ri % 2 === 0 ? "0A2344" : "091D38");
s.addShape(pres.shapes.RECTANGLE, { x:0.2, y, w:9.6, h:0.58, fill:{color:bgColor} });
row.forEach((cell, ci) => {
s.addText(cell, {
x: colX[ci], y, w: colW[ci], h:0.58,
fontSize: isHeader ? 10 : 9.5,
bold: isHeader || ci === 0,
color: isHeader ? C.white : (ci === 0 ? C.gold : "C8D8E8"),
fontFace:"Calibri", valign:"middle",
align: ci === 0 ? "left" : "left"
});
});
});
}
// ══════════════════════════════════════════════════════════════════════════════
// SLIDE 13 – MEMORY TRICKS
// ══════════════════════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
slideBg(s, C.cream);
headerBar(s, "Memory Aids & Mnemonics", "High-yield tips for exams");
const tricks = [
{ label:"YES & NO", color:C.teal,
body:"Atlanto-occipital = YES (nodding/flexion-extension)\nAtlanto-axial = NO (rotation left-right)\nThink of which movement each joint allows!" },
{ label:"C1 = No Body, No Spine", color:C.navy,
body:"'Atlas holds the world (skull), so he gave up his body and spine to the axis.'\nC1 has no body — its body became the dens of C2." },
{ label:"Foramen Transversarium Rule", color:C.accent,
body:"C1–C6 = Vertebral artery passes through\nC7 = Only vertebral VEINS pass (NOT the artery)\nVertebral artery enters at C6, exits at C1." },
{ label:"Bifid Spine Rule", color:C.gold,
body:"C3–C6 = Bifid (forked) spinous process\nC7 = Long, single, non-bifid (hence PROMINENT)\nC1 = Posterior tubercle only (no spine at all)" },
{ label:"Disc Prolapse Nerve Trick", color:"2E8B57",
body:"Herniated disc compresses the nerve ONE LEVEL BELOW:\n• C4–C5 disc → C5 nerve root\n• C5–C6 disc → C6 root → thumb pain\n• C6–C7 disc → C7 root → index/middle finger pain" },
{ label:"Spondylosis = C5–C6 First", color:"6A3D9A",
body:"'5th floor is the most busy' — C5–C6 is the most mobile segment of the cervical spine, hence it degenerates first. Begin your spondylosis answers with C5–C6." },
];
tricks.forEach(({ label, color, body }, i) => {
const col = i % 2;
const row = Math.floor(i / 2);
const x = col === 0 ? 0.3 : 5.15;
const y = 1.25 + row * 1.4;
card(s, x, y, 4.65, 1.28, C.white);
s.addShape(pres.shapes.RECTANGLE, { x:x, y, w:4.65, h:0.36, fill:{color} });
s.addText(label, { x:x, y, w:4.65, h:0.36,
fontSize:13, bold:true, color:C.white, fontFace:"Calibri",
align:"center", valign:"middle" });
s.addText(body, { x:x+0.12, y:y+0.42, w:4.4, h:0.8,
fontSize:11, color:C.text, fontFace:"Calibri", valign:"top" });
});
}
// ══════════════════════════════════════════════════════════════════════════════
// SLIDE 14 – CLOSING
// ══════════════════════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
slideBg(s, C.navy);
s.addShape(pres.shapes.RECTANGLE, { x:0, y:0, w:10, h:0.08, fill:{color:C.gold} });
s.addShape(pres.shapes.RECTANGLE, { x:0, y:5.545, w:10, h:0.08, fill:{color:C.gold} });
s.addText("KEY TAKEAWAYS", {
x:0.5, y:0.3, w:9, h:0.55,
fontSize:28, bold:true, color:C.sky, fontFace:"Calibri", charSpacing:4, align:"center"
});
const takeaways = [
"C1 (Atlas): NO body, NO spine — ring bone; YES movement (nodding) at atlanto-occipital joint",
"C2 (Axis): Has DENS — pivot for rotation; NO movement (rotation) at atlanto-axial joint",
"C3–C6: Typical cervical vertebrae — bifid spine, foramen transversarium with vertebral artery",
"C7: Long non-bifid spine — palpable landmark; foramen transversarium carries only veins",
"Intervertebral discs: Annulus fibrosus + nucleus pulposus; no disc between C1–C2",
"Joints of Luschka: Commonest site of osteophytes in cervical spondylosis",
"Most common disc prolapse level: C5–C6 (compresses C6 nerve root → thumb pain)",
"Transverse ligament of atlas: Critical stabiliser of atlanto-axial joint; rupture → cord injury risk",
"Atlanto-occipital joint: Ellipsoid; allows flexion-extension | Atlanto-axial: Pivot; allows rotation",
];
s.addText(takeaways.map((t, i) => ({
text: `${i+1}. ${t}`,
options: { breakLine: i < takeaways.length - 1, color: i % 2 === 0 ? C.white : C.sky }
})), {
x:0.6, y:1.0, w:8.8, h:4.2,
fontSize:12, fontFace:"Calibri", valign:"top"
});
}
// ─── WRITE FILE ──────────────────────────────────────────────────────────────
pres.writeFile({ fileName: "/home/daytona/workspace/cervical-vertebrae-ppt/Cervical_Vertebrae_Anatomy.pptx" })
.then(() => console.log("✅ Presentation saved successfully!"))
.catch(e => { console.error("❌ Error:", e); process.exit(1); });