Give me all arterial supply of whole body for mbbs 1year exam

Reading File
Finding Sources
Finding Sources
Reading File
Reading File
Finding Sources
Finding Sources
Finding Sources
Finding Sources
Reading File
Reading File
Reading File
Finding Sources
I now have enough textbook data to compile a comprehensive answer. Let me provide the full arterial supply guide for MBBS Year 1.

Arterial Supply of the Whole Body - MBBS Year 1

Here is a complete, exam-oriented guide to the arterial supply of the entire body, organized by region, based on Gray's Anatomy for Students and the Thieme Atlas of Anatomy.

The Big Picture - The Aorta and Its Main Divisions

The aorta is the main arterial trunk. It has four parts:
PartLevelKey Branches
Ascending AortaFrom left ventricle to sternal angleRight and left coronary arteries
Arch of AortaBehind manubrium sterniBrachiocephalic trunk, L. common carotid, L. subclavian
Descending Thoracic AortaT4/5 to T12Posterior intercostals (3-11), subcostal, bronchial, oesophageal, pericardial, mediastinal
Abdominal AortaT12 to L4Celiac trunk, SMA, IMA, renals, suprarenal, gonads, phrenic, lumbars

1. HEAD AND NECK

Common Carotid Artery

  • Right: from Brachiocephalic trunk
  • Left: directly from Arch of Aorta
  • Divides at upper border of thyroid cartilage (C4 level) into:

External Carotid Artery (ECA) - supplies face, scalp, thyroid, pharynx

Branches (mnemonic: "Some Angry Lady Figured Out Pulses Must Stop Today"):
BranchSupply
Superior thyroid arteryThyroid gland (upper), larynx
Ascending pharyngeal arteryPharynx, meninges
Lingual arteryTongue, floor of mouth
Facial arteryFace (from chin to medial angle of eye)
Occipital arteryPosterior scalp
Posterior auricular arteryAuricle, scalp behind ear
Maxillary artery (terminal)Deep face, teeth, dura, palate, nose
Superficial temporal artery (terminal)Scalp, parotid region

Internal Carotid Artery (ICA) - supplies brain and orbit

  • No branches in neck
  • Enters carotid canal, passes through cavernous sinus
  • Branches: ophthalmic artery, anterior choroidal artery, posterior communicating artery
  • Terminates as: Anterior cerebral artery (ACA) + Middle cerebral artery (MCA)

Vertebral Artery (from 1st part of subclavian)

  • Ascends through foramina transversaria C6-C1
  • Passes through foramen magnum
  • Right + left vertebrals unite to form Basilar Artery
    • Basilar gives: anterior inferior cerebellar, superior cerebellar, posterior cerebral arteries

Circle of Willis

Connects ICA and vertebrobasilar systems:
  • Anterior communicating artery (connects two ACAs)
  • Anterior cerebral arteries (from ICA)
  • Middle cerebral arteries (from ICA)
  • Posterior communicating arteries (connect ICA to posterior cerebral)
  • Posterior cerebral arteries (from basilar)

2. UPPER LIMB

Subclavian Artery - Branches (mnemonic: "VIT C D")

Arises from brachiocephalic trunk (right) or arch of aorta directly (left). Divided into 3 parts by the anterior scalene muscle.
1st part branches (medial to anterior scalene):
BranchSupply
Vertebral arteryBrain, cervical spinal cord
Internal thoracic (mammary) arteryAnterior chest wall, breast, pericardium
Thyrocervical trunkThyroid (inferior thyroid a.), scapular muscles (transverse cervical, suprascapular a.)
2nd part branch (behind anterior scalene):
BranchSupply
Costocervical trunkPosterior intercostals 1-2, deep neck muscles
3rd part branch (lateral to anterior scalene):
BranchSupply
Dorsal scapular arteryRhomboids, levator scapulae

Axillary Artery (lateral border rib I to lower border pectoralis minor)

Divided into 3 parts by pectoralis minor:
PartBranchesSupply
1st part (medial to pec minor)Superior thoracic a.Upper chest wall
2nd part (behind pec minor)Thoracoacromial a., Lateral thoracic a.Pec muscles, deltoid, breast
3rd part (lateral to pec minor)Subscapular a. (subscapular, thoracodorsal, circumflex scapular), Anterior circumflex humeral a., Posterior circumflex humeral a.Scapular region, shoulder joint, deltoid
Mnemonic for axillary artery branches: "Send The Lord to Save A Patient" (Superior thoracic, Thoracoacromial, Lateral thoracic, Subscapular, Anterior circumflex humeral, Posterior circumflex humeral)

Brachial Artery (lower border pectoralis minor to cubital fossa)

  • Lies medial to biceps, crossed by median nerve
  • Profunda brachii (deep brachial a.) - winds around humerus in spiral groove with radial nerve; supplies posterior compartment; gives middle and radial collateral arteries
  • Superior and inferior ulnar collateral arteries
  • Divides at the neck of radius into radial and ulnar arteries

Radial Artery

  • Passes to anatomical snuffbox, enters palm via 1st dorsal interosseous
  • Deep palmar arch (mainly radial)
  • Princeps pollicis, radialis indicis arteries
  • Branches: radial recurrent (elbow anastomosis), dorsal carpal branch, palmar carpal branch

Ulnar Artery

  • Larger of two terminal branches
  • Passes with ulnar nerve in Guyon's canal
  • Superficial palmar arch (mainly ulnar)
  • Branches: anterior and posterior ulnar recurrent, common interosseous artery (divides into anterior and posterior interosseous), dorsal and palmar carpal branches
  • Common and proper palmar digital arteries from superficial palmar arch to fingers

3. THORAX

Coronary Arteries (from ascending aorta, aortic sinuses)

ArteryOriginMain Supply
Right coronary artery (RCA)Right aortic sinusSA node (~60%), AV node (~80-90%), right atrium and ventricle, posterior IV septum (as posterior descending artery)
Left coronary artery (LCA)Left aortic sinusDivides into:
- Anterior interventricular (LAD)LCAAnterior LV, anterior IV septum, apex, bundle branches
- Circumflex arteryLCALeft atrium, posterior-lateral LV, SA node (~40%)

Thoracic Aorta Branches

  • Posterior intercostal arteries (3rd-11th): ribs, intercostal muscles, spinal cord
  • Subcostal arteries: below 12th rib
  • Bronchial arteries (1-2 right, 2 left): lung parenchyma (nutritive)
  • Oesophageal arteries: lower oesophagus
  • Pericardial and mediastinal branches
  • Superior phrenic arteries: upper surface of diaphragm

Internal Thoracic Artery (from subclavian)

  • Gives anterior intercostal arteries (1st-6th spaces)
  • Musculophrenic artery (continues to intercostals 7-9)
  • Superior epigastric artery (anastomoses with inferior epigastric below)

4. ABDOMEN

Abdominal Aorta Branches - Classified by Type

Unpaired Anterior (Visceral) Branches:
ArteryVertebral LevelSupply (Gut Derivatives)
Celiac trunkT12/L1Foregut (lower oesophagus to mid-duodenum): liver, stomach, spleen, pancreas, gallbladder
Superior mesenteric artery (SMA)L1Midgut (mid-duodenum to 2/3 of transverse colon)
Inferior mesenteric artery (IMA)L3Hindgut (distal 1/3 transverse colon to upper rectum)
Celiac Trunk divides into:
  • Left gastric artery - lesser curvature of stomach, lower oesophagus
  • Common hepatic artery - gives hepatic artery proper (right and left hepatic), right gastric, gastroduodenal (superior pancreaticoduodenal, right gastroepiploic)
  • Splenic artery - left gastroepiploic, short gastric arteries, pancreatic branches
SMA Branches:
  • Inferior pancreaticoduodenal artery
  • Intestinal branches (jejunal and ileal arteries, 15-18 in number)
  • Ileocolic artery (cecum, appendix via appendicular artery, terminal ileum)
  • Right colic artery (ascending colon)
  • Middle colic artery (transverse colon)
IMA Branches:
  • Left colic artery (descending colon)
  • Sigmoid arteries (2-3 branches)
  • Superior rectal artery (upper rectum)
Paired Lateral (Visceral) Branches:
ArteryLevelSupply
Middle suprarenal arteriesL1Suprarenal gland (also supplied by superior suprarenal from inferior phrenic, inferior suprarenal from renal)
Renal arteriesL1-L2Kidneys; right is longer, passes behind IVC
Testicular/Ovarian arteriesL2Gonads
Paired Posterior (Parietal) Branches:
ArterySupply
Inferior phrenic arteries (paired, first branches)Under surface of diaphragm, suprarenal gland (superior suprarenal branch)
Lumbar arteries (4 pairs)Posterior abdominal wall, spinal cord
Median sacral arterySacrum and coccyx (unpaired, terminal)
Terminal Branches (at L4):
  • Right and Left Common Iliac arteries (each divide into Internal and External Iliac)

5. PELVIS

Internal Iliac Artery (Hypogastric Artery)

Divides into anterior and posterior trunks.
Anterior Division Branches (UMBILICAL VESICAL UTERINE VAGINAL OBTURATOR INTERNAL PUDENDAL INFERIOR GLUTEAL):
BranchSupply
Umbilical artery (medial umbilical ligament in adult)Superior vesical - upper bladder
Inferior vesical (males) / Vaginal (females)Lower bladder, prostate, seminal vesicles / vagina
Uterine arteryUterus, vagina, fallopian tube
Middle rectal arteryMiddle rectum
Obturator arteryMedial thigh (adductors), hip joint
Internal pudendal arteryExternal genitalia, anal canal, perineum
Inferior gluteal arteryGluteal region, posterior thigh
Posterior Division Branches:
BranchSupply
Iliolumbar arteryIliacus, psoas, quadratus lumborum
Lateral sacral arteriesSacral canal, dorsal sacrum
Superior gluteal arteryGluteal muscles (largest branch of internal iliac)

