What is mean by dural venous sinuses

Reading File
Finding Sources
Finding Sources
Reading File
Reading File
Loading Image
Here is a thorough explanation of dural venous sinuses, drawn from Gray's Anatomy for Students and the Color Atlas of Human Anatomy Vol. 2:

Dural Venous Sinuses

Definition

Dural venous sinuses are large venous channels (spaces) formed between the two layers of the dura mater - the periosteal layer (outer) and the meningeal layer (inner). Their rigid walls are made up of cranial periosteum and dura mater, and the interior is lined with endothelium. Unlike typical veins, they have no valves and no muscular walls.
Diagram showing a dural venous sinus sitting between the skull and brain, receiving cerebral veins, emissary veins, and diploic veins
Fig. - Dural Venous Sinuses (Gray's Anatomy for Students)

What They Receive (Drainage Into Sinuses)

  • Venous blood from the brain (via cerebral veins)
  • Cerebrospinal fluid (CSF) absorbed by arachnoid granulations (villi that project into the sinuses)
  • Blood from the diploic veins of the skull bones
  • Blood from emissary veins (connecting extracranial veins to the sinuses through skull foramina)

Where They Drain

All dural venous sinuses ultimately drain into the internal jugular veins, which carry blood back to the heart.

List of Dural Venous Sinuses

SinusLocationWhat It Receives
Superior sagittalSuperior border of falx cerebriSuperior cerebral veins, diploic veins, emissary veins, and CSF
Inferior sagittalInferior margin of falx cerebriA few cerebral veins and veins from the falx
StraightJunction of falx cerebri and tentorium cerebelliInferior sagittal sinus + great cerebral vein
OccipitalIn falx cerebelli against occipital boneCommunicates with vertebral venous plexus
Confluence of sinusesAt internal occipital protuberanceReceives superior sagittal, straight, and occipital sinuses
Transverse (right & left)Along posterior/lateral attachment of tentorium cerebelliFrom confluence of sinuses, superior petrosal sinus
Sigmoid (right & left)Continuation of transverse sinuses to internal jugular veinTransverse sinuses, cerebral and cerebellar veins
Cavernous (paired)Lateral to body of sphenoid / beside sella turcicaOphthalmic veins, sphenoparietal sinus, cerebral veins
IntercavernousCrossing the sella turcicaInterconnects the two cavernous sinuses
Sphenoparietal (paired)Inferior surface of lesser wings of sphenoidDiploic and meningeal veins
Superior petrosal (paired)Superior margin of petrous temporal boneConnects cavernous to transverse/sigmoid sinuses
Inferior petrosal (paired)Inferior border of petrous temporal boneDrains cavernous sinus to internal jugular vein; receives labyrinthine veins
Basilar plexusOn the clivusConnects cavernous sinus with marginal sinus
Marginal sinusEncircles foramen magnumConnects dural sinuses with vertebral venous plexuses

Special Note: The Cavernous Sinus

The cavernous sinus is clinically very important because important structures pass through or lie within it:
  • Internal carotid artery (with sympathetic plexus)
  • Abducent nerve (CN VI) - passes through the sinus
  • Lying in its lateral wall: oculomotor nerve (CN III), trochlear nerve (CN IV), ophthalmic nerve (CN V1), and maxillary nerve (CN V2)
It communicates with:
  • The angular/facial vein via the superior ophthalmic vein - this is why facial infections can spread intracranially
  • The opposite cavernous sinus via intercavernous sinuses
  • The sigmoid sinus via the superior petrosal sinus
  • The internal jugular vein via the inferior petrosal sinus

Clinical Importance

  1. Extradural hematoma - tearing of a dural venous sinus (or middle meningeal artery) causes bleeding into the extradural space.
  2. Subdural hematoma - tearing of a cerebral (bridging) vein as it crosses the dura to enter a dural venous sinus.
  3. Dural venous sinus thrombosis - blood clot in a sinus (e.g., superior sagittal sinus thrombosis) can raise intracranial pressure and cause stroke.
  4. Skull fracture - fractures crossing a major dural sinus can cause serious venous bleeding.
  5. Infection spread - since emissary veins are valveless, infections from the face or scalp can travel into the sinuses.

Sources: Gray's Anatomy for Students; Color Atlas of Human Anatomy Vol. 2, Internal Organs

Exaplian facial nerve maxillary nerve and mandibular nerve and all there branches

Finding Sources
Finding Sources
Finding Sources
Finding Sources
Finding Sources
Finding Sources
Reading File
Reading File
Reading File
Reading File
Reading File
Reading File
Reading File
Finding Sources
Reading File
Reading File
Reading File
Loading Image
Loading Image
Here is a thorough, textbook-based explanation of all three nerves and their branches.

Facial Nerve (CN VII), Maxillary Nerve (CN V2), and Mandibular Nerve (CN V3)


1. FACIAL NERVE (CN VII)

Overview

The facial nerve is a mixed nerve carrying four types of fibers:
  • BE (Branchial Efferent) - motor to muscles of facial expression (the main, large root)
  • GVE (General Visceral Efferent) - preganglionic parasympathetic to lacrimal, submandibular, and sublingual glands + nasal/palatal mucous glands (carried in the nervus intermedius, the smaller sensory root)
  • SA (Special Afferent) - taste from the anterior 2/3 of the tongue
  • GSA (General Somatic Afferent) - sensation from part of the external acoustic meatus and deeper auricle
(Gray's Anatomy for Students)

Course

The facial nerve arises at the junction of the pons and medulla as two roots (a large motor root + smaller nervus intermedius). Both roots enter the internal acoustic meatus, travel through the facial (fallopian) canal in the petrous temporal bone, and unite. The nerve enlarges at the geniculate ganglion (which holds sensory cell bodies for taste and skin sensation), makes a sharp bend (genu), then exits the skull via the stylomastoid foramen.

Branches (in order from proximal to distal)

A. Within the Petrous Temporal Bone

BranchFunction
Greater petrosal nerve (from geniculate ganglion)Carries preganglionic parasympathetic fibers to the pterygopalatine ganglion → secretomotor to lacrimal gland and nasal/palatal glands; also carries taste from the soft palate
Nerve to stapediusMotor to the stapedius muscle in the middle ear (dampens loud sounds)
Chorda tympaniCarries taste from anterior 2/3 of tongue + preganglionic parasympathetic to submandibular ganglion → submandibular and sublingual salivary glands. Passes through the middle ear across the tympanic membrane, exits through the petrotympanic fissure, and joins the lingual nerve (V3) in the infratemporal fossa

B. After Exiting the Stylomastoid Foramen

  • Posterior auricular nerve - motor to occipitalis, auricular muscles; sensory to the auricle
  • Nerve to posterior belly of digastric
  • Nerve to stylohyoid

C. Terminal Branches (Five Groups - "Ten Zimbabweans Bought My Car")

The nerve enters the parotid gland and divides into upper and lower trunks, then forms five terminal groups emerging from the parotid:
BranchMuscles SuppliedArea
TemporalFrontalis, orbicularis oculi (upper), corrugator superciliiForehead, upper face
ZygomaticOrbicularis oculi (lower), zygomaticusMid-face, cheek
BuccalBuccinator, orbicularis oris, upper lip musclesCheek, upper lip
Marginal mandibularLower lip muscles, mentalis, depressor anguli orisLower lip, chin
CervicalPlatysmaNeck
Note: These are all motor branches - the facial nerve does NOT carry sensation to the face (that is the trigeminal nerve's job).
(Cummings Otolaryngology; Gray's Anatomy for Students)

2. MAXILLARY NERVE (CN V2)

Overview

The maxillary nerve is the middle division of the trigeminal nerve (CN V). It is purely sensory. It originates from the trigeminal ganglion, passes in the lower lateral wall of the cavernous sinus, exits the skull through the foramen rotundum, enters the pterygopalatine fossa, travels through the inferior orbital fissure into the orbital floor, and exits the face via the infraorbital foramen as the infraorbital nerve.
Sensory territory: Skin of the cheek, side of the nose, lower eyelid, upper lip; teeth and gums of the upper jaw; palate, nasal cavity, maxillary sinus; dura of the middle cranial fossa.

Branches

Diagram showing the maxillary nerve (V2) and its branches including the zygomatic nerve, alveolar nerves, and sphenopalatine ganglion connections
Fig. - The Maxillary Nerve (V2) and its branches (Scott-Brown's Otorhinolaryngology)
BranchSensory Territory
Meningeal branchDura mater of the middle cranial fossa
Ganglionic branches (2) to pterygopalatine ganglionCarries secretomotor fibers (from CN VII via greater petrosal nerve) to the lacrimal gland; conducts nasal and palatine sensation
Zygomatic nerveSplits into two: Zygomaticotemporal (skin of the temple) and Zygomaticofacial (skin over the cheekbone/zygomatic prominence)
Superior alveolar nerves (posterior, middle, anterior)Upper teeth and gums via the superior dental plexus; anterior superior alveolar branch also supplies the lateral nasal wall, nasal septum, lower eyelid, and upper lip skin
Infraorbital nerve (terminal branch)Skin of the cheek, midlateral nose, lower eyelid, upper lip mucosa
Palatine nerves (greater and lesser)Greater: hard palate mucosa; Lesser: soft palate and tonsil region
Nasal branches (posterior superior lateral/medial; nasopalatine)Lateral wall and septum of nasal cavity; nasopalatine nerve passes through the incisive canal to supply oral mucosa behind the incisor teeth
Pharyngeal branchMucosa of the nasopharynx
Pterygopalatine (sphenopalatine) ganglion is suspended from V2 in the pterygopalatine fossa. It receives preganglionic parasympathetic fibers from CN VII via the greater petrosal nerve + sympathetic fibers from the deep petrosal nerve. Postganglionic fibers distribute via V2 branches to the lacrimal gland, nasal glands, and palatal glands.
(Scott-Brown's Otorhinolaryngology; Gray's Anatomy for Students)

3. MANDIBULAR NERVE (CN V3)

Overview

The mandibular nerve is the largest division of the trigeminal nerve and the only one that is both sensory and motor. It exits the skull through the foramen ovale. The motor root of CN V (which traveled medial to the trigeminal ganglion inside the skull) passes through the foramen ovale and immediately joins the sensory part of V3 outside the skull.
Sensory territory: Skin of the lower face, cheek, lower lip, chin, anterior external ear, temporal region; anterior 2/3 of the tongue (general sensation); teeth and gums of the lower jaw; mastoid air cells; dura of the middle cranial fossa.
Motor territory: Four muscles of mastication (temporalis, masseter, medial pterygoid, lateral pterygoid) + tensor tympani, tensor veli palatini, anterior belly of digastric, and mylohyoid.

Branches

The mandibular nerve gives off a meningeal branch and nerve to medial pterygoid first, then divides into anterior and posterior trunks:

Anterior Trunk (mostly motor, one sensory)

BranchTypeTarget
Buccal nerveMainly sensorySkin and mucosa of the cheek; buccal gingivae of lower molars
Masseteric nerveMotorMasseter muscle
Deep temporal nerves (usually 2)MotorTemporalis muscle
Nerve to lateral pterygoidMotorLateral pterygoid muscle

Posterior Trunk (mostly sensory, one motor branch)

BranchTypeTarget
Auriculotemporal nerveSensory + carries parasympatheticSkin of the temple (main area); external ear, external acoustic meatus, tympanic membrane, TMJ; also delivers postganglionic parasympathetic fibers from the otic ganglion (CN IX origin) to the parotid gland
Lingual nerveSensory (joined by chorda tympani)General sensation from anterior 2/3 of tongue, oral floor mucosa, lingual gingivae. Chorda tympani joins it in the infratemporal fossa, adding taste from anterior 2/3 of tongue and parasympathetic supply to submandibular and sublingual glands
Inferior alveolar nerveSensory + one motor branchAll lower teeth and much of the gingivae; lower lip and chin skin. Gives off: nerve to mylohyoid (motor - to mylohyoid and anterior belly of digastric) just before entering the mandibular foramen; then divides into incisive nerve (to front lower teeth) and mental nerve (exits through mental foramen → lower lip and chin skin)

Other from Main Trunk

BranchTarget
Meningeal branchDura mater of middle cranial fossa; exits through foramen spinosum with middle meningeal artery
Nerve to medial pterygoidMedial pterygoid; gives branches to tensor tympani and tensor veli palatini
Diagram of the mandibular nerve (V3) showing the inferior alveolar nerve, lingual nerve, buccal nerve, and chorda tympani connections in the infratemporal fossa
Fig. 8.152 - Mandibular Nerve [V3] with the lingual nerve, inferior alveolar nerve, and chorda tympani (Gray's Anatomy for Students)

Summary Comparison Table

FeatureFacial Nerve (CN VII)Maxillary Nerve (CN V2)Mandibular Nerve (CN V3)
Nerve typeMixed (motor + sensory + parasympathetic)Purely sensoryMixed (sensory + motor)
Exits skull viaStylomastoid foramenForamen rotundumForamen ovale
Motor functionMuscles of facial expression, stapedius, stylohyoid, posterior digastricNoneMuscles of mastication, tensor tympani, tensor veli palatini, mylohyoid, ant. belly of digastric
Sensory territoryAnterior 2/3 tongue (taste); small area of earCheek, lower eyelid, upper lip, upper teeth, palate, nasal cavityLower face, lower lip, anterior 2/3 tongue (general), lower teeth, temporal region
ParasympatheticTo lacrimal gland (via greater petrosal), submandibular + sublingual glands (via chorda tympani)None (carries postganglionic fibers FROM pterygopalatine ganglion)Carries parasympathetic to parotid (via auriculotemporal + otic ganglion, origin from CN IX)
Associated ganglionGeniculate ganglion (sensory), submandibular ganglion (parasympathetic)Pterygopalatine (sphenopalatine) ganglionOtic ganglion

Sources: Gray's Anatomy for Students; Scott-Brown's Otorhinolaryngology Head & Neck Surgery Vol. 2; Cummings Otolaryngology Head and Neck Surgery

Make a detailed branching diagram PDF I can reference during exams

Reading File
Running Command

ls -la /tmp/workspace/ 2>/dev/null || echo "workspace empty or not found"

Running Command

mkdir -p /tmp/workspace/nerve-diagram && python3 -c "import reportlab; print('reportlab ok')"

Writing File

~/nerve-diagram/generate_pdf.py

from reportlab.lib.pagesizes import A3, landscape
from reportlab.lib import colors
from reportlab.lib.units import mm
from reportlab.pdfgen import canvas
from reportlab.lib.colors import HexColor

OUTPUT = "/tmp/workspace/nerve-diagram/Cranial_Nerve_Branches_Reference.pdf"

# ── Colour palette ──────────────────────────────────────────────────────────
C_CN7   = HexColor("#1565C0")   # deep blue  – facial nerve
C_CN7L  = HexColor("#BBDEFB")   # light blue – facial boxes
C_CN7M  = HexColor("#1976D2")   # mid blue

C_CN5V2  = HexColor("#6A1B9A")  # deep purple – maxillary
C_CN5V2L = HexColor("#E1BEE7")

C_CN5V3  = HexColor("#2E7D32")  # deep green  – mandibular
C_CN5V3L = HexColor("#C8E6C9")

C_MOTOR  = HexColor("#E65100")  # orange – motor
C_SENS   = HexColor("#37474F")  # dark grey – sensory
C_PARA   = HexColor("#00838F")  # teal – parasympathetic
C_LINE   = HexColor("#757575")
C_BG     = HexColor("#FAFAFA")
C_TITLE  = HexColor("#212121")
C_HEAD   = HexColor("#ECEFF1")

PAGE_W, PAGE_H = landscape(A3)
MARGIN = 14*mm

# ── Canvas ───────────────────────────────────────────────────────────────────
c = canvas.Canvas(OUTPUT, pagesize=landscape(A3))
c.setTitle("Cranial Nerve Branching Diagram – CN VII, V2, V3")

def set_font(cv, name="Helvetica", size=8):
    cv.setFont(name, size)

def rounded_rect(cv, x, y, w, h, r=4, fill_color=None, stroke_color=C_LINE, lw=0.6):
    cv.setLineWidth(lw)
    if fill_color:
        cv.setFillColor(fill_color)
    if stroke_color:
        cv.setStrokeColor(stroke_color)
    cv.roundRect(x, y, w, h, r, stroke=1 if stroke_color else 0, fill=1 if fill_color else 0)

def draw_label(cv, x, y, w, h, lines, fill_color, text_color=C_TITLE, font_size=7.2, bold=False):
    rounded_rect(cv, x, y, w, h, r=3, fill_color=fill_color, stroke_color=C_LINE, lw=0.5)
    font = "Helvetica-Bold" if bold else "Helvetica"
    cv.setFillColor(text_color)
    total_h = len(lines) * (font_size + 1.5)
    ty = y + h/2 + total_h/2 - (font_size + 1.5)
    for line in lines:
        cv.setFont(font, font_size)
        cv.drawCentredString(x + w/2, ty, line)
        ty -= (font_size + 1.5)

def line(cv, x1, y1, x2, y2, color=C_LINE, lw=0.7):
    cv.setStrokeColor(color)
    cv.setLineWidth(lw)
    cv.line(x1, y1, x2, y2)

def arrow_line(cv, x1, y1, x2, y2, color=C_LINE, lw=0.7):
    line(cv, x1, y1, x2, y2, color, lw)
    # small arrowhead
    import math
    dx, dy = x2-x1, y2-y1
    length = math.sqrt(dx*dx+dy*dy)
    if length == 0: return
    ux, uy = dx/length, dy/length
    ax = x2 - 4*ux + 2*uy
    ay = y2 - 4*uy - 2*ux
    bx = x2 - 4*ux - 2*uy
    by = y2 - 4*uy + 2*ux
    cv.setFillColor(color)
    p = cv.beginPath()
    p.moveTo(x2, y2); p.lineTo(ax, ay); p.lineTo(bx, by); p.close()
    cv.drawPath(p, fill=1, stroke=0)

# ── Legend ────────────────────────────────────────────────────────────────────
def draw_legend(cv, x, y):
    items = [
        (C_MOTOR,   "Motor"),
        (C_SENS,    "Sensory"),
        (C_PARA,    "Parasympathetic"),
        (C_CN7L,    "CN VII – Facial"),
        (C_CN5V2L,  "CN V2 – Maxillary"),
        (C_CN5V3L,  "CN V3 – Mandibular"),
    ]
    cv.setFont("Helvetica-Bold", 7.5)
    cv.setFillColor(C_TITLE)
    cv.drawString(x, y+4, "LEGEND")
    yi = y - 5
    for col, label in items:
        rounded_rect(cv, x, yi, 12, 7, r=2, fill_color=col, stroke_color=C_LINE, lw=0.4)
        cv.setFillColor(C_TITLE)
        cv.setFont("Helvetica", 7)
        cv.drawString(x+14, yi+1.5, label)
        yi -= 11

# ═══════════════════════════════════════════════════════════════════════════════
# PAGE 1 – FACIAL NERVE (CN VII)
# ═══════════════════════════════════════════════════════════════════════════════
def page1(cv):
    cv.setFillColor(C_BG)
    cv.rect(0, 0, PAGE_W, PAGE_H, fill=1, stroke=0)

    # Title bar
    cv.setFillColor(C_CN7)
    cv.rect(0, PAGE_H-22*mm, PAGE_W, 22*mm, fill=1, stroke=0)
    cv.setFillColor(colors.white)
    cv.setFont("Helvetica-Bold", 16)
    cv.drawCentredString(PAGE_W/2, PAGE_H-13*mm, "FACIAL NERVE  (CN VII) – Complete Branching Diagram")
    cv.setFont("Helvetica", 8.5)
    cv.drawCentredString(PAGE_W/2, PAGE_H-19*mm, "Mixed nerve: Motor (BE) · Parasympathetic (GVE) · Taste (SA) · General sensory (GSA)")

    draw_legend(cv, PAGE_W-52*mm, PAGE_H-36*mm)

    # ── ROOT box ──────────────────────────────────────────────────────────────
    RW, RH = 72*mm, 16*mm
    RX = PAGE_W/2 - RW/2
    RY = PAGE_H - 50*mm
    draw_label(cv, RX, RY, RW, RH,
               ["CN VII  –  FACIAL NERVE",
                "Arises: pons-medulla junction",
                "Enters: Internal Acoustic Meatus (IAM)"],
               fill_color=C_CN7, text_color=colors.white, font_size=7.5, bold=True)

    # ── GENICULATE GANGLION ───────────────────────────────────────────────────
    GGW, GGH = 60*mm, 11*mm
    GGX = PAGE_W/2 - GGW/2
    GGY = RY - 22*mm
    arrow_line(cv, PAGE_W/2, RY, PAGE_W/2, GGY+GGH, C_CN7, 1.0)
    draw_label(cv, GGX, GGY, GGW, GGH,
               ["GENICULATE GANGLION", "(sensory cell bodies; in petrous temporal bone)"],
               fill_color=HexColor("#1E88E5"), text_color=colors.white, font_size=7.2, bold=True)

    # ── GREATER PETROSAL NERVE ────────────────────────────────────────────────
    GPX = 18*mm;  GPY = GGY - 30*mm
    GPW = 68*mm;  GPH = 22*mm
    line(cv, GGX, GGY+GGH/2, GPX+GPW, GGY+GGH/2, C_CN7, 0.8)
    arrow_line(cv, GPX+GPW, GGY+GGH/2, GPX+GPW, GPY+GPH, C_CN7, 0.8)
    draw_label(cv, GPX, GPY, GPW, GPH,
               ["GREATER PETROSAL NERVE",
                "Parasympathetic (GVE): to pterygopalatine ganglion",
                "→ Lacrimal gland secretomotor",
                "→ Nasal & palatal mucosal glands",
                "Taste: soft palate"],
               fill_color=HexColor("#B3E5FC"), text_color=C_TITLE, font_size=6.8)

    # ── NERVE TO STAPEDIUS ────────────────────────────────────────────────────
    NSX = PAGE_W/2 + 20*mm;  NSY = GGY - 22*mm
    NSW = 52*mm;  NSH = 9*mm
    line(cv, GGX+GGW, GGY+GGH/2, NSX, GGY+GGH/2, C_CN7, 0.8)
    arrow_line(cv, NSX, GGY+GGH/2, NSX, NSY+NSH, C_CN7, 0.8)
    draw_label(cv, NSX, NSY, NSW, NSH,
               ["NERVE TO STAPEDIUS  (Motor)", "Dampens loud sounds (middle ear)"],
               fill_color=C_CN7L, font_size=6.5)

    # ── CHORDA TYMPANI ────────────────────────────────────────────────────────
    CTX = PAGE_W/2 - 8*mm;  CTY = GGY - 46*mm
    CTW = 70*mm;  CTH = 22*mm
    line(cv, GGX+GGW/2, GGY, GGX+GGW/2, CTY+CTH, C_CN7M, 0.8)
    draw_label(cv, CTX, CTY, CTW, CTH,
               ["CHORDA TYMPANI",
                "Taste (SA): anterior 2/3 tongue",
                "Parasympathetic: to submandibular ganglion",
                "  → Submandibular & sublingual glands",
                "Travels via petrotympanic fissure → joins LINGUAL N. (V3)"],
               fill_color=HexColor("#B3E5FC"), text_color=C_TITLE, font_size=6.8)

    # ── STYLOMASTOID FORAMEN ──────────────────────────────────────────────────
    SFX = PAGE_W/2 - 40*mm;  SFY = GGY - 72*mm
    SFW = 80*mm;  SFH = 10*mm
    arrow_line(cv, PAGE_W/2, CTY, PAGE_W/2, SFY+SFH, C_CN7, 1.0)
    draw_label(cv, SFX, SFY, SFW, SFH,
               ["Exits skull: STYLOMASTOID FORAMEN"],
               fill_color=C_CN7, text_color=colors.white, font_size=7.5, bold=True)

    # ── POST-EXIT BRANCHES ────────────────────────────────────────────────────
    PEY = SFY - 18*mm
    post = [
        ("POSTERIOR\nAURICULAR N.", "Motor: occipitalis,\nauricular muscles\nSensory: auricle", 4*mm),
        ("NERVE TO\nPOSTERIOR DIGASTRIC", "Motor: post. belly\nof digastric", PAGE_W/2-38*mm),
        ("NERVE TO\nSTYLOHYOID", "Motor: stylohyoid\nmuscle", PAGE_W/2-18*mm),
    ]
    cx = 10*mm
    for name, desc, _ in post:
        bw, bh = 52*mm, 18*mm
        arrow_line(cv, PAGE_W/2, SFY, cx+bw/2, PEY+bh, C_CN7, 0.7)
        draw_label(cv, cx, PEY, bw, bh, [name, desc], fill_color=C_CN7L, font_size=6.3)
        cx += 56*mm

    # ── PAROTID GLAND / TERMINAL BRANCHES ────────────────────────────────────
    PGY = PEY - 20*mm
    PGX = PAGE_W/2 - 38*mm
    PGW, PGH = 76*mm, 10*mm
    arrow_line(cv, PAGE_W/2, PEY, PAGE_W/2, PGY+PGH, C_CN7, 1.0)
    draw_label(cv, PGX, PGY, PGW, PGH,
               ["PAROTID GLAND  (nerve divides into upper & lower trunks)"],
               fill_color=C_CN7, text_color=colors.white, font_size=7, bold=True)

    # Five terminal groups
    terminals = [
        ("TEMPORAL", ["Frontalis","Orbicularis oculi (upper)","Corrugator supercilii","Auricular muscles"], 0),
        ("ZYGOMATIC", ["Orbicularis oculi (lower)","Zygomaticus major & minor","Levator labii"], 1),
        ("BUCCAL", ["Buccinator","Orbicularis oris","Levator anguli oris","Nasalis"], 2),
        ("MARGINAL\nMANDIBULAR", ["Depressor anguli oris","Depressor labii","Mentalis","Lower orbicularis"], 3),
        ("CERVICAL", ["Platysma"], 4),
    ]
    TY = PGY - 34*mm
    n = len(terminals)
    total_w = PAGE_W - 2*MARGIN
    bw = (total_w - (n-1)*4*mm) / n
    bx = MARGIN
    for name, muscles, _ in terminals:
        bh = 28*mm
        arrow_line(cv, PGX+PGW/2, PGY, bx+bw/2, TY+bh, C_CN7M, 0.7)
        lines_ = [name] + muscles
        draw_label(cv, bx, TY, bw, bh, lines_, fill_color=C_CN7L, font_size=6.3, bold=False)
        bx += bw + 4*mm

    # Note at bottom
    cv.setFillColor(HexColor("#B71C1C"))
    cv.setFont("Helvetica-BoldOblique", 7.5)
    cv.drawCentredString(PAGE_W/2, 12*mm,
        "★  All five terminal groups are PURELY MOTOR  (facial nerve carries NO cutaneous sensation to the face – that is the trigeminal nerve)")

    # Footer
    cv.setFillColor(C_CN7)
    cv.rect(0, 0, PAGE_W, 8*mm, fill=1, stroke=0)
    cv.setFillColor(colors.white)
    cv.setFont("Helvetica", 6.5)
    cv.drawCentredString(PAGE_W/2, 2.5*mm, "Page 1 of 3  |  CN VII Facial Nerve  |  Orris Medical Reference")

page1(c)
c.showPage()

# ═══════════════════════════════════════════════════════════════════════════════
# PAGE 2 – MAXILLARY NERVE (CN V2)
# ═══════════════════════════════════════════════════════════════════════════════
def page2(cv):
    cv.setFillColor(C_BG)
    cv.rect(0, 0, PAGE_W, PAGE_H, fill=1, stroke=0)

    # Title bar
    cv.setFillColor(C_CN5V2)
    cv.rect(0, PAGE_H-22*mm, PAGE_W, 22*mm, fill=1, stroke=0)
    cv.setFillColor(colors.white)
    cv.setFont("Helvetica-Bold", 16)
    cv.drawCentredString(PAGE_W/2, PAGE_H-13*mm, "MAXILLARY NERVE  (CN V2) – Complete Branching Diagram")
    cv.setFont("Helvetica", 8.5)
    cv.drawCentredString(PAGE_W/2, PAGE_H-19*mm, "Purely SENSORY  ·  Division of Trigeminal Nerve (CN V)  ·  Exits: Foramen Rotundum → Pterygopalatine Fossa → Infraorbital Foramen")

    draw_legend(cv, PAGE_W-52*mm, PAGE_H-36*mm)

    # ── ROOT ──────────────────────────────────────────────────────────────────
    RW, RH = 80*mm, 16*mm
    RX = PAGE_W/2 - RW/2
    RY = PAGE_H - 50*mm
    draw_label(cv, RX, RY, RW, RH,
               ["MAXILLARY NERVE  [V2]",
                "Origin: Trigeminal ganglion (middle cranial fossa)",
                "Exits: Foramen ROTUNDUM → Pterygopalatine fossa"],
               fill_color=C_CN5V2, text_color=colors.white, font_size=7.5, bold=True)

    # ── MENINGEAL BRANCH ──────────────────────────────────────────────────────
    MBX = 12*mm;  MBY = RY - 22*mm
    MBW = 55*mm;  MBH = 10*mm
    line(cv, RX, RY+RH/2, MBX+MBW, RY+RH/2, C_CN5V2, 0.7)
    arrow_line(cv, MBX+MBW, RY+RH/2, MBX+MBW, MBY+MBH, C_CN5V2, 0.7)
    draw_label(cv, MBX, MBY, MBW, MBH,
               ["MENINGEAL BRANCH", "Sensory: dura of middle cranial fossa"],
               fill_color=C_CN5V2L, font_size=6.5)

    # ── PTERYGOPALATINE FOSSA ─────────────────────────────────────────────────
    PPX = PAGE_W/2 - 42*mm;  PPY = RY - 26*mm
    PPW = 84*mm;  PPH = 11*mm
    arrow_line(cv, PAGE_W/2, RY, PAGE_W/2, PPY+PPH, C_CN5V2, 1.0)
    draw_label(cv, PPX, PPY, PPW, PPH,
               ["In PTERYGOPALATINE FOSSA  (associated with pterygopalatine/sphenopalatine ganglion)"],
               fill_color=C_CN5V2, text_color=colors.white, font_size=7, bold=True)

    # ── Ganglionic branches ───────────────────────────────────────────────────
    GBX = 12*mm;  GBY = PPY - 34*mm
    GBW = 72*mm;  GBH = 28*mm
    line(cv, PPX, PPY+PPH/2, GBX+GBW, PPY+PPH/2, C_CN5V2, 0.7)
    arrow_line(cv, GBX+GBW, PPY+PPH/2, GBX+GBW, GBY+GBH, C_CN5V2, 0.7)
    draw_label(cv, GBX, GBY, GBW, GBH,
               ["GANGLIONIC (PTERYGOPALATINE) BRANCHES",
                "2 branches suspend pterygopalatine ganglion",
                "Ganglion receives GVE (parasympathetic) from:",
                "  Greater petrosal nerve (CN VII)",
                "Postganglionic fibers distributed via V2 to:",
                "  Lacrimal gland · nasal glands · palatal glands"],
               fill_color=C_CN5V2L, font_size=6.5)

    # ── Zygomatic nerve ───────────────────────────────────────────────────────
    ZNX = 96*mm;  ZNY = PPY - 26*mm
    ZNW = 58*mm;  ZNH = 14*mm
    line(cv, PPX+PPW/2, PPY, ZNX+ZNW/2, PPY, C_CN5V2, 0.7)
    arrow_line(cv, ZNX+ZNW/2, PPY, ZNX+ZNW/2, ZNY+ZNH, C_CN5V2, 0.7)
    draw_label(cv, ZNX, ZNY, ZNW, ZNH,
               ["ZYGOMATIC NERVE", "Runs in orbit; splits into 2 branches:"],
               fill_color=C_CN5V2L, font_size=6.8, bold=True)

    # Zygomatic sub-branches
    subz = [
        ("Zygomatico-\nTEMPORAL N.", ["Skin: temple", "Also carries secretomotor\nto lacrimal gland\n(from CN VII via V2)"]),
        ("Zygomatico-\nFACIAL N.", ["Skin: prominence\nof cheek (zygoma)"]),
    ]
    ZSY = ZNY - 24*mm
    zx = ZNX - 4*mm
    for name, desc in subz:
        bw2 = 32*mm;  bh2 = 20*mm
        arrow_line(cv, ZNX+ZNW/2, ZNY, zx+bw2/2, ZSY+bh2, C_CN5V2, 0.6)
        draw_label(cv, zx, ZSY, bw2, bh2, [name]+desc, fill_color=C_CN5V2L, font_size=6.2)
        zx += 34*mm

    # ── Superior alveolar nerves ───────────────────────────────────────────────
    SAX = 175*mm;  SAY = PPY - 38*mm
    SAW = 70*mm;   SAH = 32*mm
    line(cv, PPX+PPW, PPY+PPH/2, SAX, PPY+PPH/2, C_CN5V2, 0.7)
    arrow_line(cv, SAX, PPY+PPH/2, SAX, SAY+SAH, C_CN5V2, 0.7)
    draw_label(cv, SAX, SAY, SAW, SAH,
               ["SUPERIOR ALVEOLAR NERVES",
                "Form SUPERIOR DENTAL PLEXUS",
                "",
                "Posterior superior alveolar:",
                "  Upper molars + adjacent gingiva",
                "Middle superior alveolar:",
                "  Upper premolars",
                "Anterior superior alveolar (largest):",
                "  Incisors & canines + lateral nasal",
                "  wall, nasal septum, lower eyelid,",
                "  skin of upper lip"],
               fill_color=C_CN5V2L, font_size=6.2)

    # ── INFRAORBITAL N. (terminal) ─────────────────────────────────────────────
    IOY = PPY - 52*mm
    IOX = PAGE_W/2 - 34*mm
    IOW = 68*mm;  IOH = 14*mm
    arrow_line(cv, PAGE_W/2, PPY, PAGE_W/2, IOY+IOH, C_CN5V2, 1.0)
    draw_label(cv, IOX, IOY, IOW, IOH,
               ["INFRAORBITAL NERVE  (terminal branch)",
                "Exits via infraorbital foramen",
                "Sensory: cheek skin, mid-lateral nose, lower eyelid, upper lip mucosa"],
               fill_color=C_CN5V2, text_color=colors.white, font_size=6.8)

    # ── Palatine & nasal branches from ganglion ────────────────────────────────
    PNY = GBY - 32*mm
    branches_pn = [
        ("GREATER\nPALATINE N.", ["Hard palate mucosa"]),
        ("LESSER\nPALATINE N.", ["Soft palate,\ntonsil region"]),
        ("POSTERIOR SUP.\nLATERAL NASAL", ["Lateral nasal\ncavity wall"]),
        ("NASOPALATINE\nNERVE", ["Nasal septum;\nexits incisive\ncanal → mucosa\nbehind incisors"]),
        ("PHARYNGEAL\nBRANCH", ["Nasopharyngeal\nmucosa"]),
    ]
    total_pn = len(branches_pn)
    bwpn = (PAGE_W - 2*MARGIN - (total_pn-1)*3*mm) / total_pn
    bxpn = MARGIN
    for name, desc in branches_pn:
        bhpn = 28*mm
        arrow_line(cv, GBX+GBW/2, GBY, bxpn+bwpn/2, PNY+bhpn, C_CN5V2, 0.6)
        draw_label(cv, bxpn, PNY, bwpn, bhpn, [name]+desc, fill_color=C_CN5V2L, font_size=6.2)
        bxpn += bwpn + 3*mm

    # Footer
    cv.setFillColor(C_CN5V2)
    cv.rect(0, 0, PAGE_W, 8*mm, fill=1, stroke=0)
    cv.setFillColor(colors.white)
    cv.setFont("Helvetica", 6.5)
    cv.drawCentredString(PAGE_W/2, 2.5*mm, "Page 2 of 3  |  CN V2 Maxillary Nerve  |  Orris Medical Reference")

page2(c)
c.showPage()

# ═══════════════════════════════════════════════════════════════════════════════
# PAGE 3 – MANDIBULAR NERVE (CN V3)
# ═══════════════════════════════════════════════════════════════════════════════
def page3(cv):
    cv.setFillColor(C_BG)
    cv.rect(0, 0, PAGE_W, PAGE_H, fill=1, stroke=0)

    # Title bar
    cv.setFillColor(C_CN5V3)
    cv.rect(0, PAGE_H-22*mm, PAGE_W, 22*mm, fill=1, stroke=0)
    cv.setFillColor(colors.white)
    cv.setFont("Helvetica-Bold", 16)
    cv.drawCentredString(PAGE_W/2, PAGE_H-13*mm, "MANDIBULAR NERVE  (CN V3) – Complete Branching Diagram")
    cv.setFont("Helvetica", 8.5)
    cv.drawCentredString(PAGE_W/2, PAGE_H-19*mm,
        "MIXED nerve (only V division with MOTOR fibres)  ·  Exits: Foramen OVALE → Infratemporal Fossa")

    draw_legend(cv, PAGE_W-52*mm, PAGE_H-36*mm)

    # ── ROOT ──────────────────────────────────────────────────────────────────
    RW, RH = 88*mm, 18*mm
    RX = PAGE_W/2 - RW/2
    RY = PAGE_H - 52*mm
    draw_label(cv, RX, RY, RW, RH,
               ["MANDIBULAR NERVE  [V3]",
                "Sensory root: trigeminal ganglion",
                "Motor root: joins sensory part outside skull at foramen ovale",
                "Both parts enter infratemporal fossa"],
               fill_color=C_CN5V3, text_color=colors.white, font_size=7.2, bold=True)

    # Immediate branches
    IB_Y = RY - 22*mm
    imm = [
        ("MENINGEAL BRANCH", ["Re-enters skull via foramen spinosum", "Sensory: dura, middle cranial fossa", "Also: mastoid air cells"]),
        ("NERVE TO\nMEDIAL PTERYGOID", ["Motor: medial pterygoid", "Gives branches to:", "  • Tensor tympani", "  • Tensor veli palatini"]),
    ]
    ix = MARGIN
    for name, desc in imm:
        bw2 = 68*mm;  bh2 = 26*mm
        arrow_line(cv, RX+RW/2, RY, ix+bw2/2, IB_Y+bh2, C_CN5V3, 0.7)
        draw_label(cv, ix, IB_Y, bw2, bh2, [name]+desc, fill_color=C_CN5V3L, font_size=6.5)
        ix += bw2 + 8*mm

    # ── ANTERIOR TRUNK ────────────────────────────────────────────────────────
    AT_Y = IB_Y - 24*mm
    ATX = MARGIN
    ATW = (PAGE_W/2 - MARGIN - 6*mm)
    ATH = 10*mm
    line(cv, RX+RW*0.25, RY, ATX+ATW/2, RY, C_CN5V3, 0.9)
    arrow_line(cv, ATX+ATW/2, RY, ATX+ATW/2, AT_Y+ATH, C_CN5V3, 0.9)
    draw_label(cv, ATX, AT_Y, ATW, ATH,
               ["ANTERIOR TRUNK  (mostly MOTOR, one sensory)"],
               fill_color=C_CN5V3, text_color=colors.white, font_size=7.2, bold=True)

    # Anterior trunk branches
    ant_branches = [
        ("BUCCAL NERVE\n(mainly sensory)", ["Passes between heads of lateral pterygoid", "Sensory: skin & mucosa of cheek", "Buccal gingivae of lower molars"]),
        ("MASSETERIC\nNERVE  (motor)", ["Passes through mandibular notch", "Motor: MASSETER muscle"]),
        ("DEEP TEMPORAL\nNERVES  (motor)", ["Usually 2 nerves", "Curve around infratemporal crest", "Motor: TEMPORALIS (deep surface)"]),
        ("NERVE TO\nLATERAL PTERYGOID\n(motor)", ["Enters deep surface", "Motor: lateral pterygoid muscle"]),
    ]
    ABY = AT_Y - 32*mm
    n_ant = len(ant_branches)
    bwant = (ATW - (n_ant-1)*3*mm) / n_ant
    bxant = ATX
    for name, desc in ant_branches:
        bhant = 28*mm
        arrow_line(cv, ATX+ATW/2, AT_Y, bxant+bwant/2, ABY+bhant, C_CN5V3, 0.6)
        draw_label(cv, bxant, ABY, bwant, bhant, [name]+desc, fill_color=C_CN5V3L, font_size=6.0)
        bxant += bwant + 3*mm

    # ── POSTERIOR TRUNK ───────────────────────────────────────────────────────
    PT_Y = IB_Y - 24*mm
    PTX = PAGE_W/2 + 6*mm
    PTW = PAGE_W - MARGIN - PTX
    PTH = 10*mm
    line(cv, RX+RW*0.75, RY, PTX+PTW/2, RY, C_CN5V3, 0.9)
    arrow_line(cv, PTX+PTW/2, RY, PTX+PTW/2, PT_Y+PTH, C_CN5V3, 0.9)
    draw_label(cv, PTX, PT_Y, PTW, PTH,
               ["POSTERIOR TRUNK  (mostly SENSORY, one motor branch)"],
               fill_color=C_CN5V3, text_color=colors.white, font_size=7.2, bold=True)

    # Posterior trunk branches
    post_branches = [
        ("AURICULOTEMPORAL\nNERVE", [
            "Origin: 2 roots around middle meningeal a.",
            "Passes between TMJ & external ear",
            "Sensory: temple skin (main area),",
            "  ext. ear, ext. acoustic meatus,",
            "  tympanic membrane, TMJ",
            "Carries postganglionic parasympathetic",
            "  from OTIC GANGLION → PAROTID gland",
            "  (preganglionic origin: CN IX)"
        ]),
        ("LINGUAL NERVE", [
            "Joined by CHORDA TYMPANI (CN VII)",
            "in infratemporal fossa",
            "General sensation:",
            "  • Anterior 2/3 tongue",
            "  • Oral floor mucosa",
            "  • Lingual gingivae",
            "Via chorda tympani adds:",
            "  • TASTE ant. 2/3 tongue",
            "  • Parasympathetic →",
            "    submandibular ganglion →",
            "    submandibular & sublingual glands"
        ]),
        ("INFERIOR ALVEOLAR\nNERVE", [
            "Sensory: all lower teeth,",
            "  lower lip skin & mucosa, chin",
            "",
            "Branch: NERVE TO MYLOHYOID (motor)",
            "  → Mylohyoid + ant. belly digastric",
            "  (given off just before mandibular foramen)",
            "",
            "Enters mandibular canal",
            "Terminates as 2 branches:",
            "  • INCISIVE NERVE: lower front teeth",
            "  • MENTAL NERVE: exits mental foramen",
            "    → lower lip & chin skin"
        ]),
    ]
    PBY = PT_Y - 48*mm
    n_post = len(post_branches)
    bwpost = (PTW - (n_post-1)*3*mm) / n_post
    bxpost = PTX
    for name, desc in post_branches:
        bhpost = 44*mm
        arrow_line(cv, PTX+PTW/2, PT_Y, bxpost+bwpost/2, PBY+bhpost, C_CN5V3, 0.6)
        draw_label(cv, bxpost, PBY, bwpost, bhpost, [name]+desc, fill_color=C_CN5V3L, font_size=6.0)
        bxpost += bwpost + 3*mm

    # ── CLINICAL NOTES BOX ────────────────────────────────────────────────────
    CNY = 18*mm
    CNH = PBY - CNY - 4*mm
    CNW = PAGE_W - 2*MARGIN
    rounded_rect(cv, MARGIN, CNY, CNW, CNH, r=4,
                 fill_color=HexColor("#E8F5E9"),
                 stroke_color=C_CN5V3, lw=1.0)
    cv.setFillColor(C_CN5V3)
    cv.setFont("Helvetica-Bold", 7.5)
    cv.drawString(MARGIN+4*mm, CNY+CNH-6*mm, "KEY CLINICAL POINTS – CN V3")
    notes = [
        "• Inferior alveolar nerve block: anaesthetise entire lower jaw (dental procedures)",
        "• Lingual nerve injury (e.g. during wisdom tooth extraction) → loss of taste + general sensation anterior 2/3 tongue",
        "• Auriculotemporal nerve syndrome (Frey's syndrome): parotid surgery → aberrant regeneration → sweating instead of salivation on eating",
        "• V3 motor branch damage → jaw deviation TOWARD the paralysed side (lateral pterygoid weakness)",
        "• Tensor tympani (via nerve to medial pterygoid) and tensor veli palatini are both V3 motor – tested in middle ear physiology",
    ]
    ny = CNY + CNH - 14*mm
    for note in notes:
        cv.setFont("Helvetica", 6.5)
        cv.setFillColor(C_TITLE)
        cv.drawString(MARGIN+4*mm, ny, note)
        ny -= 8

    # Footer
    cv.setFillColor(C_CN5V3)
    cv.rect(0, 0, PAGE_W, 8*mm, fill=1, stroke=0)
    cv.setFillColor(colors.white)
    cv.setFont("Helvetica", 6.5)
    cv.drawCentredString(PAGE_W/2, 2.5*mm, "Page 3 of 3  |  CN V3 Mandibular Nerve  |  Orris Medical Reference")

page3(c)
c.showPage()
c.save()
print(f"PDF saved to: {OUTPUT}")
Running Command

python3 /tmp/workspace/nerve-diagram/generate_pdf.py

Running Command

ls -lh /tmp/workspace/nerve-diagram/

Your 3-page A3 landscape PDF is ready for download:

Cranial Nerve Branches Reference

PDF Document · PDF


Here's what's inside each page:
Page 1 - Facial Nerve (CN VII) - Blue theme
  • Full course: IAM → geniculate ganglion → stylomastoid foramen
  • All intrapetrous branches: Greater petrosal nerve, Nerve to stapedius, Chorda tympani (with their targets)
  • Post-exit branches: Posterior auricular, nerve to digastric, stylohyoid
  • All 5 terminal motor groups emerging from the parotid: Temporal, Zygomatic, Buccal, Marginal mandibular, Cervical - with muscles listed under each
  • Red warning note: "All 5 terminal groups are purely MOTOR"
Page 2 - Maxillary Nerve (CN V2) - Purple theme
  • Course: foramen rotundum → pterygopalatine fossa → infraorbital foramen
  • Ganglionic branches and the pterygopalatine ganglion connections
  • Zygomatic nerve → zygomaticotemporal + zygomaticofacial sub-branches
  • All 3 superior alveolar nerves with teeth they supply
  • Palatine branches (greater + lesser), all nasal branches, nasopalatine, pharyngeal
Page 3 - Mandibular Nerve (CN V3) - Green theme
  • Full anterior trunk: Buccal, Masseteric, Deep temporal (×2), Nerve to lateral pterygoid
  • Full posterior trunk: Auriculotemporal (with parotid parasympathetic detail), Lingual nerve (with chorda tympani connections), Inferior alveolar (with nerve to mylohyoid, mental nerve, incisive nerve)
  • Clinical notes box at the bottom: inferior alveolar block, lingual nerve injury, Frey's syndrome, jaw deviation in V3 palsy
This is a shared conversation. Sign in to Orris to start your own chat.