Create a PPT on e topic intraembryonic coelom
mkdir -p /tmp/workspace/intraembryonic-coelom-ppt && ls /tmp/workspace/intraembryonic-coelom-ppt/
~/intraembryonic-coelom-ppt/create_ppt.py
from pptx import Presentation
from pptx.util import Inches, Pt, Emu
from pptx.dml.color import RGBColor
from pptx.enum.text import PP_ALIGN, MSO_ANCHOR
from pptx.util import Inches, Pt
import json, subprocess, base64
from io import BytesIO
# ── Colour palette ──────────────────────────────────────────────────────────
DEEP_BLUE = RGBColor(0x1A, 0x3A, 0x6C) # slide header / title bar
MID_BLUE = RGBColor(0x1F, 0x6E, 0xA6) # accent boxes
LIGHT_BLUE = RGBColor(0xD6, 0xE8, 0xF7) # body bg tint
WHITE = RGBColor(0xFF, 0xFF, 0xFF)
DARK_TEXT = RGBColor(0x1A, 0x1A, 0x2E)
ACCENT = RGBColor(0xE8, 0x4A, 0x27) # highlight / bullets
GREY_BG = RGBColor(0xF4, 0xF7, 0xFB)
prs = Presentation()
prs.slide_width = Inches(13.333)
prs.slide_height = Inches(7.5)
blank = prs.slide_layouts[6] # fully blank
# ── Helper functions ─────────────────────────────────────────────────────────
def add_rect(slide, x, y, w, h, fill_rgb, alpha=None):
shape = slide.shapes.add_shape(
1, # MSO_SHAPE_TYPE.RECTANGLE
Inches(x), Inches(y), Inches(w), Inches(h)
)
shape.line.fill.background()
shape.fill.solid()
shape.fill.fore_color.rgb = fill_rgb
return shape
def add_text(slide, text, x, y, w, h,
font_size=18, bold=False, color=DARK_TEXT,
align=PP_ALIGN.LEFT, italic=False,
word_wrap=True, v_anchor=MSO_ANCHOR.TOP):
tb = slide.shapes.add_textbox(Inches(x), Inches(y), Inches(w), Inches(h))
tf = tb.text_frame
tf.word_wrap = word_wrap
tf.vertical_anchor = v_anchor
tf.margin_left = Pt(4)
tf.margin_right = Pt(4)
tf.margin_top = Pt(2)
tf.margin_bottom= Pt(2)
p = tf.paragraphs[0]
p.alignment = align
run = p.add_run()
run.text = text
run.font.size = Pt(font_size)
run.font.bold = bold
run.font.italic = italic
run.font.color.rgb = color
run.font.name = "Calibri"
return tf
def add_multiline(slide, lines, x, y, w, h,
font_size=17, color=DARK_TEXT, bullet=True,
line_spacing_pt=6):
"""lines = list of strings; each on its own paragraph with a bullet symbol."""
tb = slide.shapes.add_textbox(Inches(x), Inches(y), Inches(w), Inches(h))
tf = tb.text_frame
tf.word_wrap = True
tf.margin_left = Pt(4)
tf.margin_right = Pt(4)
tf.margin_top = Pt(2)
tf.margin_bottom = Pt(2)
from pptx.oxml.ns import qn
from lxml import etree
for i, line in enumerate(lines):
if i == 0:
p = tf.paragraphs[0]
else:
p = tf.add_paragraph()
p.space_before = Pt(line_spacing_pt)
p.alignment = PP_ALIGN.LEFT
run = p.add_run()
run.text = ("• " if bullet else "") + line
run.font.size = Pt(font_size)
run.font.color.rgb = color
run.font.name = "Calibri"
return tf
def title_bar(slide, title, subtitle=None):
"""Top header bar across full width."""
add_rect(slide, 0, 0, 13.333, 1.1, DEEP_BLUE)
add_text(slide, title,
0.25, 0.05, 12.8, 0.9,
font_size=32, bold=True, color=WHITE,
align=PP_ALIGN.LEFT, v_anchor=MSO_ANCHOR.MIDDLE)
if subtitle:
add_text(slide, subtitle,
0.25, 0.72, 12.8, 0.38,
font_size=14, color=RGBColor(0xB0, 0xCF, 0xF0),
align=PP_ALIGN.LEFT)
def fetch_image(url):
result = json.loads(subprocess.check_output(
["python", "/tmp/skills/shared/scripts/fetch_images.py", url]
))
if result and result[0]["base64"]:
raw = base64.b64decode(result[0]["base64"].split(",",1)[1])
return BytesIO(raw)
return None
# ════════════════════════════════════════════════════════════════════════════
# SLIDE 1 – Title
# ════════════════════════════════════════════════════════════════════════════
slide = prs.slides.add_slide(blank)
# Deep blue background
add_rect(slide, 0, 0, 13.333, 7.5, DEEP_BLUE)
# Decorative accent stripe
add_rect(slide, 0, 5.5, 13.333, 0.08, ACCENT)
# Decorative light-blue box on right
add_rect(slide, 9.0, 1.2, 4.0, 4.0, MID_BLUE)
# Main title
add_text(slide, "Intraembryonic Coelom",
0.6, 1.8, 8.2, 1.8,
font_size=48, bold=True, color=WHITE,
align=PP_ALIGN.LEFT, v_anchor=MSO_ANCHOR.MIDDLE)
# Subtitle
add_text(slide, "Development of Embryonic Body Cavities",
0.6, 3.5, 8.0, 0.6,
font_size=22, color=RGBColor(0xB0, 0xCF, 0xF0),
align=PP_ALIGN.LEFT)
# Bottom info
add_text(slide, "Source: The Developing Human – Clinically Oriented Embryology",
0.6, 6.5, 8.0, 0.5,
font_size=12, color=RGBColor(0x80, 0xA0, 0xC8),
align=PP_ALIGN.LEFT)
# Right-box label
add_text(slide, "Embryology",
9.3, 1.5, 3.4, 0.5,
font_size=18, bold=True, color=WHITE,
align=PP_ALIGN.CENTER)
add_text(slide, "3rd – 8th Week\nof Development",
9.3, 2.1, 3.4, 1.0,
font_size=22, bold=False, color=RGBColor(0xD6, 0xE8, 0xF7),
align=PP_ALIGN.CENTER)
# ════════════════════════════════════════════════════════════════════════════
# SLIDE 2 – Overview / Introduction
# ════════════════════════════════════════════════════════════════════════════
slide = prs.slides.add_slide(blank)
add_rect(slide, 0, 0, 13.333, 7.5, GREY_BG)
title_bar(slide, "What is the Intraembryonic Coelom?")
# Left column — definition box
add_rect(slide, 0.3, 1.3, 5.8, 5.7, WHITE)
add_rect(slide, 0.3, 1.3, 5.8, 0.45, MID_BLUE)
add_text(slide, "DEFINITION",
0.35, 1.3, 5.7, 0.45,
font_size=14, bold=True, color=WHITE, align=PP_ALIGN.LEFT,
v_anchor=MSO_ANCHOR.MIDDLE)
add_text(slide,
"The intraembryonic coelom (also called the embryonic body cavity) "
"is the fluid-filled space that forms within the lateral plate mesoderm "
"of the embryo. It is the precursor to all major serous body cavities "
"of the adult.",
0.45, 1.85, 5.5, 2.4,
font_size=16, color=DARK_TEXT)
add_rect(slide, 0.3, 4.4, 5.8, 0.45, MID_BLUE)
add_text(slide, "KEY TERM",
0.35, 4.4, 5.7, 0.45,
font_size=14, bold=True, color=WHITE, v_anchor=MSO_ANCHOR.MIDDLE)
add_text(slide,
"Coelom = Greek for 'hollow'\n"
"Intraembryonic = within the embryo\n"
"(distinct from extraembryonic coelom in chorionic cavity)",
0.45, 4.95, 5.5, 1.9,
font_size=15, color=DARK_TEXT)
# Right column — quick facts
add_rect(slide, 6.6, 1.3, 6.4, 5.7, WHITE)
add_rect(slide, 6.6, 1.3, 6.4, 0.45, DEEP_BLUE)
add_text(slide, "QUICK FACTS",
6.65, 1.3, 6.3, 0.45,
font_size=14, bold=True, color=WHITE, v_anchor=MSO_ANCHOR.MIDDLE)
facts = [
"Appears at end of 3rd week of development",
"Originates in lateral plate mesoderm and cardiogenic mesoderm",
"Initially forms as isolated coelomic spaces",
"Spaces coalesce into a horseshoe-shaped cavity",
"Divides lateral mesoderm into somatic and splanchnic layers",
"By 4th week → divided into 3 body cavities",
"Connected with extraembryonic coelom at umbilicus",
"Connection lost by 11th week as intestines return to abdomen",
]
add_multiline(slide, facts, 6.75, 1.85, 6.1, 5.0,
font_size=15, color=DARK_TEXT)
# ════════════════════════════════════════════════════════════════════════════
# SLIDE 3 – Origin & Formation
# ════════════════════════════════════════════════════════════════════════════
slide = prs.slides.add_slide(blank)
add_rect(slide, 0, 0, 13.333, 7.5, GREY_BG)
title_bar(slide, "Origin & Formation", subtitle="3rd – 4th Week of Development")
# Steps numbered boxes
steps = [
("1", "Coelomic Spaces Appear",
"Isolated intercellular spaces appear in the lateral intraembryonic "
"mesoderm and the cardiogenic (heart-forming) mesoderm around day 17–19."),
("2", "Coalescence",
"These isolated spaces merge together to form a single "
"horseshoe-shaped (U-shaped) cavity — the intraembryonic coelom. "
"The bend of the horseshoe represents the future pericardial cavity."),
("3", "Lateral Plate Mesoderm Split",
"The coelom splits the lateral plate mesoderm into two distinct layers:\n"
" (a) Somatic (parietal) mesoderm — lines the body wall\n"
" (b) Splanchnic (visceral) mesoderm — wraps around gut"),
("4", "Continuity with Extraembryonic Coelom",
"At this stage, the right and left limbs of the horseshoe-shaped "
"cavity communicate freely with the extraembryonic coelom (chorionic cavity)."),
]
box_w = 5.8
box_h = 1.48
col_x = [0.3, 7.0]
row_y = [1.25, 3.8]
for i, (num, heading, body) in enumerate(steps):
cx = col_x[i % 2]
cy = row_y[i // 2]
add_rect(slide, cx, cy, box_w, box_h, WHITE)
# number circle using small rect
add_rect(slide, cx, cy, 0.55, box_h, DEEP_BLUE)
add_text(slide, num,
cx, cy, 0.55, box_h,
font_size=28, bold=True, color=WHITE,
align=PP_ALIGN.CENTER, v_anchor=MSO_ANCHOR.MIDDLE)
add_text(slide, heading,
cx + 0.6, cy + 0.05, box_w - 0.7, 0.38,
font_size=15, bold=True, color=DEEP_BLUE)
add_text(slide, body,
cx + 0.6, cy + 0.42, box_w - 0.7, box_h - 0.48,
font_size=13, color=DARK_TEXT)
# Bottom note
add_rect(slide, 0.3, 6.85, 12.7, 0.5, LIGHT_BLUE)
add_text(slide,
"Note: The bend (cranial end) of the horseshoe = future pericardial cavity; "
"the two limbs extend caudally to form future peritoneal cavity regions.",
0.5, 6.87, 12.4, 0.46,
font_size=13, color=MID_BLUE, italic=True)
# ════════════════════════════════════════════════════════════════════════════
# SLIDE 4 – Layers formed
# ════════════════════════════════════════════════════════════════════════════
slide = prs.slides.add_slide(blank)
add_rect(slide, 0, 0, 13.333, 7.5, GREY_BG)
title_bar(slide, "Layers Formed by the Intraembryonic Coelom")
# Central dividing line
add_rect(slide, 6.45, 1.25, 0.08, 5.9, MID_BLUE)
# Left — Somatic / Parietal
add_rect(slide, 0.3, 1.25, 5.8, 0.5, DEEP_BLUE)
add_text(slide, "SOMATIC (PARIETAL) LAYER",
0.35, 1.25, 5.7, 0.5,
font_size=15, bold=True, color=WHITE, v_anchor=MSO_ANCHOR.MIDDLE)
s_points = [
"Located beneath the embryonic ectoderm",
"Continuous with extraembryonic mesoderm covering the amnion",
"Together with ectoderm → forms somatopleure (embryonic body wall)",
"Gives rise to parietal peritoneum, parietal pleura, serous pericardium",
"Becomes the lining of chest and abdominal walls",
"Contributes to musculoskeletal elements of the trunk",
]
add_multiline(slide, s_points, 0.35, 1.85, 5.6, 4.5, font_size=15)
# Right — Splanchnic / Visceral
add_rect(slide, 6.6, 1.25, 6.4, 0.5, ACCENT)
add_text(slide, "SPLANCHNIC (VISCERAL) LAYER",
6.65, 1.25, 6.3, 0.5,
font_size=15, bold=True, color=WHITE, v_anchor=MSO_ANCHOR.MIDDLE)
v_points = [
"Located adjacent to the embryonic endoderm",
"Continuous with extraembryonic mesoderm covering umbilical vesicle",
"Together with endoderm → forms splanchnopleure (embryonic gut)",
"Gives rise to visceral peritoneum, visceral pleura, epicardium",
"Surrounds the primordial gut to form dorsal mesentery",
"Contributes to walls of GI tract, lungs, and heart",
]
add_multiline(slide, v_points, 6.65, 1.85, 6.2, 4.5, font_size=15)
# Bottom summary row
add_rect(slide, 0.3, 6.5, 12.7, 0.75, LIGHT_BLUE)
add_text(slide,
"Somatopleure = Somatic mesoderm + Ectoderm | Splanchnopleure = Splanchnic mesoderm + Endoderm",
0.5, 6.5, 12.4, 0.75,
font_size=16, bold=True, color=DEEP_BLUE,
align=PP_ALIGN.CENTER, v_anchor=MSO_ANCHOR.MIDDLE)
# ════════════════════════════════════════════════════════════════════════════
# SLIDE 5 – Embryonic Folding & Coelom
# ════════════════════════════════════════════════════════════════════════════
slide = prs.slides.add_slide(blank)
add_rect(slide, 0, 0, 13.333, 7.5, GREY_BG)
title_bar(slide, "Embryonic Folding & Its Effect on the Coelom",
subtitle="4th Week – Head, Tail, and Lateral Folds")
fold_events = [
("Head Fold",
"The heart and pericardial cavity are relocated ventrally, "
"anterior to the foregut. The pericardial coelom now lies "
"ventral to the heart and cranial to the septum transversum."),
("Tail Fold",
"Brings the connecting stalk and cloacal membrane to the "
"ventral surface of the embryo. The hindgut and future peritoneal "
"cavity are defined caudally."),
("Lateral Folds",
"The two lateral aspects of the horseshoe-shaped coelom fold "
"ventrally and merge, enclosing the gut tube. This closes the "
"ventral body wall (except at the umbilicus / connecting stalk)."),
("After Folding",
"The intraembryonic coelom communicates with the extraembryonic "
"coelom via a reducing opening. Splanchnic mesoderm surrounds "
"the primordial gut, forming the dorsal mesentery."),
]
bw = 5.9
bh = 2.3
positions = [(0.25, 1.2), (7.1, 1.2), (0.25, 3.7), (7.1, 3.7)]
colors = [DEEP_BLUE, MID_BLUE, MID_BLUE, DEEP_BLUE]
for (x, y), (head, body), col in zip(positions, fold_events, colors):
add_rect(slide, x, y, bw, bh, WHITE)
add_rect(slide, x, y, bw, 0.42, col)
add_text(slide, head,
x + 0.1, y, bw - 0.2, 0.42,
font_size=15, bold=True, color=WHITE, v_anchor=MSO_ANCHOR.MIDDLE)
add_text(slide, body,
x + 0.15, y + 0.5, bw - 0.3, bh - 0.55,
font_size=14, color=DARK_TEXT)
# Bottom note
add_rect(slide, 0.25, 6.15, 12.8, 0.7, LIGHT_BLUE)
add_text(slide,
"Key outcome: Lateral folding gives the embryo a CYLINDRICAL form and "
"defines the ventral body wall. The ventral mesentery transiently divides the peritoneal cavity "
"into right and left halves, then disappears (except near stomach/duodenum).",
0.4, 6.15, 12.5, 0.7,
font_size=13, color=MID_BLUE, italic=True, v_anchor=MSO_ANCHOR.MIDDLE)
# ════════════════════════════════════════════════════════════════════════════
# SLIDE 6 – Division into 3 Cavities
# ════════════════════════════════════════════════════════════════════════════
slide = prs.slides.add_slide(blank)
add_rect(slide, 0, 0, 13.333, 7.5, GREY_BG)
title_bar(slide, "Division of the Intraembryonic Coelom",
subtitle="4th–8th Week: Formation of Three Body Cavities")
# Timeline arrow
add_rect(slide, 0.4, 1.25, 12.5, 0.12, DEEP_BLUE)
for xp, label in [(0.4, "3rd Wk"), (4.3, "4th Wk"), (7.8, "5th–6th Wk"), (11.5, "7th–8th Wk")]:
add_rect(slide, xp - 0.08, 1.19, 0.25, 0.25, ACCENT)
add_text(slide, label, xp - 0.4, 1.45, 1.3, 0.35,
font_size=11, color=DARK_TEXT, align=PP_ALIGN.CENTER)
cavities = [
("PERICARDIAL\nCAVITY", DEEP_BLUE,
[
"Surrounds the developing heart",
"Cranial bend of horseshoe coelom",
"Separated from pleural cavities by pleuropericardial membranes",
"Pleuropericardial membranes contain phrenic nerves & common cardinal veins",
"Forms fibrous pericardium",
]),
("PLEURAL\nCAVITIES (×2)", MID_BLUE,
[
"Develop from pericardioperitoneal canals",
"Lung buds grow into the canals → expand laterally",
"Pleuropericardial folds separate from pericardial cavity",
"Pleuroperitoneal folds close caudally (→ diaphragm primordium)",
"Each pleural cavity lined by parietal + visceral pleura",
]),
("PERITONEAL\nCAVITY", ACCENT,
[
"Largest body cavity; forms in abdominal region",
"Connected with extraembryonic coelom at umbilicus",
"Connection closes at 11th week when intestines return",
"Lined by parietal & visceral peritoneum",
"Coelomic epithelium contributes to heart, lungs, and GI tract",
]),
]
cw = 3.9
cx_list = [0.3, 4.6, 8.9]
for cx, (cav_name, cav_color, points) in zip(cx_list, cavities):
add_rect(slide, cx, 1.9, cw, 5.3, WHITE)
add_rect(slide, cx, 1.9, cw, 0.75, cav_color)
add_text(slide, cav_name, cx + 0.1, 1.9, cw - 0.2, 0.75,
font_size=16, bold=True, color=WHITE,
align=PP_ALIGN.CENTER, v_anchor=MSO_ANCHOR.MIDDLE)
add_multiline(slide, points, cx + 0.15, 2.75, cw - 0.3, 4.2,
font_size=13.5, color=DARK_TEXT)
# ════════════════════════════════════════════════════════════════════════════
# SLIDE 7 – Septum Transversum & Diaphragm
# ════════════════════════════════════════════════════════════════════════════
slide = prs.slides.add_slide(blank)
add_rect(slide, 0, 0, 13.333, 7.5, GREY_BG)
title_bar(slide, "Septum Transversum & Diaphragm Formation",
subtitle="Key Partition That Separates Thoracic from Abdominal Cavity")
# Left info
add_rect(slide, 0.3, 1.25, 5.9, 5.9, WHITE)
add_rect(slide, 0.3, 1.25, 5.9, 0.45, DEEP_BLUE)
add_text(slide, "SEPTUM TRANSVERSUM",
0.35, 1.25, 5.8, 0.45,
font_size=14, bold=True, color=WHITE, v_anchor=MSO_ANCHOR.MIDDLE)
sep_pts = [
"Plate of mesodermal tissue — primordium of central tendon of diaphragm",
"Initially lies opposite 3rd–5th cervical somites (C3–C5)",
"Head fold relocates it to region of future diaphragm",
"Partially separates primitive pericardial cavity from peritoneal cavity ventrally",
"Contains TWO openings — the pericardioperitoneal canals (one on each side of foregut)",
"These canals connect pericardial cavity with peritoneal cavity",
"Fuses with pleuroperitoneal membranes + dorsal mesentery of esophagus",
"= Primordial DIAPHRAGM is formed",
]
add_multiline(slide, sep_pts, 0.4, 1.8, 5.65, 5.2, font_size=14)
# Right — diaphragm components
add_rect(slide, 6.6, 1.25, 6.4, 5.9, WHITE)
add_rect(slide, 6.6, 1.25, 6.4, 0.45, ACCENT)
add_text(slide, "COMPONENTS OF THE DIAPHRAGM",
6.65, 1.25, 6.3, 0.45,
font_size=14, bold=True, color=WHITE, v_anchor=MSO_ANCHOR.MIDDLE)
comp_data = [
("Septum Transversum", "Central tendon"),
("Pleuroperitoneal Membranes", "Posterolateral portions"),
("Dorsal Mesentery of Esophagus", "Crura of diaphragm"),
("Lateral Body Wall Mesenchyme", "Peripheral muscular portions (9th–12th week)"),
]
row_y_start = 1.85
for comp, derived in comp_data:
add_rect(slide, 6.7, row_y_start, 2.8, 0.9, LIGHT_BLUE)
add_text(slide, comp, 6.8, row_y_start, 2.7, 0.9,
font_size=13, bold=True, color=DEEP_BLUE, v_anchor=MSO_ANCHOR.MIDDLE)
add_rect(slide, 9.55, row_y_start, 3.3, 0.9, WHITE)
add_rect(slide, 9.55, row_y_start, 0.05, 0.9, MID_BLUE)
add_text(slide, derived, 9.65, row_y_start, 3.1, 0.9,
font_size=13, color=DARK_TEXT, v_anchor=MSO_ANCHOR.MIDDLE)
row_y_start += 1.05
# Phrenic nerve note
add_rect(slide, 6.65, 5.85, 6.3, 1.2, LIGHT_BLUE)
add_text(slide,
"Phrenic Nerve Innervation of Diaphragm:\n"
"Myoblasts from C3, C4, C5 somites migrate into the developing diaphragm "
"carrying their nerve fibres → phrenic nerve supplies motor innervation (C3, C4, C5).",
6.75, 5.87, 6.1, 1.15,
font_size=13, color=DEEP_BLUE)
# ════════════════════════════════════════════════════════════════════════════
# SLIDE 8 – Pericardioperitoneal Canals
# ════════════════════════════════════════════════════════════════════════════
slide = prs.slides.add_slide(blank)
add_rect(slide, 0, 0, 13.333, 7.5, GREY_BG)
title_bar(slide, "Pericardioperitoneal Canals",
subtitle="Transitional Conduits Between Pericardial and Peritoneal Cavities")
canal_info = [
("Location",
"Lateral to the proximal foregut (future esophagus) and dorsal to the septum transversum. "
"One canal on each side of the foregut."),
("Function",
"Transiently connect the pericardial cavity with the peritoneal (abdominal) cavity "
"during the 4th–5th week of embryonic development."),
("Pleuropericardial Folds",
"CRANIAL ridges in the lateral canal wall. They grow medially as the lung buds expand, "
"eventually fusing to separate the PLEURAL cavities from the PERICARDIAL cavity. "
"These membranes contain the phrenic nerves and common cardinal veins."),
("Pleuroperitoneal Folds",
"CAUDAL ridges in the lateral canal wall. They grow medially from the dorsal body wall "
"and fuse with the septum transversum, closing the canals and separating "
"the PLEURAL cavities from the PERITONEAL cavity."),
("Clinical Relevance",
"Failure of the pleuroperitoneal folds to close results in "
"Congenital Diaphragmatic Hernia (CDH), most commonly on the left side (Bochdalek hernia). "
"Abdominal organs herniate into the pleural cavity, compressing the developing lung."),
]
bh2 = 1.02
by = 1.28
bw2 = 12.7
for head, body in canal_info:
add_rect(slide, 0.3, by, bw2, bh2, WHITE)
add_rect(slide, 0.3, by, 2.9, bh2, DEEP_BLUE)
add_text(slide, head,
0.35, by, 2.8, bh2,
font_size=14, bold=True, color=WHITE, v_anchor=MSO_ANCHOR.MIDDLE)
add_text(slide, body,
3.3, by + 0.05, 9.5, bh2 - 0.1,
font_size=13.5, color=DARK_TEXT, v_anchor=MSO_ANCHOR.MIDDLE)
by += bh2 + 0.06
# ════════════════════════════════════════════════════════════════════════════
# SLIDE 9 – Mesenteries
# ════════════════════════════════════════════════════════════════════════════
slide = prs.slides.add_slide(blank)
add_rect(slide, 0, 0, 13.333, 7.5, GREY_BG)
title_bar(slide, "Mesenteries of the Peritoneal Cavity",
subtitle="Double Peritoneal Folds Supporting the Gut")
# Left col
add_rect(slide, 0.3, 1.25, 6.0, 5.9, WHITE)
add_rect(slide, 0.3, 1.25, 6.0, 0.45, DEEP_BLUE)
add_text(slide, "DORSAL MESENTERY",
0.35, 1.25, 5.9, 0.45,
font_size=14, bold=True, color=WHITE, v_anchor=MSO_ANCHOR.MIDDLE)
dm_pts = [
"Persists throughout the gut from esophagus to rectum",
"Connects the primordial gut to the posterior body wall",
"Conveys blood vessels, nerves, and lymphatics to the gut",
"Arterial supply through mesentery layers:",
" – Celiac trunk → foregut",
" – Superior mesenteric artery → midgut",
" – Inferior mesenteric artery → hindgut",
"Forms the mesentery proper, transverse mesocolon, sigmoid mesocolon, mesoappendix",
"Crura of diaphragm develop from myoblasts in dorsal mesentery of esophagus",
]
add_multiline(slide, dm_pts, 0.4, 1.8, 5.75, 5.2, font_size=14)
# Right col
add_rect(slide, 6.8, 1.25, 6.2, 5.9, WHITE)
add_rect(slide, 6.8, 1.25, 6.2, 0.45, ACCENT)
add_text(slide, "VENTRAL MESENTERY",
6.85, 1.25, 6.1, 0.45,
font_size=14, bold=True, color=WHITE, v_anchor=MSO_ANCHOR.MIDDLE)
vm_pts = [
"Exists only in the caudal part of the foregut region",
"Attaches to stomach and proximal duodenum",
"Transitorily divides peritoneal cavity into right and left halves",
"Disappears in most regions → cavity becomes continuous space",
"Persists as:",
" – Lesser omentum (hepatogastric & hepatoduodenal ligaments)",
" – Falciform ligament of liver",
"Liver develops within its layers",
"When ventral mesentery disappears → large peritoneal cavity extends from heart to pelvis",
]
add_multiline(slide, vm_pts, 6.9, 1.8, 5.95, 5.2, font_size=14)
# ════════════════════════════════════════════════════════════════════════════
# SLIDE 10 – Clinical Correlations
# ════════════════════════════════════════════════════════════════════════════
slide = prs.slides.add_slide(blank)
add_rect(slide, 0, 0, 13.333, 7.5, GREY_BG)
title_bar(slide, "Clinical Correlations",
subtitle="Congenital Anomalies Related to Coelom Development")
clinical = [
("Congenital Diaphragmatic\nHernia (CDH)",
ACCENT,
[
"Failure of pleuroperitoneal folds to close pericardioperitoneal canal",
"80–85% left-sided (Bochdalek hernia)",
"Abdominal organs herniate into pleural cavity",
"Compresses developing lung → pulmonary hypoplasia",
"Incidence ~1:2000–3000 live births",
"Presents with respiratory distress at birth",
]),
("Congenital Pericardial\nDefect",
MID_BLUE,
[
"Premature atrophy of pleuropericardial membrane",
"Usually left-sided pericardial deficiency",
"Cardiac herniation into pleural cavity possible",
"Mostly asymptomatic; detected incidentally",
]),
("Omphalocele",
DEEP_BLUE,
[
"Persistence of connection between peritoneal cavity and extraembryonic coelom",
"Abdominal contents herniate into base of umbilical cord",
"Covered by peritoneum and amnion",
"Associated with chromosomal anomalies (Trisomy 13, 18)",
]),
("Congenital Peritoneal\nBands",
RGBColor(0x2E, 0x86, 0x48),
[
"Abnormal peritoneal folds from incomplete mesentery formation",
"Can cause intestinal obstruction",
"Ladd's bands — associated with intestinal malrotation",
]),
]
cw2 = 5.9
positions2 = [(0.3, 1.25), (7.1, 1.25), (0.3, 4.2), (7.1, 4.2)]
heights2 = [2.6, 2.6, 2.9, 2.9]
for (x, y), (heading, hcolor, pts), h in zip(positions2, clinical, heights2):
add_rect(slide, x, y, cw2, h, WHITE)
add_rect(slide, x, y, cw2, 0.55, hcolor)
add_text(slide, heading, x + 0.1, y, cw2 - 0.2, 0.55,
font_size=14, bold=True, color=WHITE, v_anchor=MSO_ANCHOR.MIDDLE)
add_multiline(slide, pts, x + 0.15, y + 0.62, cw2 - 0.3, h - 0.7,
font_size=13, color=DARK_TEXT)
# ════════════════════════════════════════════════════════════════════════════
# SLIDE 11 – Summary Table
# ════════════════════════════════════════════════════════════════════════════
slide = prs.slides.add_slide(blank)
add_rect(slide, 0, 0, 13.333, 7.5, GREY_BG)
title_bar(slide, "Summary: Development at a Glance")
headers = ["Week", "Event", "Cavity/Structure Formed"]
rows = [
["3rd week", "Isolated coelomic spaces in lateral plate mesoderm & cardiogenic mesoderm", "Precoelomic spaces"],
["4th week", "Spaces coalesce; horseshoe-shaped coelom established; embryonic folding", "Horseshoe-shaped intraembryonic coelom"],
["4th week", "Lateral fold closes body wall (except umbilicus)", "Primitive pericardial, peritoneal cavities"],
["5th week", "Lung buds grow into pericardioperitoneal canals; pleuropericardial folds develop", "Pleural cavities begin separation"],
["6th–7th wk", "Pleuropericardial membranes fuse → separate pericardial from pleural", "Definitive pericardial cavity"],
["7th–8th wk", "Pleuroperitoneal folds close; diaphragm primordium complete", "Pleural-peritoneal separation"],
["9th–12th wk", "Lungs enlarge; costodiaphragmatic recesses form", "Definitive diaphragm; dome-shaped configuration"],
["11th week", "Intestines return from umbilical cord to abdomen", "Peritoneal connection with extraembryonic coelom closes"],
]
# Table header
col_widths = [1.3, 7.2, 4.5]
col_x_pos = [0.3, 1.65, 8.9]
header_y = 1.25
hh = 0.48
for cx, cw3, h_text in zip(col_x_pos, col_widths, headers):
add_rect(slide, cx, header_y, cw3, hh, DEEP_BLUE)
add_text(slide, h_text, cx + 0.05, header_y, cw3 - 0.1, hh,
font_size=14, bold=True, color=WHITE,
align=PP_ALIGN.CENTER, v_anchor=MSO_ANCHOR.MIDDLE)
row_h = 0.62
ry = header_y + hh + 0.02
row_colors = [GREY_BG, WHITE]
for ri, row in enumerate(rows):
rcolor = row_colors[ri % 2]
for cx, cw3, cell_text in zip(col_x_pos, col_widths, row):
add_rect(slide, cx, ry, cw3, row_h, rcolor)
add_text(slide, cell_text, cx + 0.06, ry, cw3 - 0.12, row_h,
font_size=12, color=DARK_TEXT, v_anchor=MSO_ANCHOR.MIDDLE)
ry += row_h + 0.01
# ════════════════════════════════════════════════════════════════════════════
# SLIDE 12 – Key Points to Remember
# ════════════════════════════════════════════════════════════════════════════
slide = prs.slides.add_slide(blank)
add_rect(slide, 0, 0, 13.333, 7.5, DEEP_BLUE)
# Title area
add_text(slide, "Key Points to Remember",
0.5, 0.25, 12.3, 0.9,
font_size=36, bold=True, color=WHITE)
add_rect(slide, 0.5, 1.1, 12.3, 0.06, ACCENT)
key_points = [
"The intraembryonic coelom forms from coelomic spaces in lateral plate + cardiogenic mesoderm (end of 3rd week).",
"It is horseshoe-shaped; the cranial bend = future pericardial cavity; limbs = future peritoneal cavities.",
"It divides lateral mesoderm into somatic (parietal) and splanchnic (visceral) layers.",
"Somatic layer + ectoderm = SOMATOPLEURE; Splanchnic layer + endoderm = SPLANCHNOPLEURE.",
"Embryonic folding at 4th week closes the ventral body wall and transforms the embryo into a cylinder.",
"Three final cavities: Pericardial cavity, Two pleural cavities, Peritoneal cavity.",
"Septum transversum = primordium of central tendon of diaphragm; phrenic nerve = C3, C4, C5.",
"Pleuropericardial folds → separate pericardial from pleural cavities; contain phrenic nerve + cardinal veins.",
"Pleuroperitoneal folds → close pericardioperitoneal canals; failure = Congenital Diaphragmatic Hernia (CDH).",
"Peritoneal cavity connects to extraembryonic coelom at umbilicus until 11th week.",
]
kp_y = 1.25
for kp in key_points:
add_rect(slide, 0.5, kp_y, 12.3, 0.51, RGBColor(0x1F, 0x4E, 0x8C))
add_rect(slide, 0.5, kp_y, 0.06, 0.51, ACCENT)
add_text(slide, kp, 0.65, kp_y, 12.0, 0.51,
font_size=13.5, color=WHITE, v_anchor=MSO_ANCHOR.MIDDLE)
kp_y += 0.545
# Bottom
add_rect(slide, 0, 6.8, 13.333, 0.7, ACCENT)
add_text(slide, "Source: The Developing Human – Clinically Oriented Embryology | Fischer's Mastery of Surgery",
0.4, 6.82, 12.8, 0.55,
font_size=13, color=WHITE, align=PP_ALIGN.CENTER, v_anchor=MSO_ANCHOR.MIDDLE)
# ════════════════════════════════════════════════════════════════════════════
# SAVE
# ════════════════════════════════════════════════════════════════════════════
out = "/tmp/workspace/intraembryonic-coelom-ppt/Intraembryonic_Coelom.pptx"
prs.save(out)
print(f"Saved → {out}")
cd /tmp/workspace/intraembryonic-coelom-ppt && python create_ppt.py
python -c " from pptx import Presentation prs = Presentation('/tmp/workspace/intraembryonic-coelom-ppt/Intraembryonic_Coelom.pptx') print(f'Total slides: {len(prs.slides)}') for i, slide in enumerate(prs.slides, 1): texts = [] for shape in slide.shapes: if shape.has_text_frame: t = shape.text_frame.text.strip() if t: texts.append(t[:60]) print(f' Slide {i}: {\" | \".join(texts[:3])}') "
Intraembryonic Coelom
Presentation · PPTX
| # | Slide Title |
|---|---|
| 1 | Title Slide |
| 2 | What is the Intraembryonic Coelom? (definition + quick facts) |
| 3 | Origin & Formation (4 numbered steps, 3rd–4th week) |
| 4 | Layers Formed: Somatic vs Splanchnic mesoderm (somatopleure / splanchnopleure) |
| 5 | Embryonic Folding & Its Effect on the Coelom (head, tail, lateral folds) |
| 6 | Division into 3 Body Cavities (pericardial, pleural ×2, peritoneal) - with timeline |
| 7 | Septum Transversum & Diaphragm Formation (4 components + phrenic nerve) |
| 8 | Pericardioperitoneal Canals (location, function, folds, clinical relevance) |
| 9 | Mesenteries: Dorsal & Ventral (arteries, derivatives, persistence) |
| 10 | Clinical Correlations: CDH, Pericardial Defect, Omphalocele, Peritoneal Bands |
| 11 | Summary Table: Week-by-week developmental timeline |
| 12 | Key Points to Remember (10 high-yield bullet points) |