External Iliac Artery

  • Inferior epigastric artery (anastomoses with superior epigastric; forms lateral boundary of Hesselbach's triangle)
  • Deep circumflex iliac artery (anterior abdominal wall, iliac crest)
  • Becomes Femoral artery as it passes under inguinal ligament (midpoint of inguinal ligament)

6. LOWER LIMB

Femoral Artery (in femoral triangle, then adductor canal)

  • Profunda femoris (Deep femoral artery) - main supply to thigh; branches:
    • Medial circumflex femoral artery (femoral head - main supply via retinacular arteries)
    • Lateral circumflex femoral artery (3 branches: ascending, descending, transverse)
    • Perforating arteries (1st, 2nd, 3rd, 4th) - posterior thigh compartment
  • Superficial branches: superficial epigastric, superficial circumflex iliac, superficial external pudendal arteries
  • Descending genicular artery (before entering adductor hiatus)
  • Passes through adductor hiatus to become Popliteal artery

Popliteal Artery (behind knee in popliteal fossa)

  • Superior lateral and medial genicular arteries
  • Middle genicular artery (to ACL, PCL)
  • Inferior lateral and medial genicular arteries
  • These form the Genicular (peripatellar) anastomosis
  • Divides at lower border of popliteus into:
    • Anterior tibial artery
    • Posterior tibial artery (+ fibular/peroneal artery from upper part)

Anterior Tibial Artery

  • Enters anterior compartment through interosseous membrane
  • Descends on interosseous membrane with deep peroneal nerve
  • Becomes Dorsalis Pedis artery at ankle (palpated between EHL and EDL tendons)
  • Branches of dorsalis pedis: medial and lateral tarsal, arcuate artery (dorsal metatarsal arteries), deep plantar branch (completes plantar arch)

Posterior Tibial Artery

  • Descends in posterior compartment with tibial nerve
  • Fibular (Peroneal) artery - largest branch; supplies peroneal muscles, calcaneal branches
  • Medial calcaneal branches
  • Passes behind medial malleolus under flexor retinaculum
  • Divides into Medial plantar artery and Lateral plantar artery

Plantar Arteries

ArterySupply
Medial plantar arteryMedial sole, hallux
Lateral plantar arteryLateral sole; forms Deep plantar arch (with dorsal pedis)
  • Deep plantar arch gives plantar metatarsal arteriescommon and proper plantar digital arteries

7. KEY ANASTOMOSES (High-Yield for Exams)

AnastomosisArteries InvolvedImportance
Circle of WillisACA, MCA, PCA, communicating arteriesCerebral collateral circulation
Scapular anastomosisSuprascapular + circumflex scapular + dorsal scapularCollateral when subclavian/axillary blocked
Elbow anastomosisProfunda brachii (collaterals) + radial/ulnar recurrentCollateral when brachial artery tied
Palmar archesRadial + ulnar arteriesDual supply to hand
Epigastric anastomosisSuperior + inferior epigastric (internal thoracic/femoral)Collateral for aortic coarctation
Cruciate anastomosisMedial/lateral circumflex femoral + inferior gluteal + 1st perforatorCollateral for femoral artery
Genicular anastomosis5 genicular arteries + descending genicular + anterior recurrent tibialCollateral around knee
Marginal artery of DrummondSMA + IMA branchesContinuous along colon margin
Rectal anastomosisSuperior rectal (IMA) + middle rectal (internal iliac) + inferior rectal (pudendal)Anastomosis around rectum

8. SPINAL CORD BLOOD SUPPLY

ArteryOriginSupply
Anterior spinal arteryTwo vertebral arteries uniteAnterior 2/3 of cord (one vessel)
Posterior spinal arteries (paired)Vertebral or posterior inferior cerebellarPosterior 1/3 of cord
Radicular arteriesPosterior intercostals, lumbar, lateral sacralReinforce spinal arteries at each level
Artery of AdamkiewiczUsually T9-L2 (left side, 80%)Major reinforcement of anterior spinal artery in thoracolumbar region

Quick Memory Tips for Exams

  • ECA branches: "Some Angry Lady Found Our Parrot Mad Shaking" (Superior thyroid, Ascending pharyngeal, Lingual, Facial, Occipital, Posterior auricular, Maxillary, Superficial temporal)
  • Subclavian branches: VIT CD (Vertebral, Internal thoracic, Thyrocervical trunk, Costocervical trunk, Dorsal scapular)
  • Abdominal aorta unpaired branches: Celiac (T12), SMA (L1), IMA (L3) - "3 - 1 - 3" vertebral levels
  • Abdominal aorta paired branches: "I Rear Gut" - Inferior phrenic, Renal, Gonadal (testicular/ovarian)
  • Celiac trunk: "Left Hand Squeeze" - Left gastric, Hepatic common, Splenic
  • Profunda femoris supplies the thigh; Popliteal supplies the knee; Dorsalis pedis supplies dorsum of foot; Lateral plantar forms the plantar arch
Sources: Gray's Anatomy for Students (9780323934237); Thieme Atlas of Anatomy - General Anatomy and Musculoskeletal System (9781626237186)

Make it as mind map and 1, 2

Asking for Preferences
Reading File
Running Command

ls /home/daytona/workspace/ 2>/dev/null && mkdir -p /home/daytona/workspace/arterial-mindmaps

Create a mind map of arteries supply whole body along with glands etc..

And it should be memorable with images

Writing File

~/arterial-mindmaps/mindmap1.py

import matplotlib
matplotlib.use('Agg')
import matplotlib.pyplot as plt
import matplotlib.patches as mpatches
from matplotlib.patches import FancyBboxPatch, FancyArrowPatch
import numpy as np

fig, ax = plt.subplots(1, 1, figsize=(32, 24))
ax.set_xlim(0, 32)
ax.set_ylim(0, 24)
ax.axis('off')
fig.patch.set_facecolor('#0d1117')
ax.set_facecolor('#0d1117')

def draw_node(ax, x, y, text, color, text_color='white', fontsize=9, width=None, height=0.55, alpha=1.0, style='round,pad=0.15', zorder=5):
    if width is None:
        width = max(len(text) * 0.11 + 0.3, 1.2)
    box = FancyBboxPatch((x - width/2, y - height/2), width, height,
                          boxstyle=style, linewidth=0,
                          facecolor=color, alpha=alpha, zorder=zorder)
    ax.add_patch(box)
    ax.text(x, y, text, ha='center', va='center', fontsize=fontsize,
            color=text_color, fontweight='bold', zorder=zorder+1,
            fontfamily='DejaVu Sans')

def draw_line(ax, x1, y1, x2, y2, color='#ffffff', lw=1.5, alpha=0.5, style='-'):
    ax.plot([x1, x2], [y1, y2], color=color, lw=lw, alpha=alpha, linestyle=style, zorder=2)

def draw_curved_line(ax, x1, y1, x2, y2, color='#ffffff', lw=1.5, alpha=0.4):
    import matplotlib.patches as mpatches
    mid_x = (x1 + x2) / 2
    mid_y = (y1 + y2) / 2 + 0.3
    verts = [(x1, y1), (mid_x, mid_y), (x2, y2)]
    codes = [1, 3, 2]  # MOVETO, CURVE3, LINETO
    from matplotlib.path import Path
    path = Path([(x1,y1),(mid_x,mid_y),(x2,y2)], [Path.MOVETO, Path.CURVE3, Path.CURVE3])
    patch = mpatches.PathPatch(path, facecolor='none', edgecolor=color, lw=lw, alpha=alpha, zorder=2)
    ax.add_patch(patch)

# ===== TITLE =====
ax.text(16, 23.3, '🫀  ARTERIAL SUPPLY OF THE BODY  — PART 1', ha='center', va='center',
        fontsize=19, color='white', fontweight='bold',
        bbox=dict(boxstyle='round,pad=0.4', facecolor='#8B0000', edgecolor='#ff4444', lw=2))
ax.text(16, 22.7, 'HEAD & NECK  •  UPPER LIMB  •  THORAX  •  CORONARY ARTERIES', ha='center',
        fontsize=10, color='#ffcccc')

# ===== CENTRAL NODE =====
cx, cy = 16, 11.5
draw_node(ax, cx, cy, '🫀 AORTA', '#8B0000', 'white', fontsize=16, width=3.2, height=1.0, style='round,pad=0.3', zorder=10)
ax.text(cx, cy - 0.75, 'Main Arterial Trunk', ha='center', fontsize=7.5, color='#ffaaaa', zorder=11)

# =============================================
# SECTION 1: ARCH OF AORTA (top-left)
# =============================================
arch_x, arch_y = 8.5, 19.5
draw_node(ax, arch_x, arch_y, '🔄 ARCH OF AORTA', '#1a3a5c', 'white', fontsize=11, width=3.8, height=0.7)
draw_curved_line(ax, cx, cy+0.5, arch_x, arch_y-0.35, '#4fc3f7', lw=2.5, alpha=0.7)

# Branch 1: Brachiocephalic trunk
bct_x, bct_y = 4.0, 17.5
draw_node(ax, bct_x, bct_y, '① Brachiocephalic\nTrunk', '#1565c0', 'white', fontsize=8.5, width=3.2, height=0.8)
draw_line(ax, arch_x, arch_y-0.35, bct_x, bct_y+0.4, '#4fc3f7', lw=1.8, alpha=0.6)

# Sub-branches of Brachiocephalic
items_bct = [('R. Common Carotid', 2.2, 16.0), ('R. Subclavian A.', 5.0, 15.8)]
for txt, x, y in items_bct:
    draw_node(ax, x, y, txt, '#0d47a1', 'white', fontsize=7.5, width=2.8)
    draw_line(ax, bct_x, bct_y-0.4, x, y+0.27, '#90caf9', lw=1.3, alpha=0.6)

# Branch 2: L. Common Carotid
lcc_x, lcc_y = 8.5, 17.2
draw_node(ax, lcc_x, lcc_y, '② L. Common Carotid A.', '#1565c0', 'white', fontsize=8.5, width=3.5, height=0.65)
draw_line(ax, arch_x, arch_y-0.35, lcc_x, lcc_y+0.33, '#4fc3f7', lw=1.8, alpha=0.6)

# Branch 3: L. Subclavian
lsc_x, lsc_y = 12.5, 17.2
draw_node(ax, lsc_x, lsc_y, '③ L. Subclavian A.', '#1565c0', 'white', fontsize=8.5, width=3.0, height=0.65)
draw_line(ax, arch_x, arch_y-0.35, lsc_x, lsc_y+0.33, '#4fc3f7', lw=1.8, alpha=0.6)

# =============================================
# SECTION 2: CAROTID ARTERIES (left side)
# =============================================
carotid_x, carotid_y = 3.5, 21.5
draw_node(ax, carotid_x, carotid_y, '🧠 CAROTID ARTERIES', '#4a148c', 'white', fontsize=10.5, width=3.8, height=0.7)
draw_curved_line(ax, cx, cy+0.5, carotid_x, carotid_y-0.35, '#ce93d8', lw=2, alpha=0.6)

# ECA branches
eca_x, eca_y = 1.5, 20.0
draw_node(ax, eca_x, eca_y, 'ECA\n(External)', '#6a1b9a', 'white', fontsize=8, width=2.2, height=0.7)
draw_line(ax, carotid_x, carotid_y-0.35, eca_x, eca_y+0.35, '#ce93d8', lw=1.5, alpha=0.6)

eca_branches = [
    ('😮 Superior Thyroid → Thyroid, Larynx', 1.5, 19.0),
    ('↑ Ascending Pharyngeal → Pharynx', 1.5, 18.4),
    ('👅 Lingual → Tongue, Floor of mouth', 1.5, 17.8),
    ('😊 Facial → Face (chin to eye)', 1.5, 17.2),
    ('🔙 Occipital → Posterior scalp', 1.5, 16.6),
    ('👂 Post. Auricular → Ear, Scalp', 1.5, 16.0),
    ('💀 Maxillary → Deep face, Teeth, Palate', 1.5, 15.4),
    ('⛓ Superficial Temporal → Scalp, Temple', 1.5, 14.8),
]
for i, (txt, x, y) in enumerate(eca_branches):
    col = '#7b1fa2' if i % 2 == 0 else '#4a148c'
    draw_node(ax, x, y, txt, col, 'white', fontsize=6.5, width=4.5, height=0.45)
    draw_line(ax, eca_x, eca_y-0.35, x, y+0.22, '#e1bee7', lw=1.0, alpha=0.5)

# ICA
ica_x, ica_y = 5.5, 20.2
draw_node(ax, ica_x, ica_y, 'ICA\n(Internal)', '#880e4f', 'white', fontsize=8, width=2.2, height=0.7)
draw_line(ax, carotid_x, carotid_y-0.35, ica_x, ica_y+0.35, '#f48fb1', lw=1.5, alpha=0.6)

ica_branches = [
    ('👁 Ophthalmic A. → Eye, Orbit', 5.5, 19.2),
    ('🧠 ACA → Medial frontal lobe', 5.5, 18.6),
    ('🧠 MCA → Lateral cortex (largest)', 5.5, 18.0),
    ('🔗 Post. Communicating A.', 5.5, 17.4),
    ('💧 Anterior Choroidal A.', 5.5, 16.8),
]
for i, (txt, x, y) in enumerate(ica_branches):
    col = '#ad1457' if i % 2 == 0 else '#880e4f'
    draw_node(ax, x, y, txt, col, 'white', fontsize=6.5, width=3.8, height=0.45)
    draw_line(ax, ica_x, ica_y-0.35, x, y+0.22, '#f8bbd0', lw=1.0, alpha=0.5)

# =============================================
# SECTION 3: VERTEBRAL / CIRCLE OF WILLIS (top-center)
# =============================================
cow_x, cow_y = 16, 21.0
draw_node(ax, cow_x, cow_y, '🔵 CIRCLE OF WILLIS', '#004d40', 'white', fontsize=11, width=4.0, height=0.7)
draw_curved_line(ax, cx, cy+0.5, cow_x, cow_y-0.35, '#80cbc4', lw=2, alpha=0.6)

cow_branches = [
    ('🔄 Vertebral A. (from subclavian) × 2', 13.0, 20.0),
    ('🔽 Basilar A. (L+R vertebral)', 13.0, 19.4),
    ('🧠 PICA → Cerebellum, Medulla', 13.0, 18.8),
    ('🧠 AICA → Cerebellum', 13.0, 18.2),
    ('🧠 SCA → Superior cerebellum', 13.0, 17.6),
    ('🧠 PCA → Occipital lobe', 13.0, 17.0),
    ('🔗 Ant. Communicating A.', 19.0, 20.0),
    ('↔ Connects two ACAs', 19.0, 19.4),
    ('🔗 Post. Communicating A. ×2', 19.0, 18.8),
    ('↔ Connects ICA ↔ PCA', 19.0, 18.2),
]
for i, (txt, x, y) in enumerate(cow_branches):
    col = '#00695c' if i % 2 == 0 else '#004d40'
    draw_node(ax, x, y, txt, col, 'white', fontsize=6.5, width=4.0, height=0.45)
    draw_line(ax, cow_x, cow_y-0.35, x, y+0.22, '#b2dfdb', lw=1.0, alpha=0.5)

# =============================================
# SECTION 4: SUBCLAVIAN ARTERY (right-top)
# =============================================
sub_x, sub_y = 24, 21.0
draw_node(ax, sub_x, sub_y, '💪 SUBCLAVIAN A.', '#e65100', 'white', fontsize=11, width=3.8, height=0.7)
draw_curved_line(ax, cx, cy+0.5, sub_x, sub_y-0.35, '#ffb74d', lw=2, alpha=0.6)

ax.text(sub_x, sub_y-1.1, 'Mnemonic: VIT C D', ha='center', fontsize=7.5,
        color='#ffe0b2', style='italic',
        bbox=dict(boxstyle='round,pad=0.2', facecolor='#bf360c', alpha=0.7))

sub_branches = [
    ('🧠 V - Vertebral A. → Brain, Spinal cord', 21.5, 19.6),
    ('🫁 I - Internal Thoracic A. → Chest wall, Breast', 21.5, 19.0),
    ('🦋 T - Thyrocervical Trunk →', 21.5, 18.4),
    ('  ↳ Inferior thyroid (Thyroid gland)', 21.5, 17.8),
    ('  ↳ Suprascapular (Scapular muscles)', 21.5, 17.2),
    ('  ↳ Transverse cervical', 21.5, 16.6),
    ('💪 C - Costocervical Trunk → Intercostals 1-2', 26.5, 19.6),
    ('🔙 D - Dorsal Scapular A. → Rhomboids', 26.5, 19.0),
]
for i, (txt, x, y) in enumerate(sub_branches):
    col = '#e64a19' if i % 2 == 0 else '#bf360c'
    draw_node(ax, x, y, txt, col, 'white', fontsize=6.5, width=4.5, height=0.45)
    draw_line(ax, sub_x, sub_y-0.35, x, y+0.22, '#ffccbc', lw=1.0, alpha=0.5)

# =============================================
# SECTION 5: AXILLARY ARTERY (far right)
# =============================================
ax_x, ax_y = 28.5, 16.0
draw_node(ax, ax_x, ax_y, '🦾 AXILLARY A.', '#1b5e20', 'white', fontsize=10.5, width=3.2, height=0.7)
draw_curved_line(ax, cx, cy+0.5, ax_x, ax_y-0.35, '#a5d6a7', lw=2, alpha=0.6)

ax.text(ax_x, ax_y-1.0, '3 Parts by Pec Minor', ha='center', fontsize=7.5,
        color='#c8e6c9', style='italic',
        bbox=dict(boxstyle='round,pad=0.2', facecolor='#2e7d32', alpha=0.7))

axi_branches = [
    ('Part 1: Superior Thoracic A.', 27.5, 14.8),
    ('Part 2: Thoracoacromial A. → Pec, Deltoid', 27.5, 14.2),
    ('Part 2: Lateral Thoracic A. → Breast, Serratus', 27.5, 13.6),
    ('Part 3: Subscapular A.', 27.5, 13.0),
    ('  ↳ Thoracodorsal A. → Latissimus dorsi', 27.5, 12.4),
    ('  ↳ Circumflex Scapular A.', 27.5, 11.8),
    ('Part 3: Ant. Circumflex Humeral A.', 30.5, 14.8),
    ('Part 3: Post. Circumflex Humeral A.', 30.5, 14.2),
    ('  → Shoulder joint, Deltoid', 30.5, 13.6),
    ('⬇ Becomes Brachial A.', 30.5, 13.0),
]
for i, (txt, x, y) in enumerate(axi_branches):
    col = '#2e7d32' if i % 2 == 0 else '#1b5e20'
    draw_node(ax, x, y, txt, col, 'white', fontsize=6.3, width=4.0, height=0.45)
    draw_line(ax, ax_x, ax_y-0.35, x, y+0.22, '#c8e6c9', lw=1.0, alpha=0.5)

# =============================================
# SECTION 6: BRACHIAL → RADIAL / ULNAR (right-middle)
# =============================================
brach_x, brach_y = 24.5, 10.5
draw_node(ax, brach_x, brach_y, '💉 BRACHIAL A.', '#33691e', 'white', fontsize=10.5, width=3.0, height=0.7)
draw_curved_line(ax, cx, cy, brach_x, brach_y+0.35, '#aed581', lw=2, alpha=0.6)

brach_items = [
    ('🔽 Profunda Brachii → Posterior arm, Spiral groove', 22.0, 9.4),
    ('  ↳ Middle Collateral A.', 22.0, 8.8),
    ('  ↳ Radial Collateral A.', 22.0, 8.2),
    ('⬆ Superior Ulnar Collateral A.', 22.0, 7.6),
    ('⬇ Inferior Ulnar Collateral A.', 22.0, 7.0),
    ('↙ Radial A. (Thumb side)', 27.5, 9.4),
    ('  → Deep palmar arch (main)', 27.5, 8.8),
    ('  → Princeps pollicis (Thumb)', 27.5, 8.2),
    ('  → 1st dorsal interosseous', 27.5, 7.6),
    ('↘ Ulnar A. (Larger terminal)', 27.5, 7.0),
    ('  → Superficial palmar arch', 27.5, 6.4),
    ('  → Common interosseous A.', 27.5, 5.8),
    ('  ↳ Ant./Post. Interosseous', 27.5, 5.2),
    ('  → Digital arteries (Fingers)', 27.5, 4.6),
]
for i, (txt, x, y) in enumerate(brach_items):
    col = '#558b2f' if i % 2 == 0 else '#33691e'
    w = 4.8 if len(txt) > 25 else 3.8
    draw_node(ax, x, y, txt, col, 'white', fontsize=6.2, width=w, height=0.42)
    draw_line(ax, brach_x, brach_y-0.35, x, y+0.21, '#dcedc8', lw=1.0, alpha=0.4)

# =============================================
# SECTION 7: CORONARY ARTERIES (bottom-center)
# =============================================
cor_x, cor_y = 16, 8.0
draw_node(ax, cor_x, cor_y, '❤️ CORONARY ARTERIES', '#b71c1c', 'white', fontsize=11, width=4.2, height=0.7)
draw_curved_line(ax, cx, cy-0.5, cor_x, cor_y+0.35, '#ef9a9a', lw=2.5, alpha=0.7)
ax.text(cor_x, cor_y-1.0, 'From: Ascending Aorta (Aortic Sinuses)', ha='center', fontsize=7.5,
        color='#ffcdd2', style='italic')

rca_x, rca_y = 12.5, 6.5
draw_node(ax, rca_x, rca_y, '🔴 Right Coronary A. (RCA)', '#c62828', 'white', fontsize=8.5, width=3.8, height=0.65)
draw_line(ax, cor_x, cor_y-0.35, rca_x, rca_y+0.33, '#ef9a9a', lw=1.8, alpha=0.6)

rca_items = [
    ('SA Node A. (60%) → Sinus node', 11.0, 5.6),
    ('AV Node A. (80-90%) → AV node', 11.0, 5.0),
    ('R. Marginal A. → Right ventricle', 11.0, 4.4),
    ('Post. Desc. A. (PDA) → Posterior septum', 11.0, 3.8),
    ('Posterior Interventricular A.', 11.0, 3.2),
]
for i, (txt, x, y) in enumerate(rca_items):
    col = '#d32f2f' if i % 2 == 0 else '#b71c1c'
    draw_node(ax, x, y, txt, col, 'white', fontsize=6.5, width=4.2, height=0.42)
    draw_line(ax, rca_x, rca_y-0.33, x, y+0.21, '#ffcdd2', lw=1.0, alpha=0.5)

lca_x, lca_y = 19.5, 6.5
draw_node(ax, lca_x, lca_y, '🔵 Left Coronary A. (LCA)', '#1565c0', 'white', fontsize=8.5, width=3.8, height=0.65)
draw_line(ax, cor_x, cor_y-0.35, lca_x, lca_y+0.33, '#90caf9', lw=1.8, alpha=0.6)

lca_items = [
    ('LAD (Ant. Interventricular A.):', 18.0, 5.6),
    ('  → Ant. LV, Apex, Bundle branches', 18.0, 5.0),
    ('  → Ant. 2/3 IV Septum', 18.0, 4.4),
    ('  → Diagonal branches', 18.0, 3.8),
    ('Circumflex A.:', 21.5, 5.6),
    ('  → L. Atrium, Post-lateral LV', 21.5, 5.0),
    ('  → SA Node A. (40%)', 21.5, 4.4),
    ('  → Obtuse marginal A.', 21.5, 3.8),
]
for i, (txt, x, y) in enumerate(lca_items):
    col = '#1976d2' if i % 2 == 0 else '#1565c0'
    draw_node(ax, x, y, txt, col, 'white', fontsize=6.3, width=4.0, height=0.42)
    draw_line(ax, lca_x, lca_y-0.33, x, y+0.21, '#bbdefb', lw=1.0, alpha=0.5)

# =============================================
# SECTION 8: THORACIC AORTA (bottom-left)
# =============================================
thor_x, thor_y = 7.5, 9.0
draw_node(ax, thor_x, thor_y, '🫁 THORACIC AORTA', '#4e342e', 'white', fontsize=10.5, width=3.5, height=0.7)
draw_curved_line(ax, cx, cy-0.5, thor_x, thor_y+0.35, '#a1887f', lw=2, alpha=0.6)

thor_branches = [
    ('🦴 Post. Intercostals 3-11 → Ribs, Muscles, SC', 5.5, 7.8),
    ('🔽 Subcostal A. → Below 12th rib', 5.5, 7.2),
    ('🫁 Bronchial A. (1R, 2L) → Lung nutrition', 5.5, 6.6),
    ('🍽 Oesophageal A. → Lower oesophagus', 5.5, 6.0),
    ('❤️ Pericardial branches → Pericardium', 5.5, 5.4),
    ('⬆ Superior Phrenic A. → Diaphragm (top)', 5.5, 4.8),
    ('🏠 Internal Thoracic A. → Ant. intercostals 1-6', 9.5, 7.8),
    ('  ↳ Musculophrenic A. → Intercostals 7-9', 9.5, 7.2),
    ('  ↳ Superior Epigastric A. → Upper ant. wall', 9.5, 6.6),
]
for i, (txt, x, y) in enumerate(thor_branches):
    col = '#5d4037' if i % 2 == 0 else '#4e342e'
    draw_node(ax, x, y, txt, col, 'white', fontsize=6.3, width=4.8, height=0.42)
    draw_line(ax, thor_x, thor_y-0.35, x, y+0.21, '#d7ccc8', lw=1.0, alpha=0.5)

# =============================================
# LEGEND
# =============================================
legend_items = [
    ('#4a148c', '🧠 Head & Brain'),
    ('#e65100', '💪 Subclavian/Neck'),
    ('#1b5e20', '🦾 Upper Limb'),
    ('#b71c1c', '❤️ Coronary'),
    ('#4e342e', '🫁 Thorax'),
    ('#004d40', '🔵 Circle of Willis'),
]
lx, ly = 0.3, 3.0
ax.text(lx + 1.2, ly + 0.5, 'LEGEND', ha='center', fontsize=8, color='white', fontweight='bold')
for i, (col, label) in enumerate(legend_items):
    draw_node(ax, lx + 1.2, ly - i*0.55, label, col, 'white', fontsize=7, width=3.0, height=0.42)

# Footer
ax.text(16, 0.3, 'Part 1 of 2  |  Gray\'s Anatomy for Students  |  MBBS Year 1 Anatomy',
        ha='center', fontsize=8, color='#666666', style='italic')

plt.tight_layout()
plt.savefig('/home/daytona/workspace/arterial-mindmaps/arterial_mindmap_part1.png',
            dpi=180, bbox_inches='tight', facecolor='#0d1117')
print("Part 1 saved!")
Running Command

cd /home/daytona/workspace/arterial-mindmaps && python mindmap1.py 2>&1

Writing File

~/arterial-mindmaps/mindmap2.py

import matplotlib
matplotlib.use('Agg')
import matplotlib.pyplot as plt
import matplotlib.patches as mpatches
from matplotlib.patches import FancyBboxPatch
from matplotlib.path import Path
import numpy as np

fig, ax = plt.subplots(1, 1, figsize=(34, 26))
ax.set_xlim(0, 34)
ax.set_ylim(0, 26)
ax.axis('off')
fig.patch.set_facecolor('#0d1117')
ax.set_facecolor('#0d1117')

def draw_node(ax, x, y, text, color, text_color='white', fontsize=9, width=None, height=0.55, alpha=1.0, zorder=5):
    if width is None:
        width = max(len(text) * 0.10 + 0.3, 1.2)
    box = FancyBboxPatch((x - width/2, y - height/2), width, height,
                          boxstyle='round,pad=0.12', linewidth=0,
                          facecolor=color, alpha=alpha, zorder=zorder)
    ax.add_patch(box)
    ax.text(x, y, text, ha='center', va='center', fontsize=fontsize,
            color=text_color, fontweight='bold', zorder=zorder+1)

def draw_line(ax, x1, y1, x2, y2, color='#aaaaaa', lw=1.5, alpha=0.5):
    ax.plot([x1, x2], [y1, y2], color=color, lw=lw, alpha=alpha, zorder=2)

def draw_curved(ax, x1, y1, x2, y2, color='#aaaaaa', lw=1.8, alpha=0.5):
    mx = (x1+x2)/2
    my = (y1+y2)/2 + 0.25
    path = Path([(x1,y1),(mx,my),(x2,y2)],
                [Path.MOVETO, Path.CURVE3, Path.CURVE3])
    patch = mpatches.PathPatch(path, facecolor='none', edgecolor=color, lw=lw, alpha=alpha, zorder=2)
    ax.add_patch(patch)

# ========== TITLE ==========
ax.text(17, 25.4, 'ARTERIAL SUPPLY OF THE BODY -- PART 2', ha='center',
        fontsize=19, color='white', fontweight='bold',
        bbox=dict(boxstyle='round,pad=0.4', facecolor='#8B0000', edgecolor='#ff4444', lw=2))
ax.text(17, 24.75, 'ABDOMEN  *  PELVIS  *  LOWER LIMB  *  GLANDS  *  KEY ANASTOMOSES',
        ha='center', fontsize=10, color='#ffcccc')

# ========== CENTRAL NODE ==========
cx, cy = 17, 13.0
draw_node(ax, cx, cy, 'ABDOMINAL AORTA', '#8B0000', 'white', fontsize=15, width=4.0, height=1.0, zorder=10)
ax.text(cx, cy-0.75, 'T12 --> L4 | Bifurcates into Common Iliacs', ha='center', fontsize=7.5, color='#ffaaaa', zorder=11)

# =============================================
# SECTION 1: CELIAC TRUNK (top-left)
# =============================================
cel_x, cel_y = 5.5, 21.5
draw_node(ax, cel_x, cel_y, 'CELIAC TRUNK  T12/L1', '#4a148c', 'white', fontsize=11, width=4.2, height=0.72)
draw_curved(ax, cx, cy+0.5, cel_x, cel_y-0.36, '#ce93d8', lw=2.5, alpha=0.7)
ax.text(cel_x, cel_y-1.1, 'Supplies FOREGUT', ha='center', fontsize=7.5,
        color='#e1bee7', style='italic',
        bbox=dict(boxstyle='round,pad=0.2', facecolor='#6a1b9a', alpha=0.7))

# Celiac branches
cel_branches = [
    # Left Gastric
    ('Left Gastric A.', 2.5, 20.2, '#6a1b9a'),
    ('  -> Lesser curvature stomach', 2.5, 19.6, '#4a148c'),
    ('  -> Lower oesophagus', 2.5, 19.0, '#4a148c'),
    # Common Hepatic
    ('Common Hepatic A.', 5.5, 20.2, '#7b1fa2'),
    ('  -> Hepatic Proper (R+L hepatic)', 5.5, 19.6, '#6a1b9a'),
    ('  -> Right Gastric A.', 5.5, 19.0, '#6a1b9a'),
    ('  -> Gastroduodenal A.', 5.5, 18.4, '#6a1b9a'),
    ('     -> Sup. Pancreaticoduodenal', 5.5, 17.8, '#4a148c'),
    ('     -> R. Gastroepiploic A.', 5.5, 17.2, '#4a148c'),
    # Splenic
    ('Splenic A. (tortuous)', 8.5, 20.2, '#6a1b9a'),
    ('  -> Short Gastric (fundus)', 8.5, 19.6, '#4a148c'),
    ('  -> L. Gastroepiploic A.', 8.5, 19.0, '#4a148c'),
    ('  -> Pancreatic branches', 8.5, 18.4, '#4a148c'),
]
for txt, x, y, col in cel_branches:
    draw_node(ax, x, y, txt, col, 'white', fontsize=6.3, width=3.8, height=0.42)
    draw_line(ax, cel_x, cel_y-0.36, x, y+0.21, '#ce93d8', lw=0.9, alpha=0.5)

# =============================================
# SECTION 2: SMA (top-center)
# =============================================
sma_x, sma_y = 14.5, 22.0
draw_node(ax, sma_x, sma_y, 'SUP. MESENTERIC A. (SMA)  L1', '#01579b', 'white', fontsize=11, width=5.0, height=0.72)
draw_curved(ax, cx, cy+0.5, sma_x, sma_y-0.36, '#4fc3f7', lw=2.5, alpha=0.7)
ax.text(sma_x, sma_y-1.1, 'Supplies MIDGUT (mid-duodenum to 2/3 transverse colon)',
        ha='center', fontsize=7, color='#b3e5fc', style='italic',
        bbox=dict(boxstyle='round,pad=0.2', facecolor='#0277bd', alpha=0.7))

sma_items = [
    ('Inf. Pancreaticoduodenal A.', 12.0, 20.6),
    ('Jejunal branches (15-18)', 12.0, 20.0),
    ('Ileal branches', 12.0, 19.4),
    ('Ileocolic A.', 12.0, 18.8),
    ('  -> Appendicular A. (Appendix)', 12.0, 18.2),
    ('  -> Caecal branches', 12.0, 17.6),
    ('Right Colic A. -> Ascending colon', 17.0, 20.6),
    ('Middle Colic A. -> Transverse colon', 17.0, 20.0),
    ('(Anastomoses via Marginal A.)', 17.0, 19.4),
]
for i, (txt, x, y) in enumerate(sma_items):
    col = '#0288d1' if i % 2 == 0 else '#01579b'
    draw_node(ax, x, y, txt, col, 'white', fontsize=6.3, width=4.2, height=0.42)
    draw_line(ax, sma_x, sma_y-0.36, x, y+0.21, '#81d4fa', lw=0.9, alpha=0.5)

# =============================================
# SECTION 3: IMA (top-right)
# =============================================
ima_x, ima_y = 23.5, 21.5
draw_node(ax, ima_x, ima_y, 'INF. MESENTERIC A. (IMA)  L3', '#004d40', 'white', fontsize=11, width=5.0, height=0.72)
draw_curved(ax, cx, cy+0.5, ima_x, ima_y-0.36, '#80cbc4', lw=2.5, alpha=0.7)
ax.text(ima_x, ima_y-1.1, 'Supplies HINDGUT (distal 1/3 transverse colon -> upper rectum)',
        ha='center', fontsize=7, color='#b2dfdb', style='italic',
        bbox=dict(boxstyle='round,pad=0.2', facecolor='#00695c', alpha=0.7))

ima_items = [
    ('Left Colic A. -> Descending colon', 21.5, 20.0),
    ('Sigmoid Arteries (2-3) -> Sigmoid colon', 21.5, 19.4),
    ('Superior Rectal A. -> Upper rectum', 21.5, 18.8),
    ('  (Anastomoses with Middle Rectal)', 21.5, 18.2),
    ('Marginal A. of Drummond', 26.0, 20.0),
    ('  (SMA + IMA anastomosis)', 26.0, 19.4),
    ('  -> Continuous along colon', 26.0, 18.8),
]
for i, (txt, x, y) in enumerate(ima_items):
    col = '#00796b' if i % 2 == 0 else '#004d40'
    draw_node(ax, x, y, txt, col, 'white', fontsize=6.3, width=4.2, height=0.42)
    draw_line(ax, ima_x, ima_y-0.36, x, y+0.21, '#b2dfdb', lw=0.9, alpha=0.5)

# =============================================
# SECTION 4: PAIRED VISCERAL + GLANDS (right-upper)
# =============================================
gland_x, gland_y = 30.0, 18.5
draw_node(ax, gland_x, gland_y, 'GLANDS & PAIRED\nVISCERAL BRANCHES', '#e65100', 'white', fontsize=9.5, width=4.0, height=0.85)
draw_curved(ax, cx, cy+0.5, gland_x, gland_y-0.43, '#ffb74d', lw=2.5, alpha=0.7)

gland_items = [
    # Suprarenal
    ('SUPRARENAL GLAND - Triple supply:', 30.0, 17.4, '#bf360c'),
    ('  Sup. Suprarenal A. (from Inf. Phrenic)', 30.0, 16.8, '#e64a19'),
    ('  Middle Suprarenal A. (from Aorta L1)', 30.0, 16.2, '#e64a19'),
    ('  Inf. Suprarenal A. (from Renal A.)', 30.0, 15.6, '#e64a19'),
    # Kidneys
    ('KIDNEYS - Renal Arteries (L1-L2):', 30.0, 15.0, '#bf360c'),
    ('  R. Renal A. (longer, behind IVC)', 30.0, 14.4, '#e64a19'),
    ('  L. Renal A. (shorter)', 30.0, 13.8, '#e64a19'),
    ('  5 Segmental branches (no anastomosis!)', 30.0, 13.2, '#e64a19'),
    # Gonads
    ('GONADS - Testicular/Ovarian A. (L2):', 30.0, 12.6, '#bf360c'),
    ('  Descend on psoas major', 30.0, 12.0, '#e64a19'),
    ('  Testicular -> via inguinal canal', 30.0, 11.4, '#e64a19'),
    ('  Ovarian -> cross pelvic brim', 30.0, 10.8, '#e64a19'),
    # Thyroid
    ('THYROID GLAND:', 30.0, 10.2, '#bf360c'),
    ('  Sup. Thyroid A. (from ECA)', 30.0, 9.6, '#e64a19'),
    ('  Inf. Thyroid A. (Thyrocervical trunk)', 30.0, 9.0, '#e64a19'),
    ('  Thyroid Ima A. (variable, from Brachioceph.)', 30.0, 8.4, '#e64a19'),
]
for txt, x, y, col in gland_items:
    draw_node(ax, x, y, txt, col, 'white', fontsize=6.2, width=5.0, height=0.42)
    draw_line(ax, gland_x, gland_y-0.43, x, y+0.21, '#ffccbc', lw=0.8, alpha=0.4)

# =============================================
# SECTION 5: POSTERIOR BRANCHES OF ABDOMINAL AORTA
# =============================================
post_x, post_y = 17, 18.8
draw_node(ax, post_x, post_y, 'PARIETAL (POSTERIOR) BRANCHES', '#37474f', 'white', fontsize=10, width=4.8, height=0.65)
draw_line(ax, cx, cy+0.5, post_x, post_y-0.33, '#90a4ae', lw=2, alpha=0.6)

post_items = [
    ('Inf. Phrenic A. (paired) - 1st branches', 14.5, 17.8),
    ('  -> Lower diaphragm surface', 14.5, 17.2),
    ('  -> Sup. Suprarenal branch', 14.5, 16.6),
    ('Lumbar A. (4 pairs L1-L4)', 19.5, 17.8),
    ('  -> Posterior abdominal wall', 19.5, 17.2),
    ('  -> Spinal cord via dorsal branches', 19.5, 16.6),
    ('Median Sacral A. (unpaired, terminal)', 17.0, 16.0),
]
for i, (txt, x, y) in enumerate(post_items):
    col = '#455a64' if i % 2 == 0 else '#37474f'
    draw_node(ax, x, y, txt, col, 'white', fontsize=6.3, width=4.2, height=0.42)
    draw_line(ax, post_x, post_y-0.33, x, y+0.21, '#cfd8dc', lw=0.9, alpha=0.5)

# =============================================
# SECTION 6: ILIAC ARTERIES + PELVIS (bottom-left)
# =============================================
iliac_x, iliac_y = 7.0, 10.5
draw_node(ax, iliac_x, iliac_y, 'ILIAC ARTERIES  (L4)', '#1a237e', 'white', fontsize=11, width=3.8, height=0.72)
draw_curved(ax, cx, cy-0.5, iliac_x, iliac_y+0.36, '#7986cb', lw=2.5, alpha=0.7)
ax.text(iliac_x, iliac_y-1.05, 'Common Iliac -> Internal + External',
        ha='center', fontsize=7, color='#c5cae9', style='italic',
        bbox=dict(boxstyle='round,pad=0.2', facecolor='#283593', alpha=0.7))

# Internal Iliac
iia_x, iia_y = 4.0, 8.8
draw_node(ax, iia_x, iia_y, 'INTERNAL ILIAC A.\n(Hypogastric)', '#283593', 'white', fontsize=8.5, width=3.2, height=0.75)
draw_line(ax, iliac_x, iliac_y-0.36, iia_x, iia_y+0.38, '#7986cb', lw=1.8, alpha=0.6)

ant_div = [
    ('ANTERIOR DIVISION:', 2.5, 7.7, '#1a237e'),
    ('  Umbilical A. -> Sup. Vesical (Bladder)', 2.5, 7.1, '#283593'),
    ('  Inf. Vesical / Vaginal A.', 2.5, 6.5, '#283593'),
    ('  Uterine A. -> Uterus, Vagina, Tube', 2.5, 5.9, '#283593'),
    ('  Middle Rectal A.', 2.5, 5.3, '#283593'),
    ('  Obturator A. -> Medial thigh, Hip jt', 2.5, 4.7, '#283593'),
    ('  Internal Pudendal A. -> Genitalia, Anus', 2.5, 4.1, '#283593'),
    ('  Inferior Gluteal A.', 2.5, 3.5, '#1a237e'),
]
post_div = [
    ('POSTERIOR DIVISION:', 5.5, 7.7, '#0d47a1'),
    ('  Iliolumbar A. -> Iliacus, Psoas', 5.5, 7.1, '#1565c0'),
    ('  Lateral Sacral A. -> Sacral canal', 5.5, 6.5, '#1565c0'),
    ('  Superior Gluteal A. -> Gluteal mm', 5.5, 5.9, '#1565c0'),
    ('  (Largest branch of Int. Iliac!)', 5.5, 5.3, '#0d47a1'),
]
for txt, x, y, col in ant_div + post_div:
    draw_node(ax, x, y, txt, col, 'white', fontsize=6.2, width=3.8, height=0.42)
    draw_line(ax, iia_x, iia_y-0.38, x, y+0.21, '#9fa8da', lw=0.8, alpha=0.5)

# External Iliac
eia_x, eia_y = 9.5, 8.8
draw_node(ax, eia_x, eia_y, 'EXTERNAL ILIAC A.', '#1b5e20', 'white', fontsize=9, width=3.0, height=0.65)
draw_line(ax, iliac_x, iliac_y-0.36, eia_x, eia_y+0.33, '#7986cb', lw=1.8, alpha=0.6)

eia_items = [
    ('Inf. Epigastric A.', 8.5, 7.7),
    ('  -> Lateral border Hesselbach tri.', 8.5, 7.1),
    ('  -> Anastomoses Sup. Epigastric', 8.5, 6.5),
    ('Deep Circumflex Iliac A.', 10.8, 7.7),
    ('  -> Ant. abdominal wall', 10.8, 7.1),
    ('  -> Iliac crest muscles', 10.8, 6.5),
    ('Becomes FEMORAL A.', 9.5, 5.9),
    ('  (at midpoint inguinal ligament)', 9.5, 5.3),
]
for i, (txt, x, y) in enumerate(eia_items):
    col = '#2e7d32' if i % 2 == 0 else '#1b5e20'
    draw_node(ax, x, y, txt, col, 'white', fontsize=6.2, width=3.8, height=0.42)
    draw_line(ax, eia_x, eia_y-0.33, x, y+0.21, '#a5d6a7', lw=0.8, alpha=0.5)

# =============================================
# SECTION 7: LOWER LIMB (bottom-center + right)
# =============================================
ll_x, ll_y = 17, 9.5
draw_node(ax, ll_x, ll_y, 'LOWER LIMB ARTERIES', '#33691e', 'white', fontsize=11, width=4.2, height=0.72)
draw_curved(ax, cx, cy-0.5, ll_x, ll_y+0.36, '#aed581', lw=2.5, alpha=0.7)

# Femoral
fem_x, fem_y = 14.0, 7.8
draw_node(ax, fem_x, fem_y, 'FEMORAL A.', '#558b2f', 'white', fontsize=9.5, width=2.8, height=0.65)
draw_line(ax, ll_x, ll_y-0.36, fem_x, fem_y+0.33, '#aed581', lw=1.8, alpha=0.6)

fem_items = [
    ('Profunda Femoris (Deep Femoral A.)', 12.0, 6.8),
    ('  Medial Circumflex Femoral A.', 12.0, 6.2),
    ('    -> Femoral head (main supply!)', 12.0, 5.6),
    ('  Lateral Circumflex Femoral A.', 12.0, 5.0),
    ('    -> Ascending, Descending, Transverse br', 12.0, 4.4),
    ('  Perforating A. x4 -> Post. thigh', 12.0, 3.8),
    ('Superficial branches (epigastric, pudendal)', 16.5, 6.8),
    ('Descending Genicular A.', 16.5, 6.2),
    ('-> Popliteal A. (thru adductor hiatus)', 16.5, 5.6),
]
for i, (txt, x, y) in enumerate(fem_items):
    col = '#689f38' if i % 2 == 0 else '#558b2f'
    draw_node(ax, x, y, txt, col, 'white', fontsize=6.2, width=4.4, height=0.42)
    draw_line(ax, fem_x, fem_y-0.33, x, y+0.21, '#dcedc8', lw=0.8, alpha=0.5)

# Popliteal
pop_x, pop_y = 20.0, 7.8
draw_node(ax, pop_x, pop_y, 'POPLITEAL A.', '#2e7d32', 'white', fontsize=9.5, width=2.8, height=0.65)
draw_line(ax, ll_x, ll_y-0.36, pop_x, pop_y+0.33, '#aed581', lw=1.8, alpha=0.6)

pop_items = [
    ('Sup. Lat. + Med. Genicular A.', 19.0, 6.8),
    ('Middle Genicular A. (ACL, PCL)', 19.0, 6.2),
    ('Inf. Lat. + Med. Genicular A.', 19.0, 5.6),
    ('-> Genicular (Peripatellar) Anastomosis', 19.0, 5.0),
    ('-> Ant. Tibial A. (thru interosseous)', 22.5, 6.8),
    ('-> Post. Tibial A.', 22.5, 6.2),
    ('  + Fibular (Peroneal) A. from Post. Tib.', 22.5, 5.6),
    ('Divides at lower border of popliteus', 22.5, 5.0),
]
for i, (txt, x, y) in enumerate(pop_items):
    col = '#388e3c' if i % 2 == 0 else '#2e7d32'
    draw_node(ax, x, y, txt, col, 'white', fontsize=6.2, width=4.2, height=0.42)
    draw_line(ax, pop_x, pop_y-0.33, x, y+0.21, '#c8e6c9', lw=0.8, alpha=0.5)

# Foot arteries
foot_x, foot_y = 22.0, 3.5
draw_node(ax, foot_x, foot_y, 'FOOT & ANKLE ARTERIES', '#1b5e20', 'white', fontsize=9.5, width=4.2, height=0.65)
draw_line(ax, pop_x, pop_y-0.33, foot_x, foot_y+0.33, '#81c784', lw=1.5, alpha=0.6)

foot_items = [
    ('Ant. Tibial A. -> Dorsalis Pedis A.', 19.5, 2.6),
    ('  Palpated: EHL to EDL tendons', 19.5, 2.0),
    ('  -> Arcuate A. -> Dorsal Metatarsals', 19.5, 1.4),
    ('  -> Deep Plantar Branch', 19.5, 0.8),
    ('Post. Tibial A. -> behind Med. Malleolus', 24.5, 2.6),
    ('  -> Medial Plantar A. -> Medial sole', 24.5, 2.0),
    ('  -> Lateral Plantar A. -> Plantar Arch', 24.5, 1.4),
    ('Fibular A. -> Peroneals + Calcaneus', 24.5, 0.8),
]
for i, (txt, x, y) in enumerate(foot_items):
    col = '#388e3c' if i % 2 == 0 else '#1b5e20'
    draw_node(ax, x, y, txt, col, 'white', fontsize=6.2, width=4.2, height=0.42)
    draw_line(ax, foot_x, foot_y-0.33, x, y+0.21, '#c8e6c9', lw=0.8, alpha=0.5)

# =============================================
# SECTION 8: KEY ANASTOMOSES (bottom-right)
# =============================================
ana_x, ana_y = 8.5, 3.0
draw_node(ax, ana_x, ana_y, 'KEY ANASTOMOSES', '#f57f17', 'white', fontsize=10.5, width=3.8, height=0.7)

ana_items = [
    ('Circle of Willis -> Cerebral collateral', 6.5, 2.0),
    ('Scapular Anastomosis -> Subclavian', 6.5, 1.4),
    ('Epigastric -> Coarctation of aorta', 6.5, 0.8),
    ('Cruciate -> Femoral artery block', 10.5, 2.0),
    ('Genicular -> Knee collateral', 10.5, 1.4),
    ('Marginal A. Drummond -> SMA/IMA', 10.5, 0.8),
]
for i, (txt, x, y) in enumerate(ana_items):
    col = '#f9a825' if i % 2 == 0 else '#f57f17'
    draw_node(ax, x, y, txt, col, '#0d1117', fontsize=6.3, width=3.8, height=0.42)
    draw_line(ax, ana_x, ana_y-0.35, x, y+0.21, '#fff9c4', lw=0.8, alpha=0.5)

# =============================================
# SPINAL CORD SUPPLY (mid-right)
# =============================================
sc_x, sc_y = 30.0, 6.5
draw_node(ax, sc_x, sc_y, 'SPINAL CORD SUPPLY', '#880e4f', 'white', fontsize=9.5, width=3.8, height=0.65)
draw_curved(ax, cx, cy-0.5, sc_x, sc_y+0.33, '#f48fb1', lw=1.8, alpha=0.5)

sc_items = [
    ('Ant. Spinal A. -> Ant. 2/3 cord', 29.0, 5.6),
    ('  (paired vertebrals unite)', 29.0, 5.0),
    ('Post. Spinal A. x2 -> Post. 1/3', 29.0, 4.4),
    ('Radicular A. -> reinforce at each level', 29.0, 3.8),
    ('A. of Adamkiewicz (T9-L2, L side)', 32.0, 5.6),
    ('  Major reinforcement lower cord!', 32.0, 5.0),
    ('Posterior Intercostal A. (segmental)', 32.0, 4.4),
    ('Lumbar A. (segmental)', 32.0, 3.8),
]
for i, (txt, x, y) in enumerate(sc_items):
    col = '#ad1457' if i % 2 == 0 else '#880e4f'
    draw_node(ax, x, y, txt, col, 'white', fontsize=6.2, width=4.0, height=0.42)
    draw_line(ax, sc_x, sc_y-0.33, x, y+0.21, '#f8bbd0', lw=0.8, alpha=0.5)

# =============================================
# COLOR-CODED LEGEND
# =============================================
legend_data = [
    ('#4a148c', 'Celiac Trunk (Foregut)'),
    ('#01579b', 'SMA (Midgut)'),
    ('#004d40', 'IMA (Hindgut)'),
    ('#e65100', 'Glands & Paired Visceral'),
    ('#1a237e', 'Iliac / Pelvis'),
    ('#33691e', 'Lower Limb'),
    ('#880e4f', 'Spinal Cord'),
    ('#f57f17', 'Anastomoses'),
]
lx, ly = 0.3, 11.0
draw_node(ax, lx+1.8, ly+0.7, 'COLOUR LEGEND', '#263238', 'white', fontsize=8.5, width=3.2, height=0.5)
for i, (col, label) in enumerate(legend_data):
    draw_node(ax, lx+1.8, ly - i*0.62, label, col, 'white', fontsize=6.8, width=3.5, height=0.44)

# Footer
ax.text(17, 0.28, "Part 2 of 2  |  Gray's Anatomy for Students  |  MBBS Year 1 Anatomy",
        ha='center', fontsize=8, color='#555555', style='italic')

plt.tight_layout()
plt.savefig('/home/daytona/workspace/arterial-mindmaps/arterial_mindmap_part2.png',
            dpi=180, bbox_inches='tight', facecolor='#0d1117')
print("Part 2 saved!")
Running Command

cd /home/daytona/workspace/arterial-mindmaps && python mindmap2.py 2>&1 | tail -5

Running Command

ls -lh /home/daytona/workspace/arterial-mindmaps/*.png

Both mind maps are ready! Here they are:

Mind Map Part 1 - Head, Neck, Upper Limb & Thorax

Arterial Supply Mind Map Part 1

arterial mindmap part1

Image · PNG


Mind Map Part 2 - Abdomen, Pelvis, Lower Limb, Glands & Anastomoses

Arterial Supply Mind Map Part 2

arterial mindmap part2

Image · PNG


What's in each map:

Part 1 covers:
  • Arch of Aorta (3 branches)
  • Carotid arteries - ECA (8 branches with what they supply) + ICA
  • Circle of Willis - vertebral, basilar, PICA, AICA, SCA, PCA, communicating arteries
  • Subclavian artery - VIT CD mnemonic with all branches
  • Axillary artery - all 3 parts + 6 branches
  • Brachial → Radial + Ulnar → Palmar arches → Digital arteries
  • Coronary arteries - RCA (SA node, AV node, PDA) + LCA (LAD + Circumflex)
  • Thoracic aorta branches
Part 2 covers:
  • Celiac trunk (Foregut) - Left gastric, Common hepatic, Splenic with all sub-branches
  • SMA (Midgut) - all 5 branches including appendicular artery
  • IMA (Hindgut) - Left colic, sigmoids, superior rectal + Marginal artery of Drummond
  • Glands - Thyroid (3 arteries), Suprarenal (triple supply), Kidneys (segmental), Gonads
  • Posterior branches - Inferior phrenic, Lumbar (4 pairs), Median sacral
  • Iliac arteries - Internal iliac (Anterior + Posterior divisions) + External iliac
  • Lower limb - Femoral → Profunda femoris → Popliteal → Anterior/Posterior tibial → Foot
  • Spinal cord - Artery of Adamkiewicz highlighted
  • Key anastomoses - all 6 important ones

Create a PDF with both mind maps for easy printing

Reading File
Running Command

python3 - <<'EOF' from reportlab.lib.pagesizes import A3, landscape from reportlab.platypus import SimpleDocTemplate, Image, Spacer, Paragraph from reportlab.lib.styles import getSampleStyleSheet, ParagraphStyle from reportlab.lib.units import mm from reportlab.lib import colors from reportlab.platypus import PageBreak import os output_path = '/home/daytona/workspace/arterial-mindmaps/Arterial_Supply_Mindmaps.pdf' p1 = '/home/daytona/workspace/arterial-mindmaps/arterial_mindmap_part1.png' p2 = '/home/daytona/workspace/arterial-mindmaps/arterial_mindmap_part2.png' page_w, page_h = landscape(A3) # 420 x 297 mm in landscape doc = SimpleDocTemplate( output_path, pagesize=landscape(A3), leftMargin=8*mm, rightMargin=8*mm, topMargin=8*mm, bottomMargin=8*mm, title='Arterial Supply of the Body - MBBS Year 1', author='Orris Medical Assistant' ) styles = getSampleStyleSheet() title_style = ParagraphStyle( 'title', parent=styles['Normal'], fontName='Helvetica-Bold', fontSize=10, textColor=colors.HexColor('#ffffff'), backColor=colors.HexColor('#8B0000'), alignment=1, spaceBefore=2*mm, spaceAfter=2*mm, leftIndent=4*mm, rightIndent=4*mm, borderPad=4 ) sub_style = ParagraphStyle( 'sub', parent=styles['Normal'], fontName='Helvetica', fontSize=7.5, textColor=colors.HexColor('#555555'), alignment=1, spaceAfter=2*mm, ) # Usable area usable_w = page_w - 16*mm usable_h = page_h - 16*mm - 22 # leave room for caption story = [] # Page 1 story.append(Paragraph( 'ARTERIAL SUPPLY OF THE BODY — PART 1 | Head & Neck • Upper Limb • Thorax • Coronary Arteries • Circle of Willis', title_style )) story.append(Paragraph('MBBS Year 1 Anatomy | Source: Gray\'s Anatomy for Students', sub_style)) story.append(Image(p1, width=usable_w, height=usable_h - 10)) story.append(PageBreak()) # Page 2 story.append(Paragraph( 'ARTERIAL SUPPLY OF THE BODY — PART 2 | Abdomen • Pelvis • Lower Limb • Glands • Spinal Cord • Key Anastomoses', title_style )) story.append(Paragraph('MBBS Year 1 Anatomy | Source: Gray\'s Anatomy for Students', sub_style)) story.append(Image(p2, width=usable_w, height=usable_h - 10)) doc.build(story) size_kb = os.path.getsize(output_path) // 1024 print(f"PDF created: {output_path} ({size_kb} KB)") EOF

Done! Here's your print-ready PDF:

Arterial Supply Mindmaps

PDF Document · PDF

(~1.9 MB, 2 pages, A3 Landscape)

Print tips:
  • Set paper size to A3 for best clarity - all text will be crisp
  • If printing on A4, select "fit to page" in your printer dialog - still very readable
  • Use landscape orientation (it's already set that way)
  • Color printing recommended to use the region color-coding
  • For black-and-white printing, the boxes and text remain clearly distinguishable
What's in the PDF:
PageContents
Page 1Arch of Aorta, Carotid (ECA + ICA), Circle of Willis, Subclavian (VIT CD), Axillary (3 parts), Brachial → Hand, Coronary arteries, Thoracic aorta
Page 2Celiac trunk, SMA, IMA, Glands (Thyroid/Suprarenal/Kidney/Gonads), Iliac arteries, Internal iliac (Pelvis), External iliac → Femoral → Popliteal → Foot, Spinal cord, Key anastomoses

Give me a pdf which have full human body arteries, with all connections between them in one page and use the human diagram to note the names of arteries

Writing File

~/arterial-mindmaps/body_arteries.py

import matplotlib
matplotlib.use('Agg')
import matplotlib.pyplot as plt
import matplotlib.patches as mpatches
from matplotlib.patches import FancyBboxPatch, Arc, Ellipse, FancyArrowPatch
from matplotlib.path import Path
import matplotlib.patheffects as pe
import numpy as np

fig, ax = plt.subplots(figsize=(22, 34))
ax.set_xlim(0, 22)
ax.set_ylim(0, 34)
ax.axis('off')
fig.patch.set_facecolor('#0a0a0f')
ax.set_facecolor('#0a0a0f')

# ─────────────────────────────────────────────
# HELPER FUNCTIONS
# ─────────────────────────────────────────────
def artery(ax, xs, ys, color='#e63946', lw=2, alpha=0.9, zorder=6):
    ax.plot(xs, ys, color=color, lw=lw, alpha=alpha,
            solid_capstyle='round', solid_joinstyle='round', zorder=zorder)

def bezier(ax, x1,y1, cx,cy, x2,y2, color='#e63946', lw=2, alpha=0.9, zorder=6):
    path = Path([(x1,y1),(cx,cy),(x2,y2)],
                [Path.MOVETO, Path.CURVE3, Path.CURVE3])
    patch = mpatches.PathPatch(path, facecolor='none',
                                edgecolor=color, lw=lw, alpha=alpha, zorder=zorder)
    ax.add_patch(patch)

def label(ax, x, y, txt, color='#ffffff', fs=6.5, ha='left', va='center',
          box_color=None, zorder=8):
    kw = dict(ha=ha, va=va, fontsize=fs, color=color, zorder=zorder,
              fontweight='bold')
    if box_color:
        kw['bbox'] = dict(boxstyle='round,pad=0.18', facecolor=box_color,
                           edgecolor='none', alpha=0.85)
    t = ax.text(x, y, txt, **kw)
    t.set_path_effects([pe.withStroke(linewidth=1.5, foreground='#0a0a0f')])

def leader(ax, lx, ly, ax_, ay, color='#888888', lw=0.8):
    ax.annotate('', xy=(ax_, ay), xytext=(lx, ly),
                arrowprops=dict(arrowstyle='-', color=color, lw=lw),
                zorder=5)

# ─────────────────────────────────────────────
# BODY SILHOUETTE  (simplified anatomical outline)
# ─────────────────────────────────────────────
body_color = '#1a1a2e'
outline_color = '#3a3a5c'

# --- HEAD ---
head = plt.Circle((11, 31.3), 1.3, color=body_color, zorder=3)
head_outline = plt.Circle((11, 31.3), 1.3, fill=False, edgecolor=outline_color, lw=1.5, zorder=4)
ax.add_patch(head)
ax.add_patch(head_outline)

# --- NECK ---
neck = mpatches.FancyBboxPatch((10.45, 29.7), 1.1, 0.7,
    boxstyle='round,pad=0.05', facecolor=body_color, edgecolor=outline_color, lw=1.2, zorder=3)
ax.add_patch(neck)

# --- TORSO ---
torso_x = [9.0, 8.5, 8.3, 8.5, 9.2, 9.4, 9.2, 8.8, 8.6, 9.0,
           13.0, 13.4, 13.2, 12.8, 12.6, 13.0, 13.5, 13.7, 13.5, 13.0,
           9.0]
torso_y = [29.7, 28.5, 26.5, 24.5, 23.0, 21.5, 20.0, 18.5, 17.0, 15.5,
           15.5, 17.0, 18.5, 20.0, 21.5, 23.0, 24.5, 26.5, 28.5, 29.7,
           29.7]
torso_patch = plt.Polygon(list(zip(torso_x, torso_y)),
    facecolor=body_color, edgecolor=outline_color, lw=1.5, zorder=3)
ax.add_patch(torso_patch)

# --- LEFT ARM (anatomical left = viewer's right) ---
# Upper arm
l_uarm = plt.Polygon([(13.0,28.5),(13.8,28.2),(15.2,24.5),(14.5,24.2)],
    facecolor=body_color, edgecolor=outline_color, lw=1.2, zorder=3)
ax.add_patch(l_uarm)
# Forearm
l_farm = plt.Polygon([(14.5,24.2),(15.2,24.5),(15.8,21.0),(15.1,20.8)],
    facecolor=body_color, edgecolor=outline_color, lw=1.2, zorder=3)
ax.add_patch(l_farm)
# Hand
l_hand = plt.Polygon([(15.1,20.8),(15.8,21.0),(16.3,19.5),(15.6,19.3)],
    facecolor=body_color, edgecolor=outline_color, lw=1.0, zorder=3)
ax.add_patch(l_hand)

# --- RIGHT ARM ---
r_uarm = plt.Polygon([(9.0,28.5),(8.2,28.2),(6.8,24.5),(7.5,24.2)],
    facecolor=body_color, edgecolor=outline_color, lw=1.2, zorder=3)
ax.add_patch(r_uarm)
r_farm = plt.Polygon([(7.5,24.2),(6.8,24.5),(6.2,21.0),(6.9,20.8)],
    facecolor=body_color, edgecolor=outline_color, lw=1.2, zorder=3)
ax.add_patch(r_farm)
r_hand = plt.Polygon([(6.9,20.8),(6.2,21.0),(5.7,19.5),(6.4,19.3)],
    facecolor=body_color, edgecolor=outline_color, lw=1.0, zorder=3)
ax.add_patch(r_hand)

# --- LEFT LEG ---
l_thigh = plt.Polygon([(11.0,15.5),(12.5,15.5),(12.8,10.5),(11.3,10.5)],
    facecolor=body_color, edgecolor=outline_color, lw=1.2, zorder=3)
ax.add_patch(l_thigh)
l_calf = plt.Polygon([(11.3,10.5),(12.8,10.5),(12.6,5.5),(11.1,5.5)],
    facecolor=body_color, edgecolor=outline_color, lw=1.2, zorder=3)
ax.add_patch(l_calf)
l_foot = plt.Polygon([(11.1,5.5),(12.6,5.5),(13.2,4.5),(11.0,4.5)],
    facecolor=body_color, edgecolor=outline_color, lw=1.0, zorder=3)
ax.add_patch(l_foot)

# --- RIGHT LEG ---
r_thigh = plt.Polygon([(9.0,15.5),(10.5,15.5),(10.7,10.5),(9.2,10.5)],
    facecolor=body_color, edgecolor=outline_color, lw=1.2, zorder=3)
ax.add_patch(r_thigh)
r_calf = plt.Polygon([(9.2,10.5),(10.7,10.5),(10.5,5.5),(9.0,5.5)],
    facecolor=body_color, edgecolor=outline_color, lw=1.2, zorder=3)
ax.add_patch(r_calf)
r_foot = plt.Polygon([(9.0,5.5),(10.5,5.5),(10.0,4.5),(8.8,4.5)],
    facecolor=body_color, edgecolor=outline_color, lw=1.0, zorder=3)
ax.add_patch(r_foot)

# ─────────────────────────────────────────────
# ARTERY COLORS BY SYSTEM
# ─────────────────────────────────────────────
C_AORTA   = '#ff1744'   # bright red - aorta main
C_HEAD    = '#ff6d00'   # orange - head/neck
C_UPPER   = '#00bfa5'   # teal - upper limb
C_HEART   = '#ff4081'   # pink - coronary
C_THORAX  = '#aa00ff'   # purple - thoracic
C_ABDOM   = '#2979ff'   # blue - abdomen
C_PELVIS  = '#00e5ff'   # cyan - pelvis
C_LOWER   = '#69f0ae'   # green - lower limb
C_CONNECT = '#ffea00'   # yellow - anastomoses/connections

# ─────────────────────────────────────────────
# AORTA  (central trunk)
# ─────────────────────────────────────────────
# Ascending aorta
artery(ax, [11, 11], [30.0, 28.8], C_AORTA, lw=4.5, zorder=7)
# Arch of aorta
bezier(ax, 11,28.8, 11.3,29.3, 11.8,29.0, C_AORTA, lw=4.5, zorder=7)
bezier(ax, 11.8,29.0, 12.5,28.7, 11.5,28.2, C_AORTA, lw=4.5, zorder=7)
# Descending thoracic aorta
artery(ax, [11.5, 11.2], [28.2, 22.5], C_AORTA, lw=4.5, zorder=7)
# Abdominal aorta
artery(ax, [11.2, 11.2], [22.5, 15.8], C_AORTA, lw=4.0, zorder=7)
# Bifurcation
artery(ax, [11.2, 10.5, 9.8], [15.8, 15.3, 15.0], C_AORTA, lw=3.0, zorder=7)  # right common iliac
artery(ax, [11.2, 11.9, 12.2], [15.8, 15.3, 15.0], C_AORTA, lw=3.0, zorder=7)  # left common iliac

# ─────────────────────────────────────────────
# HEAD & NECK ARTERIES
# ─────────────────────────────────────────────
# Brachiocephalic trunk from arch
artery(ax, [11.5, 10.8, 10.2], [28.8, 29.4, 30.0], C_HEAD, lw=2.5, zorder=7)
# Right Common Carotid
artery(ax, [10.2, 10.3, 10.4], [30.0, 30.5, 31.0], C_HEAD, lw=2.0, zorder=7)
# Right External Carotid (curves to face)
bezier(ax, 10.4,31.0, 10.0,31.5, 10.2,31.8, C_HEAD, lw=1.5)
# Right Internal Carotid (to brain)
artery(ax, [10.4, 10.6, 10.8], [31.0, 31.4, 31.6], C_HEAD, lw=1.5, zorder=7)

# Left Common Carotid directly from arch
artery(ax, [11.8, 11.7, 11.6], [29.0, 29.8, 30.5], C_HEAD, lw=2.0, zorder=7)
# Left External Carotid
bezier(ax, 11.6,30.5, 12.0,31.2, 11.8,31.8, C_HEAD, lw=1.5)
# Left Internal Carotid
artery(ax, [11.6, 11.4, 11.3], [30.5, 31.2, 31.6], C_HEAD, lw=1.5)

# Vertebral arteries (up through neck)
artery(ax, [10.6, 10.7, 10.9, 11.0], [29.8, 30.2, 30.8, 31.2], C_HEAD, lw=1.2, alpha=0.8)
artery(ax, [11.4, 11.3, 11.1, 11.0], [29.8, 30.2, 30.8, 31.2], C_HEAD, lw=1.2, alpha=0.8)
# Basilar artery (circle of willis at base of brain)
artery(ax, [10.8, 11.0, 11.2], [31.5, 31.8, 31.5], C_HEAD, lw=1.2, alpha=0.8)

# Facial artery
bezier(ax, 10.2,31.5, 10.0,31.9, 10.3,32.2, C_HEAD, lw=1.0, alpha=0.7)
bezier(ax, 11.8,31.5, 12.0,31.9, 11.7,32.2, C_HEAD, lw=1.0, alpha=0.7)

# Superior thyroid arteries
artery(ax, [10.3, 10.5, 10.7], [30.5, 30.2, 30.0], C_HEAD, lw=1.0, alpha=0.7)
artery(ax, [11.7, 11.5, 11.3], [30.5, 30.2, 30.0], C_HEAD, lw=1.0, alpha=0.7)

# ─────────────────────────────────────────────
# SUBCLAVIAN + UPPER LIMB  (RIGHT side = viewer left)
# ─────────────────────────────────────────────
# Right subclavian from brachiocephalic
artery(ax, [10.2, 9.5, 8.8], [30.0, 29.5, 28.8], C_UPPER, lw=2.2, zorder=7)
# Right axillary
artery(ax, [8.8, 8.0, 7.5], [28.8, 28.2, 27.5], C_UPPER, lw=2.0)
# Right brachial
artery(ax, [7.5, 7.2, 6.9], [27.5, 26.0, 24.5], C_UPPER, lw=1.8)
# Right radial
bezier(ax, 6.9,24.5, 6.7,23.0, 6.6,21.5, C_UPPER, lw=1.4)
bezier(ax, 6.6,21.5, 6.5,20.5, 6.4,19.8, C_UPPER, lw=1.2)
# Right ulnar
bezier(ax, 6.9,24.5, 7.1,23.0, 7.0,21.5, C_UPPER, lw=1.4)
bezier(ax, 7.0,21.5, 6.9,20.5, 6.8,19.8, C_UPPER, lw=1.2)
# Right palmar arch connection
artery(ax, [6.4,19.8, 6.8,19.8], [19.8, 19.8], C_CONNECT, lw=1.2, alpha=0.8)
# Deep palmar arch (deeper)
artery(ax, [6.3,19.5, 6.9,19.5], [19.5, 19.5], C_CONNECT, lw=0.9, alpha=0.6)

# Left subclavian directly from arch
artery(ax, [11.8, 12.5, 13.2], [29.0, 29.5, 28.8], C_UPPER, lw=2.2, zorder=7)
# Left axillary
artery(ax, [13.2, 14.0, 14.5], [28.8, 28.2, 27.5], C_UPPER, lw=2.0)
# Left brachial
artery(ax, [14.5, 14.8, 15.1], [27.5, 26.0, 24.5], C_UPPER, lw=1.8)
# Left radial
bezier(ax, 15.1,24.5, 15.3,23.0, 15.4,21.5, C_UPPER, lw=1.4)
bezier(ax, 15.4,21.5, 15.5,20.5, 15.6,19.8, C_UPPER, lw=1.2)
# Left ulnar
bezier(ax, 15.1,24.5, 14.9,23.0, 15.0,21.5, C_UPPER, lw=1.4)
bezier(ax, 15.0,21.5, 15.1,20.5, 15.2,19.8, C_UPPER, lw=1.2)
# Left palmar arch
artery(ax, [15.2, 15.6, 15.2], [19.8, 19.8], C_CONNECT, lw=1.2, alpha=0.8)
artery(ax, [15.1, 15.7], [19.5, 19.5], C_CONNECT, lw=0.9, alpha=0.6)

# Profunda brachii (deep arm - right)
bezier(ax, 7.5,27.5, 7.8,26.5, 8.0,25.5, C_UPPER, lw=1.0, alpha=0.6)
# Profunda brachii (left)
bezier(ax, 14.5,27.5, 14.2,26.5, 14.0,25.5, C_UPPER, lw=1.0, alpha=0.6)

# ─────────────────────────────────────────────
# CORONARY ARTERIES
# ─────────────────────────────────────────────
# RCA (curves around right side of heart)
bezier(ax, 11.0,27.2, 10.2,26.8, 10.0,26.0, C_HEART, lw=1.5, alpha=0.9)
bezier(ax, 10.0,26.0, 9.8,25.3, 10.2,24.8, C_HEART, lw=1.3, alpha=0.8)
# LCA / LAD (left anterior descending)
bezier(ax, 11.0,27.2, 11.2,26.5, 11.0,25.5, C_HEART, lw=1.5, alpha=0.9)
bezier(ax, 11.0,25.5, 10.9,24.8, 11.0,24.2, C_HEART, lw=1.3, alpha=0.8)
# Circumflex
bezier(ax, 11.0,27.2, 11.8,26.8, 12.0,26.0, C_HEART, lw=1.3, alpha=0.8)
bezier(ax, 12.0,26.0, 12.2,25.3, 11.8,24.8, C_HEART, lw=1.1, alpha=0.7)
# Posterior descending
bezier(ax, 10.2,24.8, 10.8,24.4, 11.0,24.2, C_CONNECT, lw=1.0, alpha=0.7)

# ─────────────────────────────────────────────
# THORACIC AORTA BRANCHES
# ─────────────────────────────────────────────
# Posterior intercostal arteries (pairs - simplified)
for yi, lw_ in zip([27.5, 26.8, 26.1, 25.4, 24.7, 24.0, 23.3], [1.0]*7):
    xc = 11.2 + (28.2 - yi) * 0.05  # slight rightward shift of descending aorta
    artery(ax, [xc, xc-1.4], [yi, yi], C_THORAX, lw=lw_, alpha=0.6)
    artery(ax, [xc, xc+1.4], [yi, yi], C_THORAX, lw=lw_, alpha=0.6)

# Internal thoracic arteries (bilateral, run vertically inside chest)
artery(ax, [10.0, 9.9, 9.8, 9.8], [29.5, 28.0, 26.0, 23.5], C_THORAX, lw=1.2, alpha=0.75)
artery(ax, [12.0, 12.1, 12.2, 12.2], [29.5, 28.0, 26.0, 23.5], C_THORAX, lw=1.2, alpha=0.75)
# Superior epigastric (continues down)
artery(ax, [9.8, 9.8], [23.5, 22.0], C_THORAX, lw=1.0, alpha=0.65)
artery(ax, [12.2, 12.2], [23.5, 22.0], C_THORAX, lw=1.0, alpha=0.65)

# ─────────────────────────────────────────────
# ABDOMINAL BRANCHES
# ─────────────────────────────────────────────
# Celiac trunk
artery(ax, [11.2, 11.2], [22.5, 22.0], C_ABDOM, lw=2.0, zorder=7)
artery(ax, [11.2, 10.2, 9.5], [22.0, 21.8, 21.5], C_ABDOM, lw=1.5)   # left gastric
artery(ax, [11.2, 11.5, 12.5], [22.0, 21.7, 21.2], C_ABDOM, lw=1.5)  # common hepatic
artery(ax, [11.2, 10.8, 9.8], [22.0, 21.5, 21.0], C_ABDOM, lw=1.5)   # splenic

# SMA
artery(ax, [11.2, 11.2], [21.5, 21.0], C_ABDOM, lw=2.2, zorder=7)
bezier(ax, 11.2,21.0, 10.5,20.5, 9.5,20.0, C_ABDOM, lw=1.4)
bezier(ax, 11.2,21.0, 11.5,20.5, 12.5,20.0, C_ABDOM, lw=1.4)
bezier(ax, 11.2,21.0, 10.8,20.2, 10.2,19.5, C_ABDOM, lw=1.2, alpha=0.7)
bezier(ax, 11.2,21.0, 11.6,20.2, 12.2,19.5, C_ABDOM, lw=1.2, alpha=0.7)
bezier(ax, 11.2,21.0, 10.5,19.8, 10.0,19.0, C_ABDOM, lw=1.0, alpha=0.6)

# IMA
artery(ax, [11.2, 11.2], [18.5, 18.0], C_ABDOM, lw=1.8, zorder=7)
bezier(ax, 11.2,18.0, 10.8,17.5, 10.0,17.0, C_ABDOM, lw=1.3)   # left colic
bezier(ax, 11.2,18.0, 11.0,17.3, 10.8,16.5, C_ABDOM, lw=1.2)   # sigmoid
bezier(ax, 11.2,18.0, 11.2,17.2, 11.2,16.5, C_ABDOM, lw=1.2)   # superior rectal

# Renal arteries
artery(ax, [11.2, 9.8, 9.2], [20.8, 20.8, 20.8], C_ABDOM, lw=2.0, zorder=7)  # right renal
artery(ax, [11.2, 12.6, 13.2], [20.8, 20.8, 20.8], C_ABDOM, lw=2.0, zorder=7)  # left renal

# Suprarenal arteries
artery(ax, [9.5, 9.2, 9.0], [21.5, 21.2, 21.0], C_ABDOM, lw=1.0, alpha=0.7)  # right supra
artery(ax, [12.9, 13.2, 13.4], [21.5, 21.2, 21.0], C_ABDOM, lw=1.0, alpha=0.7)  # left supra

# Inferior phrenic
artery(ax, [11.2, 10.0, 9.5], [22.8, 22.9, 23.0], C_ABDOM, lw=1.0, alpha=0.7)
artery(ax, [11.2, 12.4, 12.9], [22.8, 22.9, 23.0], C_ABDOM, lw=1.0, alpha=0.7)

# Gonadal arteries (long, go down to pelvis)
artery(ax, [11.0, 10.2, 9.8], [20.2, 18.5, 17.0], C_ABDOM, lw=0.9, alpha=0.6)
artery(ax, [11.4, 12.2, 12.6], [20.2, 18.5, 17.0], C_ABDOM, lw=0.9, alpha=0.6)

# Lumbar arteries (4 pairs)
for yi in [22.2, 21.5, 20.8, 20.1]:
    artery(ax, [11.2, 10.0], [yi, yi], C_THORAX, lw=0.8, alpha=0.5)
    artery(ax, [11.2, 12.4], [yi, yi], C_THORAX, lw=0.8, alpha=0.5)

# Inferior epigastric (from ext iliac, anastomoses with sup epigastric)
artery(ax, [9.8, 9.8], [16.5, 22.0], C_CONNECT, lw=1.0, alpha=0.65)  # right side
artery(ax, [12.2, 12.2], [16.5, 22.0], C_CONNECT, lw=1.0, alpha=0.65)  # left side

# ─────────────────────────────────────────────
# PELVIS / ILIAC ARTERIES
# ─────────────────────────────────────────────
# Right common iliac -> ext + int iliac
artery(ax, [10.5, 10.0, 9.5], [15.3, 15.0, 14.5], C_PELVIS, lw=2.5, zorder=7)
# Right external iliac
artery(ax, [9.5, 9.3, 9.2], [14.5, 14.0, 13.5], C_PELVIS, lw=2.0)
# Right internal iliac
artery(ax, [9.5, 9.8, 10.2], [14.5, 14.0, 13.5], C_PELVIS, lw=1.8)
# Right internal iliac branches
bezier(ax, 10.2,13.5, 10.5,13.0, 10.8,12.5, C_PELVIS, lw=1.2, alpha=0.8)  # superior gluteal
bezier(ax, 10.2,13.5, 9.8,13.0, 9.5,12.5, C_PELVIS, lw=1.0, alpha=0.7)   # obturator
bezier(ax, 10.2,13.5, 10.3,12.8, 10.4,12.0, C_PELVIS, lw=1.0, alpha=0.7)  # int pudendal

# Left common iliac -> ext + int iliac
artery(ax, [11.9, 12.4, 12.9], [15.3, 15.0, 14.5], C_PELVIS, lw=2.5, zorder=7)
# Left external iliac
artery(ax, [12.9, 13.1, 13.2], [14.5, 14.0, 13.5], C_PELVIS, lw=2.0)
# Left internal iliac
artery(ax, [12.9, 12.6, 12.2], [14.5, 14.0, 13.5], C_PELVIS, lw=1.8)
# Left internal iliac branches
bezier(ax, 12.2,13.5, 11.9,13.0, 11.6,12.5, C_PELVIS, lw=1.2, alpha=0.8)
bezier(ax, 12.2,13.5, 12.6,13.0, 12.9,12.5, C_PELVIS, lw=1.0, alpha=0.7)
bezier(ax, 12.2,13.5, 12.1,12.8, 12.0,12.0, C_PELVIS, lw=1.0, alpha=0.7)

# ─────────────────────────────────────────────
# LOWER LIMB  (RIGHT leg = viewer's left)
# ─────────────────────────────────────────────
# Right femoral artery
artery(ax, [9.2, 9.5, 9.8, 10.0], [13.5, 12.0, 10.5, 9.5], C_LOWER, lw=2.2, zorder=7)
# Right profunda femoris
bezier(ax, 9.5,12.0, 8.8,11.5, 8.5,10.5, C_LOWER, lw=1.5, alpha=0.8)
# Perforating arteries
for yi in [11.5, 11.0, 10.5]:
    bezier(ax, 8.8,yi, 9.0,yi-0.2, 9.5,yi-0.3, C_LOWER, lw=0.9, alpha=0.6)
# Right popliteal
artery(ax, [10.0, 9.9, 9.8], [9.5, 9.0, 8.5], C_LOWER, lw=2.0)
# Genicular arteries
artery(ax, [9.8, 9.4], [9.0, 9.0], C_CONNECT, lw=1.0, alpha=0.7)
artery(ax, [9.8, 10.2], [9.0, 9.0], C_CONNECT, lw=1.0, alpha=0.7)
artery(ax, [9.8, 9.3], [8.8, 8.8], C_CONNECT, lw=1.0, alpha=0.7)
artery(ax, [9.8, 10.3], [8.8, 8.8], C_CONNECT, lw=1.0, alpha=0.7)
# Right anterior tibial
artery(ax, [9.8, 9.5, 9.3], [8.5, 7.0, 5.8], C_LOWER, lw=1.5)
# Right posterior tibial
artery(ax, [9.8, 10.2, 10.4], [8.5, 7.0, 5.8], C_LOWER, lw=1.5)
# Right fibular
bezier(ax, 9.8,8.5, 10.5,7.5, 10.6,6.5, C_LOWER, lw=1.2, alpha=0.7)
# Right dorsalis pedis
artery(ax, [9.3, 9.2, 9.1], [5.8, 5.3, 4.8], C_LOWER, lw=1.2)
# Right plantar arteries
artery(ax, [10.4, 10.2, 9.5], [5.8, 5.2, 5.0], C_LOWER, lw=1.2)
artery(ax, [9.1, 9.4, 9.8, 10.2], [4.8, 4.7, 4.7, 4.8], C_CONNECT, lw=1.0, alpha=0.8)

# LEFT LEG (viewer right)
# Left femoral
artery(ax, [13.2, 12.9, 12.6, 12.4], [13.5, 12.0, 10.5, 9.5], C_LOWER, lw=2.2, zorder=7)
# Left profunda femoris
bezier(ax, 12.9,12.0, 13.6,11.5, 13.9,10.5, C_LOWER, lw=1.5, alpha=0.8)
# Perforating
for yi in [11.5, 11.0, 10.5]:
    bezier(ax, 13.6,yi, 13.4,yi-0.2, 12.9,yi-0.3, C_LOWER, lw=0.9, alpha=0.6)
# Left popliteal
artery(ax, [12.4, 12.5, 12.6], [9.5, 9.0, 8.5], C_LOWER, lw=2.0)
# Genicular
artery(ax, [12.6, 12.2], [9.0, 9.0], C_CONNECT, lw=1.0, alpha=0.7)
artery(ax, [12.6, 13.1], [9.0, 9.0], C_CONNECT, lw=1.0, alpha=0.7)
artery(ax, [12.6, 12.1], [8.8, 8.8], C_CONNECT, lw=1.0, alpha=0.7)
artery(ax, [12.6, 13.1], [8.8, 8.8], C_CONNECT, lw=1.0, alpha=0.7)
# Left anterior tibial
artery(ax, [12.6, 12.9, 13.1], [8.5, 7.0, 5.8], C_LOWER, lw=1.5)
# Left posterior tibial
artery(ax, [12.6, 12.2, 12.0], [8.5, 7.0, 5.8], C_LOWER, lw=1.5)
# Left fibular
bezier(ax, 12.6,8.5, 11.9,7.5, 11.8,6.5, C_LOWER, lw=1.2, alpha=0.7)
# Left dorsalis pedis
artery(ax, [13.1, 13.2, 13.3], [5.8, 5.3, 4.8], C_LOWER, lw=1.2)
# Left plantar
artery(ax, [12.0, 12.2, 12.9], [5.8, 5.2, 5.0], C_LOWER, lw=1.2)
artery(ax, [13.3, 13.0, 12.6, 12.2], [4.8, 4.7, 4.7, 4.8], C_CONNECT, lw=1.0, alpha=0.8)

# Median sacral artery
artery(ax, [11.2, 11.2, 11.2], [15.5, 14.5, 13.5], C_ABDOM, lw=0.9, alpha=0.5)

# ─────────────────────────────────────────────
# TITLE + LABELS
# ─────────────────────────────────────────────
ax.text(11, 33.7, 'ARTERIAL SUPPLY OF THE HUMAN BODY', ha='center', va='center',
        fontsize=16, color='white', fontweight='bold',
        bbox=dict(boxstyle='round,pad=0.4', facecolor='#8B0000', edgecolor='#ff4444', lw=2))
ax.text(11, 33.2, 'Complete Vascular Map  |  MBBS Year 1 Anatomy  |  Gray\'s Anatomy for Students',
        ha='center', fontsize=8.5, color='#aaaaaa')

# ─────────────────────────────────────────────
# ARTERY LABELS  (Left side = viewer's left, labels placed outside body)
# ─────────────────────────────────────────────

# --- HEAD & NECK labels (right side labels) ---
label(ax, 13.5, 32.2, 'Facial A.', C_HEAD, fs=6.2)
leader(ax, 13.4, 32.2, 11.8, 32.1, C_HEAD)

label(ax, 13.5, 31.6, 'Superficial Temporal A.', C_HEAD, fs=6.2)
leader(ax, 13.4, 31.6, 12.0, 31.8, C_HEAD)

label(ax, 13.5, 31.0, 'L. Internal Carotid A.', C_HEAD, fs=6.2)
leader(ax, 13.4, 31.0, 11.4, 31.2, C_HEAD)

label(ax, 13.5, 30.4, 'L. Common Carotid A.', C_HEAD, fs=6.2)
leader(ax, 13.4, 30.4, 11.7, 30.5, C_HEAD)

label(ax, 13.5, 29.8, 'L. Subclavian A.', C_UPPER, fs=6.2)
leader(ax, 13.4, 29.8, 12.5, 29.5, C_UPPER)

# Left side (viewer's left = anatomical right)
label(ax, 8.5, 32.2, 'R. External Carotid A.', C_HEAD, fs=6.2, ha='right')
leader(ax, 8.6, 32.2, 10.2, 31.8, C_HEAD)

label(ax, 8.5, 31.6, 'R. Internal Carotid A.', C_HEAD, fs=6.2, ha='right')
leader(ax, 8.6, 31.6, 10.6, 31.4, C_HEAD)

label(ax, 8.5, 31.0, 'Vertebral A. (→ Basilar)', C_HEAD, fs=6.2, ha='right')
leader(ax, 8.6, 31.0, 10.7, 30.5, C_HEAD)

label(ax, 8.5, 30.4, 'R. Common Carotid A.', C_HEAD, fs=6.2, ha='right')
leader(ax, 8.6, 30.4, 10.3, 30.5, C_HEAD)

label(ax, 8.5, 29.8, 'Brachiocephalic Trunk', C_HEAD, fs=6.2, ha='right')
leader(ax, 8.6, 29.8, 10.5, 29.8, C_HEAD)

label(ax, 8.5, 29.2, 'R. Subclavian A.', C_UPPER, fs=6.2, ha='right')
leader(ax, 8.6, 29.2, 9.5, 29.3, C_UPPER)

# --- AORTA label (center) ---
label(ax, 11.6, 28.8, 'Arch of Aorta', C_AORTA, fs=7.5, ha='left')
label(ax, 11.8, 27.2, 'Descending\nThoracic Aorta', C_AORTA, fs=6.2, ha='left')
label(ax, 11.8, 22.5, 'Abdominal Aorta', C_AORTA, fs=6.5, ha='left')
label(ax, 11.8, 15.8, 'Bifurcation (L4)', C_AORTA, fs=6.0, ha='left')

# --- CORONARY (center labels) ---
label(ax, 9.2, 27.2, 'RCA', C_HEART, fs=6.0, ha='right')
label(ax, 11.2, 25.5, 'LAD', C_HEART, fs=6.0, ha='left')
label(ax, 12.5, 26.0, 'Circumflex A.', C_HEART, fs=6.0)

# --- THORAX labels ---
label(ax, 7.8, 26.0, 'Post. Intercostal\nArteries (3-11)', C_THORAX, fs=6.0, ha='right')
label(ax, 8.5, 28.0, 'Internal Thoracic A.', C_THORAX, fs=6.0, ha='right')
leader(ax, 8.5, 28.0, 10.0, 27.5, C_THORAX)

# --- UPPER LIMB ---
label(ax, 5.5, 28.0, 'R. Axillary A.', C_UPPER, fs=6.2, ha='right')
leader(ax, 5.6, 28.0, 7.5, 27.5, C_UPPER)

label(ax, 5.5, 26.5, 'R. Brachial A.', C_UPPER, fs=6.2, ha='right')
leader(ax, 5.6, 26.5, 7.0, 26.0, C_UPPER)

label(ax, 5.0, 23.0, 'R. Radial A.', C_UPPER, fs=6.2, ha='right')
leader(ax, 5.1, 23.0, 6.5, 22.5, C_UPPER)

label(ax, 5.0, 22.0, 'R. Ulnar A.', C_UPPER, fs=6.2, ha='right')
leader(ax, 5.1, 22.0, 6.9, 22.0, C_UPPER)

label(ax, 5.0, 19.8, 'Superficial Palmar\nArch (Ulnar)', C_CONNECT, fs=6.0, ha='right')
leader(ax, 5.1, 19.8, 6.5, 19.8, C_CONNECT)

label(ax, 5.0, 18.8, 'Deep Palmar Arch\n(Radial)', C_CONNECT, fs=6.0, ha='right')
leader(ax, 5.1, 18.8, 6.4, 19.5, C_CONNECT)

# LEFT arm labels
label(ax, 16.2, 28.0, 'L. Axillary A.', C_UPPER, fs=6.2)
leader(ax, 16.1, 28.0, 14.5, 27.5, C_UPPER)

label(ax, 16.2, 26.5, 'L. Brachial A.', C_UPPER, fs=6.2)
leader(ax, 16.1, 26.5, 15.1, 26.0, C_UPPER)

label(ax, 16.2, 23.0, 'L. Radial A.', C_UPPER, fs=6.2)
leader(ax, 16.1, 23.0, 15.5, 22.5, C_UPPER)

label(ax, 16.2, 22.0, 'L. Ulnar A.', C_UPPER, fs=6.2)
leader(ax, 16.1, 22.0, 15.1, 22.0, C_UPPER)

label(ax, 16.2, 19.8, 'Superficial Palmar\nArch', C_CONNECT, fs=6.0)
leader(ax, 16.1, 19.8, 15.5, 19.8, C_CONNECT)

# --- ABDOMINAL ---
label(ax, 7.5, 22.0, 'Celiac Trunk (T12)\n↳ L.Gastric, Hepatic,\n   Splenic', C_ABDOM, fs=6.0, ha='right')
leader(ax, 7.6, 22.0, 11.2, 22.0, C_ABDOM)

label(ax, 7.5, 20.8, 'R. Renal A.', C_ABDOM, fs=6.2, ha='right')
leader(ax, 7.6, 20.8, 9.5, 20.8, C_ABDOM)

label(ax, 14.5, 20.8, 'L. Renal A.', C_ABDOM, fs=6.2)
leader(ax, 14.4, 20.8, 12.8, 20.8, C_ABDOM)

label(ax, 7.5, 20.0, 'SMA (L1)\n↳ Jejunal, Ileal,\n   Ileocolic, Colics', C_ABDOM, fs=6.0, ha='right')
leader(ax, 7.6, 20.0, 11.2, 21.0, C_ABDOM)

label(ax, 7.5, 18.0, 'IMA (L3)\n↳ L.Colic, Sigmoid,\n   Sup. Rectal A.', C_ABDOM, fs=6.0, ha='right')
leader(ax, 7.6, 18.0, 11.2, 18.0, C_ABDOM)

label(ax, 14.5, 21.5, 'Suprarenal A.\n(triple supply)', C_ABDOM, fs=6.0)
leader(ax, 14.4, 21.5, 13.2, 21.2, C_ABDOM)

label(ax, 14.5, 19.5, 'Gonadal A.\n(Testicular/Ovarian)', C_ABDOM, fs=6.0)
leader(ax, 14.4, 19.5, 12.4, 19.0, C_ABDOM)

label(ax, 14.5, 16.5, 'Inf. Epigastric A.\n(Anastomoses with\nSup. Epigastric)', C_CONNECT, fs=6.0)
leader(ax, 14.4, 16.5, 12.2, 17.5, C_CONNECT)

# --- PELVIS ---
label(ax, 7.5, 14.5, 'R. Common Iliac A.', C_PELVIS, fs=6.2, ha='right')
leader(ax, 7.6, 14.5, 9.8, 15.0, C_PELVIS)

label(ax, 7.5, 13.8, 'R. External Iliac A.', C_PELVIS, fs=6.2, ha='right')
leader(ax, 7.6, 13.8, 9.3, 14.0, C_PELVIS)

label(ax, 7.5, 13.1, 'R. Internal Iliac A.\n(Hypogastric)', C_PELVIS, fs=6.0, ha='right')
leader(ax, 7.6, 13.1, 9.8, 13.5, C_PELVIS)

label(ax, 14.5, 14.5, 'L. Common Iliac A.', C_PELVIS, fs=6.2)
leader(ax, 14.4, 14.5, 12.5, 15.0, C_PELVIS)

label(ax, 14.5, 13.8, 'L. External Iliac A.', C_PELVIS, fs=6.2)
leader(ax, 14.4, 13.8, 13.1, 14.0, C_PELVIS)

label(ax, 14.5, 13.1, 'L. Internal Iliac A.\n↳ Sup. Gluteal\n↳ Obturator\n↳ Uterine/Vesical', C_PELVIS, fs=6.0)
leader(ax, 14.4, 13.1, 12.5, 13.5, C_PELVIS)

# --- LOWER LIMB ---
label(ax, 7.5, 12.0, 'R. Femoral A.', C_LOWER, fs=6.2, ha='right')
leader(ax, 7.6, 12.0, 9.5, 12.0, C_LOWER)

label(ax, 7.5, 11.0, 'Profunda Femoris A.\n↳ Med/Lat Circumflex\n↳ Perforating A. x4', C_LOWER, fs=6.0, ha='right')
leader(ax, 7.6, 11.0, 8.8, 11.5, C_LOWER)

label(ax, 7.5, 9.2, 'R. Popliteal A.', C_LOWER, fs=6.2, ha='right')
leader(ax, 7.6, 9.2, 9.8, 9.0, C_LOWER)

label(ax, 7.5, 8.5, 'Genicular\nAnastomosis', C_CONNECT, fs=6.0, ha='right')
leader(ax, 7.6, 8.5, 9.4, 9.0, C_CONNECT)

label(ax, 7.5, 7.2, 'R. Ant. Tibial A.', C_LOWER, fs=6.2, ha='right')
leader(ax, 7.6, 7.2, 9.4, 7.0, C_LOWER)

label(ax, 7.5, 6.5, 'R. Post. Tibial A.', C_LOWER, fs=6.2, ha='right')
leader(ax, 7.6, 6.5, 10.3, 6.5, C_LOWER)

label(ax, 7.5, 5.8, 'R. Fibular A.', C_LOWER, fs=6.2, ha='right')
leader(ax, 7.6, 5.8, 10.5, 6.5, C_LOWER)

label(ax, 7.5, 5.0, 'Dorsalis Pedis A.', C_LOWER, fs=6.2, ha='right')
leader(ax, 7.6, 5.0, 9.2, 5.2, C_LOWER)

label(ax, 7.5, 4.3, 'Plantar Arch\n(Medial + Lateral)', C_CONNECT, fs=6.0, ha='right')
leader(ax, 7.6, 4.3, 9.5, 4.8, C_CONNECT)

# RIGHT LOWER LIMB labels
label(ax, 14.5, 12.0, 'L. Femoral A.', C_LOWER, fs=6.2)
leader(ax, 14.4, 12.0, 12.9, 12.0, C_LOWER)

label(ax, 14.5, 9.2, 'L. Popliteal A.', C_LOWER, fs=6.2)
leader(ax, 14.4, 9.2, 12.6, 9.0, C_LOWER)

label(ax, 14.5, 7.2, 'L. Ant. Tibial A.', C_LOWER, fs=6.2)
leader(ax, 14.4, 7.2, 13.0, 7.0, C_LOWER)

label(ax, 14.5, 6.5, 'L. Post. Tibial A.', C_LOWER, fs=6.2)
leader(ax, 14.4, 6.5, 12.1, 6.5, C_LOWER)

label(ax, 14.5, 5.0, 'L. Dorsalis Pedis A.', C_LOWER, fs=6.2)
leader(ax, 14.4, 5.0, 13.2, 5.2, C_LOWER)

label(ax, 14.5, 4.3, 'L. Plantar Arch', C_CONNECT, fs=6.2)
leader(ax, 14.4, 4.3, 12.8, 4.8, C_CONNECT)

# ─────────────────────────────────────────────
# COLOR LEGEND (bottom)
# ─────────────────────────────────────────────
legend_items = [
    (C_AORTA,   'Aorta (Main Trunk)'),
    (C_HEAD,    'Head, Neck & Carotids'),
    (C_UPPER,   'Upper Limb'),
    (C_HEART,   'Coronary Arteries'),
    (C_THORAX,  'Thoracic Branches'),
    (C_ABDOM,   'Abdominal Branches'),
    (C_PELVIS,  'Iliac / Pelvis'),
    (C_LOWER,   'Lower Limb'),
    (C_CONNECT, 'Anastomoses / Arches'),
]
lx0 = 0.3
ly0 = 3.6
ax.text(11, ly0 + 0.3, 'COLOUR KEY', ha='center', fontsize=8, color='white', fontweight='bold')
for i, (col, txt) in enumerate(legend_items):
    col_x = lx0 + (i % 5) * 4.3
    col_y = ly0 - (i // 5) * 0.55
    rect = FancyBboxPatch((col_x, col_y-0.18), 0.35, 0.36,
                           boxstyle='round,pad=0.04', facecolor=col, zorder=8)
    ax.add_patch(rect)
    ax.text(col_x + 0.45, col_y, txt, fontsize=6.5, color='white', va='center', zorder=9)

ax.text(11, 0.28, "Source: Gray's Anatomy for Students  |  MBBS Year 1  |  All connections shown",
        ha='center', fontsize=7.5, color='#666666', style='italic')

plt.tight_layout(pad=0.2)
plt.savefig('/home/daytona/workspace/arterial-mindmaps/body_arteries_full.png',
            dpi=200, bbox_inches='tight', facecolor='#0a0a0f')
print("Saved body diagram!")
Running Command

cd /home/daytona/workspace/arterial-mindmaps && python body_arteries.py 2>&1 | grep -v "UserWarning\|missing from font\|Glyph\|tight_layout\|plt.savefig"

Editing File

~/arterial-mindmaps/body_arteries.py

Successfully replaced 1 instance(s) of the string in '/home/daytona/workspace/arterial-mindmaps/body_arteries.py'
Running Command

cd /home/daytona/workspace/arterial-mindmaps && python body_arteries.py 2>&1 | grep -E "Error|Traceback|Saved|saved"

Running Command

cd /home/daytona/workspace/arterial-mindmaps && python body_arteries.py 2>&1 | grep -n "line\|Error\|Saved"

Reading File
Editing File

~/arterial-mindmaps/body_arteries.py

Successfully replaced 1 instance(s) of the string in '/home/daytona/workspace/arterial-mindmaps/body_arteries.py'
Running Command

cd /home/daytona/workspace/arterial-mindmaps && python body_arteries.py 2>&1 | grep -E "Error|Traceback|Saved|saved|line [0-9]"

Running Command

python3 - <<'EOF' from reportlab.lib.pagesizes import A2, portrait from reportlab.platypus import SimpleDocTemplate, Image, Paragraph, Spacer from reportlab.lib.styles import ParagraphStyle from reportlab.lib.units import mm from reportlab.lib import colors import os output = '/home/daytona/workspace/arterial-mindmaps/Human_Body_Arteries_Complete.pdf' img_path = '/home/daytona/workspace/arterial-mindmaps/body_arteries_full.png' pw, ph = portrait(A2) # A2 = 420 x 594 mm portrait — great for detailed diagrams doc = SimpleDocTemplate( output, pagesize=portrait(A2), leftMargin=6*mm, rightMargin=6*mm, topMargin=6*mm, bottomMargin=6*mm, title='Arterial Supply of the Human Body - Complete Diagram', author='Orris Medical Assistant' ) title_style = ParagraphStyle( 'title', fontName='Helvetica-Bold', fontSize=12, textColor=colors.white, backColor=colors.HexColor('#8B0000'), alignment=1, spaceBefore=2*mm, spaceAfter=2*mm, borderPad=5 ) sub_style = ParagraphStyle( 'sub', fontName='Helvetica', fontSize=8, textColor=colors.HexColor('#444444'), alignment=1, spaceAfter=2*mm ) usable_w = pw - 12*mm usable_h = ph - 12*mm - 28 story = [ Paragraph('COMPLETE ARTERIAL SUPPLY OF THE HUMAN BODY | MBBS Year 1 Anatomy', title_style), Paragraph("All arteries labeled on anatomical body diagram with color-coded systems and anastomoses | Source: Gray's Anatomy for Students", sub_style), Image(img_path, width=usable_w, height=usable_h) ] doc.build(story) sz = os.path.getsize(output) // 1024 print(f"PDF saved: {output} ({sz} KB)") EOF

Here's your complete body diagram PDF:

Human Body Arteries Complete

PDF Document · PDF

(~1.3 MB, A2 portrait, single page)

What's in the diagram:
The full human body silhouette is drawn with every artery mapped to its anatomical position, color-coded by system:
ColorSystem
🔴 Bright RedAorta - main trunk (ascending, arch, descending, abdominal)
🟠 OrangeHead & neck - carotids, vertebral, facial, thyroid, basilar
🩵 TealUpper limb - subclavian, axillary, brachial, radial, ulnar
🩷 PinkCoronary arteries - RCA, LAD, Circumflex, PDA
🟣 PurpleThoracic branches - intercostals, internal thoracic
🔵 BlueAbdominal - celiac, SMA, IMA, renals, suprarenal, gonadal
🩵 CyanIliac / Pelvis - common, external, internal iliac + branches
🟢 GreenLower limb - femoral, profunda, popliteal, tibial, pedal arteries
🟡 YellowAnastomoses - palmar arches, plantar arch, genicular ring, epigastric connection
Print tip: Print on A2 or A3 for full detail. All labels have leader lines pointing to the exact vessel on the body.
This is a shared conversation. Sign in to Orris to start your own chat.