Create a PPT on the topic intraembryonic coelom
mkdir -p /tmp/workspace/intraembryonic-coelom-ppt && ls /tmp/workspace/
~/intraembryonic-coelom-ppt/create_ppt.py
import json, subprocess, base64
from io import BytesIO
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
# ── Color Palette ──────────────────────────────────────────────────────────────
DARK_BLUE = RGBColor(0x0D, 0x2B, 0x55) # Title / Header BG
MED_BLUE = RGBColor(0x1A, 0x4F, 0x8A) # Section heading
ACCENT_TEAL = RGBColor(0x00, 0x8B, 0x8B) # Accent bars / bullets
LIGHT_BG = RGBColor(0xF0, 0xF5, 0xFF) # Slide background
WHITE = RGBColor(0xFF, 0xFF, 0xFF)
OFF_WHITE = RGBColor(0xF5, 0xF5, 0xF5)
DARK_TEXT = RGBColor(0x1A, 0x1A, 0x2E)
LIGHT_TEAL = RGBColor(0xE0, 0xF5, 0xF5)
GOLD = RGBColor(0xD4, 0xAF, 0x37)
LIGHT_GRAY = RGBColor(0xDD, 0xE3, 0xEE)
# ── Helpers ────────────────────────────────────────────────────────────────────
prs = Presentation()
prs.slide_width = Inches(13.333)
prs.slide_height = Inches(7.5)
blank = prs.slide_layouts[6] # fully blank
def add_rect(slide, x, y, w, h, fill_color, alpha=None):
shape = slide.shapes.add_shape(
1, # MSO_SHAPE_TYPE.RECTANGLE
Inches(x), Inches(y), Inches(w), Inches(h)
)
shape.line.fill.background() # no border
shape.line.color.rgb = fill_color
shape.fill.solid()
shape.fill.fore_color.rgb = fill_color
return shape
def add_textbox(slide, text, x, y, w, h,
font_name="Calibri", font_size=18, bold=False, italic=False,
color=DARK_TEXT, align=PP_ALIGN.LEFT, v_anchor=MSO_ANCHOR.TOP,
word_wrap=True, margin_zero=False):
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
if margin_zero:
tf.margin_left = tf.margin_right = tf.margin_top = tf.margin_bottom = 0
p = tf.paragraphs[0]
p.alignment = align
run = p.add_run()
run.text = text
run.font.name = font_name
run.font.size = Pt(font_size)
run.font.bold = bold
run.font.italic = italic
run.font.color.rgb = color
return tf
def add_multiline_textbox(slide, lines, x, y, w, h,
font_name="Calibri", font_size=16,
bold_first=False, color=DARK_TEXT,
align=PP_ALIGN.LEFT, bullet_char="•",
line_spacing_pt=None, title_color=None):
"""lines = list of strings; first can be bold header if bold_first=True"""
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)
for i, line in enumerate(lines):
if i == 0:
p = tf.paragraphs[0]
else:
p = tf.add_paragraph()
p.alignment = align
if line_spacing_pt:
from pptx.oxml.ns import qn
from lxml import etree
spcBef = etree.SubElement(p._p.get_or_add_pPr(), qn('a:spcBef'))
spcPts = etree.SubElement(spcBef, qn('a:spcPts'))
spcPts.set('val', str(int(line_spacing_pt * 100)))
run = p.add_run()
run.text = line
run.font.name = font_name
run.font.size = Pt(font_size)
run.font.color.rgb = (title_color if (i == 0 and title_color) else color)
run.font.bold = (bold_first and i == 0)
return tf
def slide_bg(slide, color=LIGHT_BG):
add_rect(slide, 0, 0, 13.333, 7.5, color)
def header_bar(slide, title, subtitle=None):
add_rect(slide, 0, 0, 13.333, 1.25, DARK_BLUE)
add_textbox(slide, title, 0.3, 0.1, 10, 0.7,
font_size=30, bold=True, color=WHITE, v_anchor=MSO_ANCHOR.MIDDLE)
if subtitle:
add_textbox(slide, subtitle, 0.3, 0.8, 10, 0.45,
font_size=15, color=LIGHT_TEAL)
def footer(slide, text="Source: The Developing Human – Moore & Persaud | Fischer's Mastery of Surgery"):
add_rect(slide, 0, 7.15, 13.333, 0.35, DARK_BLUE)
add_textbox(slide, text, 0.2, 7.17, 12.9, 0.3,
font_size=9, color=LIGHT_GRAY, v_anchor=MSO_ANCHOR.MIDDLE)
def section_label(slide, text, x, y, w=3.5, h=0.38):
add_rect(slide, x, y, w, h, MED_BLUE)
add_textbox(slide, text, x+0.08, y+0.04, w-0.1, h-0.08,
font_size=12, bold=True, color=WHITE)
def accent_bar(slide, x, y, h=1.2):
add_rect(slide, x, y, 0.06, h, ACCENT_TEAL)
def info_card(slide, heading, bullets, x, y, w, h,
bg=OFF_WHITE, hdr_color=MED_BLUE, font_size=14):
add_rect(slide, x, y, w, h, bg)
add_rect(slide, x, y, w, 0.38, hdr_color)
add_textbox(slide, heading, x+0.1, y+0.04, w-0.15, 0.32,
font_size=12, bold=True, color=WHITE, v_anchor=MSO_ANCHOR.MIDDLE)
tb = slide.shapes.add_textbox(Inches(x+0.12), Inches(y+0.46),
Inches(w-0.2), Inches(h-0.55))
tf = tb.text_frame
tf.word_wrap = True
tf.margin_left = Pt(2); tf.margin_right = Pt(2)
for i, b in enumerate(bullets):
p = tf.paragraphs[0] if i==0 else tf.add_paragraph()
run = p.add_run()
run.text = b
run.font.name = "Calibri"
run.font.size = Pt(font_size)
run.font.color.rgb = DARK_TEXT
# ══════════════════════════════════════════════════════════════════════════════
# SLIDE 1 – TITLE SLIDE
# ══════════════════════════════════════════════════════════════════════════════
s1 = prs.slides.add_slide(blank)
add_rect(s1, 0, 0, 13.333, 7.5, DARK_BLUE)
# Decorative gradient band
add_rect(s1, 0, 3.4, 13.333, 0.08, ACCENT_TEAL)
add_rect(s1, 0, 3.5, 13.333, 0.04, GOLD)
add_textbox(s1, "INTRAEMBRYONIC COELOM", 1, 1.2, 11.333, 1.5,
font_size=44, bold=True, color=WHITE,
align=PP_ALIGN.CENTER, v_anchor=MSO_ANCHOR.MIDDLE)
add_textbox(s1, "Development of Embryonic Body Cavities", 1, 2.6, 11.333, 0.7,
font_size=22, color=LIGHT_TEAL,
align=PP_ALIGN.CENTER, italic=True)
add_textbox(s1, "Origin • Formation • Division • Clinical Significance",
1, 3.75, 11.333, 0.55,
font_size=16, color=GOLD, align=PP_ALIGN.CENTER)
add_textbox(s1, "Embryology | Human Development",
1, 6.7, 11.333, 0.5,
font_size=13, color=LIGHT_GRAY, align=PP_ALIGN.CENTER, italic=True)
# ══════════════════════════════════════════════════════════════════════════════
# SLIDE 2 – OVERVIEW / DEFINITION
# ══════════════════════════════════════════════════════════════════════════════
s2 = prs.slides.add_slide(blank)
slide_bg(s2)
header_bar(s2, "Overview & Definition")
add_textbox(s2, "What is the Intraembryonic Coelom?",
0.4, 1.4, 12, 0.5,
font_size=20, bold=True, color=MED_BLUE)
# Definition box
add_rect(s2, 0.4, 1.95, 12.5, 1.1, LIGHT_TEAL)
add_rect(s2, 0.4, 1.95, 0.1, 1.1, ACCENT_TEAL)
add_textbox(s2,
"The intraembryonic coelom (embryonic body cavity) is a horseshoe-shaped "
"cavity that develops within the lateral plate mesoderm and cardiogenic mesoderm "
"of the trilaminar embryo. It eventually gives rise to all three major body cavities.",
0.6, 2.0, 12.1, 0.95,
font_size=15, color=DARK_TEXT, word_wrap=True)
# Key facts as cards
info_card(s2, "Timing", [
"• Primordium appears: end of 3rd week",
"• Horseshoe form: early 4th week",
"• Division into 3 cavities: 2nd month"
], 0.4, 3.2, 3.9, 2.0, font_size=13)
info_card(s2, "Location of Origin", [
"• Lateral intraembryonic mesoderm",
"• Cardiogenic (heart-forming) mesoderm",
"• Isolated coelomic spaces that coalesce"
], 4.5, 3.2, 4.0, 2.0, font_size=13)
info_card(s2, "Communication", [
"• Initially communicates with extraembryonic coelom",
"• Communication narrows with lateral folding",
"• Eventually closes at umbilical cord region"
], 8.7, 3.2, 4.3, 2.0, font_size=13)
footer(s2)
# ══════════════════════════════════════════════════════════════════════════════
# SLIDE 3 – EMBRYOGENESIS WEEK BY WEEK
# ══════════════════════════════════════════════════════════════════════════════
s3 = prs.slides.add_slide(blank)
slide_bg(s3)
header_bar(s3, "Chronological Development", "Week-by-Week Timeline")
steps = [
("Week 3\n(Late)", "Intercellular spaces appear in lateral plate mesoderm. Isolated coelomic vesicles form in lateral intraembryonic mesoderm and cardiogenic mesoderm."),
("Week 4\n(Early)", "Spaces coalesce → single horseshoe-shaped intraembryonic coelom. Bend of horseshoe = future pericardial cavity. Lateral arms = future pleural & peritoneal cavities."),
("Week 4\n(Folding)", "Embryonic disc undergoes lateral folding. Lateral arms of coelom come together ventrally, closing the body wall. Coelom increasingly separated from extraembryonic coelom."),
("Week 5–6", "Pericardioperitoneal canals connect pericardial and peritoneal cavities. Pleuropericardial folds form → separate pleural from pericardial cavity."),
("Week 6–8", "Pleuroperitoneal membranes close pericardioperitoneal canals. Peritoneal cavity forms below. Three definitive cavities now established.")
]
colors_step = [DARK_BLUE, MED_BLUE, ACCENT_TEAL, RGBColor(0x2E, 0x86, 0xAB), RGBColor(0x0A, 0x66, 0x73)]
for i, (label, desc) in enumerate(steps):
x = 0.35 + i * 2.55
# Header box
add_rect(s3, x, 1.4, 2.3, 0.65, colors_step[i])
add_textbox(s3, label, x+0.05, 1.42, 2.2, 0.6,
font_size=13, bold=True, color=WHITE,
align=PP_ALIGN.CENTER, v_anchor=MSO_ANCHOR.MIDDLE)
# Arrow
if i < 4:
add_textbox(s3, "▶", x+2.32, 1.58, 0.22, 0.35,
font_size=14, color=MED_BLUE, align=PP_ALIGN.CENTER)
# Content box
add_rect(s3, x, 2.1, 2.3, 3.7, OFF_WHITE)
add_rect(s3, x, 2.1, 2.3, 0.05, colors_step[i])
add_textbox(s3, desc, x+0.1, 2.2, 2.1, 3.5,
font_size=12, color=DARK_TEXT, word_wrap=True)
footer(s3)
# ══════════════════════════════════════════════════════════════════════════════
# SLIDE 4 – LATERAL PLATE MESODERM DIVISION
# ══════════════════════════════════════════════════════════════════════════════
s4 = prs.slides.add_slide(blank)
slide_bg(s4)
header_bar(s4, "Division of Lateral Plate Mesoderm by the Coelom")
add_textbox(s4, "The intraembryonic coelom splits the lateral plate mesoderm into two distinct layers:",
0.4, 1.35, 12.5, 0.5,
font_size=15, color=DARK_TEXT, word_wrap=True)
# Somatic layer card
add_rect(s4, 0.4, 1.9, 5.9, 4.2, RGBColor(0xE8, 0xF0, 0xFE))
add_rect(s4, 0.4, 1.9, 5.9, 0.45, MED_BLUE)
add_textbox(s4, "SOMATIC (Parietal) Layer",
0.5, 1.92, 5.7, 0.4,
font_size=16, bold=True, color=WHITE)
somatic_points = [
"• Location: beneath embryonic ectoderm",
"• Continuous with extraembryonic mesoderm covering the amnion",
"• Together with overlying ectoderm → SOMATOPLEURE (embryonic body wall)",
"• Gives rise to:",
" – Parietal peritoneum",
" – Parietal pleura",
" – Serous pericardium",
" – Muscles & bones of body wall",
]
add_multiline_textbox(s4, somatic_points, 0.55, 2.42, 5.6, 3.5,
font_size=14, color=DARK_TEXT)
# Splanchnic layer card
add_rect(s4, 6.9, 1.9, 6.0, 4.2, RGBColor(0xE6, 0xF9, 0xF9))
add_rect(s4, 6.9, 1.9, 6.0, 0.45, ACCENT_TEAL)
add_textbox(s4, "SPLANCHNIC (Visceral) Layer",
7.0, 1.92, 5.8, 0.4,
font_size=16, bold=True, color=WHITE)
splanchnic_points = [
"• Location: adjacent to embryonic endoderm",
"• Continuous with extraembryonic mesoderm covering umbilical vesicle",
"• Together with underlying endoderm → SPLANCHNOPLEURE (embryonic gut)",
"• Gives rise to:",
" – Visceral peritoneum",
" – Visceral pleura",
" – Epicardium (visceral pericardium)",
" – Smooth muscle of gut & respiratory tract",
]
add_multiline_textbox(s4, splanchnic_points, 7.05, 2.42, 5.7, 3.5,
font_size=14, color=DARK_TEXT)
# Central divider label
add_rect(s4, 6.4, 2.5, 0.55, 2.5, GOLD)
add_textbox(s4, "COELOM", 6.38, 3.35, 0.58, 0.7,
font_size=9, bold=True, color=DARK_BLUE,
align=PP_ALIGN.CENTER)
footer(s4)
# ══════════════════════════════════════════════════════════════════════════════
# SLIDE 5 – EMBRYONIC FOLDING & COELOM
# ══════════════════════════════════════════════════════════════════════════════
s5 = prs.slides.add_slide(blank)
slide_bg(s5)
header_bar(s5, "Embryonic Folding and the Intraembryonic Coelom")
add_textbox(s5, "During the 4th week, embryonic folding fundamentally reshapes the coelom:",
0.4, 1.35, 12.5, 0.45,
font_size=15, color=DARK_TEXT)
fold_cards = [
("Head Fold", [
"• Cranial end of embryo folds ventrally",
"• Pericardial coelom rotates from dorsal → ventral",
"• Pericardial cavity now lies ventral to heart, cranial to septum transversum",
"• Coelom communicates widely with extraembryonic coelom on each side"
]),
("Lateral Folds", [
"• Bilateral lateral folds occur simultaneously",
"• Lateral arms of horseshoe-shaped coelom approach ventrally",
"• Body wall forms (somatopleure closes ventrally)",
"• Ventral mesentery degenerates → right & left coeloms merge into peritoneal cavity",
"• Communication with extraembryonic coelom progressively reduced"
]),
("Tail Fold", [
"• Caudal end of embryo folds ventrally",
"• Cloacal membrane and connecting stalk shift to ventral position",
"• Allantoic diverticulum incorporated into body",
"• Umbilical cord forms at region of persistent connection"
]),
]
xs = [0.35, 4.55, 9.0]
ws = [4.0, 4.25, 4.1]
for i, (title, pts) in enumerate(fold_cards):
info_card(s5, title, pts, xs[i], 1.9, ws[i], 4.3, font_size=13)
footer(s5)
# ══════════════════════════════════════════════════════════════════════════════
# SLIDE 6 – DIVISION INTO THREE BODY CAVITIES
# ══════════════════════════════════════════════════════════════════════════════
s6 = prs.slides.add_slide(blank)
slide_bg(s6)
header_bar(s6, "Division of Intraembryonic Coelom into Three Body Cavities",
"4th–8th Week of Development")
add_textbox(s6,
"By the 4th week, the horseshoe-shaped coelom is divided into three well-defined cavities "
"by mesodermal partitions (septum transversum, pleuropericardial & pleuroperitoneal membranes):",
0.4, 1.35, 12.5, 0.6, font_size=14, color=DARK_TEXT, word_wrap=True)
cavities = [
("PERICARDIAL CAVITY", DARK_BLUE, [
"• Derived from: bend of horseshoe-shaped coelom",
"• Location: enclosed by fibrous pericardium",
"• Contains: heart",
"• Lined by: serous pericardium (visceral + parietal layers)",
"• Separated from pleural cavities by:",
" Pleuropericardial membranes (contain common cardinal veins & phrenic nerves)",
"• Congenital defect: absent/defective pleuropericardial membrane → pericardial defect",
]),
("PLEURAL CAVITIES (×2)", MED_BLUE, [
"• Derived from: pericardioperitoneal canals (lateral arms of coelom)",
"• Paired cavities – right and left",
"• Lung buds grow into pericardioperitoneal canals",
"• Pleural cavities expand into body wall mesenchyme",
"• Separated from pericardial cavity: pleuropericardial membranes (5–7 wks)",
"• Separated from peritoneal cavity: pleuroperitoneal membranes",
"• Congenital defect: Congenital Diaphragmatic Hernia (CDH)",
]),
("PERITONEAL CAVITY", ACCENT_TEAL, [
"• Derived from: caudal parts / lateral arms of horseshoe coelom",
"• Largest of the three cavities",
"• Splanchnic mesoderm encloses primordial gut → dorsal mesentery forms",
"• Ventral mesentery degenerates (except near liver/stomach) → right & left halves merge",
"• Extends from heart region to pelvic area",
"• Congenital defect: Omphalocele, gastroschisis (body wall closure defects)",
]),
]
for i, (title, col, pts) in enumerate(cavities):
x = 0.35 + i * 4.35
add_rect(s6, x, 2.1, 4.1, 0.42, col)
add_textbox(s6, title, x+0.08, 2.12, 3.95, 0.38,
font_size=12, bold=True, color=WHITE, v_anchor=MSO_ANCHOR.MIDDLE)
add_rect(s6, x, 2.52, 4.1, 3.8, OFF_WHITE)
tb = slide.shapes.add_textbox if False else s6.shapes.add_textbox(
Inches(x+0.12), Inches(2.6), Inches(3.85), Inches(3.65))
tf = tb.text_frame; tf.word_wrap = True
for j, pt in enumerate(pts):
p = tf.paragraphs[0] if j==0 else tf.add_paragraph()
run = p.add_run(); run.text = pt
run.font.name = "Calibri"; run.font.size = Pt(12)
run.font.color.rgb = DARK_TEXT
footer(s6)
# ══════════════════════════════════════════════════════════════════════════════
# SLIDE 7 – SEPTUM TRANSVERSUM & DIAPHRAGM
# ══════════════════════════════════════════════════════════════════════════════
s7 = prs.slides.add_slide(blank)
slide_bg(s7)
header_bar(s7, "Septum Transversum and Diaphragm Formation")
add_textbox(s7,
"The septum transversum is the key mesodermal partition that initiates division of the "
"intraembryonic coelom. It forms the primordium of the central tendon of the diaphragm.",
0.4, 1.35, 12.5, 0.6, font_size=14, color=DARK_TEXT, word_wrap=True)
# Left: Septum transversum
info_card(s7, "Septum Transversum", [
"• Thick mass of mesodermal tissue",
"• Originally at cranial end of embryonic disc (head region)",
"• After cranial folding: repositioned to region between pericardial & peritoneal cavity",
"• Partially separates pericardial from peritoneal cavity ventrally",
"• Leaves two openings: pericardioperitoneal canals (one on each side of foregut)",
"• Primordium of central tendon of diaphragm",
], 0.35, 2.1, 6.0, 3.8, font_size=13)
# Right: Components of diaphragm
info_card(s7, "Four Components of the Diaphragm", [
"1. Septum transversum → central tendon",
"2. Mesentery of esophagus → crura of diaphragm",
"3. Pleuroperitoneal folds/membranes → posterolateral diaphragm",
"4. Muscular outgrowth from body wall → peripheral part",
"",
"Note: Phrenic nerve (C3,4,5) supplies diaphragm; carried within pleuropericardial membranes → explains referred pain to shoulder tip",
], 6.55, 2.1, 6.4, 3.8, font_size=13)
footer(s7)
# ══════════════════════════════════════════════════════════════════════════════
# SLIDE 8 – MESENTERIES
# ══════════════════════════════════════════════════════════════════════════════
s8 = prs.slides.add_slide(blank)
slide_bg(s8)
header_bar(s8, "Mesenteries and Their Formation")
add_textbox(s8,
"As the peritoneal cavity forms, the splanchnic mesoderm suspends the gut tube by "
"double-layered peritoneal membranes — the mesenteries.",
0.4, 1.35, 12.5, 0.5, font_size=14, color=DARK_TEXT, word_wrap=True)
info_card(s8, "Dorsal Mesentery", [
"• Formed by: splanchnic layer of mesoderm enclosing primordial gut",
"• Suspends gut from dorsal body wall",
"• Double layer of peritoneum",
"• Serves as pathway for: blood vessels, lymphatics, nerves to gut",
"• Present throughout the entire gut (from stomach to rectum initially)",
"• Persists as: mesentery of small intestine, transverse mesocolon, sigmoid mesocolon",
], 0.35, 2.0, 6.1, 3.8, font_size=13)
info_card(s8, "Ventral Mesentery", [
"• Present only in region of terminal esophagus, stomach, and upper duodenum",
"• Derived from: septum transversum (caudal part)",
"• Gives rise to:",
" – Lesser omentum (hepatogastric & hepatoduodenal ligaments)",
" – Falciform ligament of liver",
"• Degenerates inferiorly → right & left halves of peritoneal cavity communicate",
], 6.6, 2.0, 6.4, 3.8, font_size=13)
add_textbox(s8,
"Absence of the ventral mesentery in the lower peritoneal cavity allows free "
"communication between the two halves, forming a single large peritoneal cavity.",
0.4, 6.2, 12.5, 0.55,
font_size=13, color=MED_BLUE, italic=True)
footer(s8)
# ══════════════════════════════════════════════════════════════════════════════
# SLIDE 9 – PLEUROPERICARDIAL & PLEUROPERITONEAL MEMBRANES
# ══════════════════════════════════════════════════════════════════════════════
s9 = prs.slides.add_slide(blank)
slide_bg(s9)
header_bar(s9, "Pleuropericardial & Pleuroperitoneal Membranes",
"Key Partitioning Structures in the Developing Coelom")
# Timeline bar
add_rect(s9, 0.5, 1.45, 12.3, 0.08, ACCENT_TEAL)
for wk, label in [(0, "Wk 4"), (3.07, "Wk 5"), (6.15, "Wk 6–7"), (9.22, "Wk 7–8")]:
add_rect(s9, 0.5+wk, 1.38, 0.08, 0.22, DARK_BLUE)
add_textbox(s9, label, 0.5+wk-0.2, 1.6, 0.7, 0.3,
font_size=11, color=DARK_BLUE, align=PP_ALIGN.CENTER, bold=True)
mem_cards = [
("Pleuropericardial Folds\n(→ Membranes)", MED_BLUE, [
"• Arise from lateral wall of pericardioperitoneal canal",
"• Located cranial/superior to developing lungs",
"• Contain: common cardinal veins, phrenic nerve roots",
"• Enlarge medially → pleuropericardial membranes",
"• Fuse in midline with mesoderm ventral to esophagus",
"• Result: Pericardial cavity separated from pleural cavities",
"• Timing: Completed by ~7th week",
]),
("Pleuroperitoneal Folds\n(→ Membranes)", ACCENT_TEAL, [
"• Arise from dorsolateral body wall of pericardioperitoneal canal",
"• Located caudal/inferior to developing lungs",
"• Grow medially and ventrally",
"• Fuse with: mesentery of esophagus + septum transversum",
"• Close pericardioperitoneal canals",
"• Result: Pleural cavities separated from peritoneal cavity",
"• Timing: Left closes later than right (explains left-sided CDH predominance)",
]),
]
for i, (title, col, pts) in enumerate(mem_cards):
x = 0.35 + i * 6.5
add_rect(s9, x, 2.1, 6.1, 0.48, col)
add_textbox(s9, title, x+0.1, 2.12, 5.9, 0.44,
font_size=13, bold=True, color=WHITE)
add_rect(s9, x, 2.58, 6.1, 4.0, OFF_WHITE)
tb2 = s9.shapes.add_textbox(Inches(x+0.12), Inches(2.66), Inches(5.86), Inches(3.8))
tf2 = tb2.text_frame; tf2.word_wrap = True
for j, pt in enumerate(pts):
p = tf2.paragraphs[0] if j==0 else tf2.add_paragraph()
run = p.add_run(); run.text = pt
run.font.name = "Calibri"; run.font.size = Pt(13)
run.font.color.rgb = DARK_TEXT
footer(s9)
# ══════════════════════════════════════════════════════════════════════════════
# SLIDE 10 – CLINICAL SIGNIFICANCE
# ══════════════════════════════════════════════════════════════════════════════
s10 = prs.slides.add_slide(blank)
slide_bg(s10)
header_bar(s10, "Clinical Significance", "Congenital Anomalies of the Intraembryonic Coelom")
clinical = [
("Congenital Diaphragmatic Hernia (CDH)", DARK_BLUE, [
"Most common (1:2,000–5,000 births)",
"Defect in pleuroperitoneal membrane (usually left side)",
"Abdominal contents herniate into thorax",
"Lung hypoplasia → severe respiratory distress at birth",
"Signs: scaphoid abdomen, bowel sounds in chest",
"Management: surgical repair after stabilization",
]),
("Congenital Pericardial Defect", MED_BLUE, [
"Rare; defective pleuropericardial membrane fusion",
"Usually left-sided; often asymptomatic",
"Pericardial cavity communicates with pleural cavity",
"Rarely: left atrium herniates into pleural cavity",
]),
("Peritoneopericardial Hernia", ACCENT_TEAL, [
"Intestine herniation into pericardial sac",
"Embryologic basis: failure of complete separation of pericardial & peritoneal cavities",
"Associated with incomplete formation of septum transversum",
"May present with intestinal obstruction + cardiac compression",
]),
("Omphalocele / Gastroschisis", RGBColor(0x5C, 0x35, 0x7E), [
"Failure of lateral body wall folds to close ventrally",
"Omphalocele: gut in hernial sac at umbilicus",
"Gastroschisis: gut protrudes through body wall defect (no sac)",
"Due to incomplete closure of peritoneal part of coelom",
]),
]
positions = [(0.35, 1.4), (6.85, 1.4), (0.35, 4.2), (6.85, 4.2)]
for i, ((x, y), (title, col, pts)) in enumerate(zip(positions, clinical)):
add_rect(s10, x, y, 6.0, 2.65, OFF_WHITE)
add_rect(s10, x, y, 6.0, 0.42, col)
add_textbox(s10, title, x+0.1, y+0.05, 5.8, 0.35,
font_size=13, bold=True, color=WHITE)
tb3 = s10.shapes.add_textbox(Inches(x+0.15), Inches(y+0.5), Inches(5.7), Inches(2.1))
tf3 = tb3.text_frame; tf3.word_wrap = True
for j, pt in enumerate(pts):
p = tf3.paragraphs[0] if j==0 else tf3.add_paragraph()
run = p.add_run(); run.text = f"• {pt}"
run.font.name = "Calibri"; run.font.size = Pt(12)
run.font.color.rgb = DARK_TEXT
footer(s10)
# ══════════════════════════════════════════════════════════════════════════════
# SLIDE 11 – SUMMARY TABLE
# ══════════════════════════════════════════════════════════════════════════════
s11 = prs.slides.add_slide(blank)
slide_bg(s11)
header_bar(s11, "Summary: Three Body Cavities from Intraembryonic Coelom")
# Table headers
cols = ["Body Cavity", "Origin from Coelom", "Lined By", "Separated By", "Congenital Defect"]
col_ws = [2.3, 3.0, 2.7, 2.8, 2.25]
xs_t = [0.2]
for w in col_ws[:-1]:
xs_t.append(xs_t[-1] + w)
y_hdr = 1.35
for i, (hdr, w) in enumerate(zip(cols, col_ws)):
add_rect(s11, xs_t[i], y_hdr, w-0.05, 0.45, DARK_BLUE)
add_textbox(s11, hdr, xs_t[i]+0.05, y_hdr+0.04, w-0.12, 0.38,
font_size=12, bold=True, color=WHITE, align=PP_ALIGN.CENTER)
rows = [
["Pericardial Cavity", "Bend of horseshoe (cranial)", "Serous pericardium", "Pleuropericardial membranes", "Pericardial defect"],
["Pleural Cavities (×2)", "Pericardioperitoneal canals (lateral arms)", "Parietal & visceral pleura", "Pleuroperitoneal membranes", "Congenital Diaphragmatic Hernia (CDH)"],
["Peritoneal Cavity", "Caudal/lateral arms (largest)", "Parietal & visceral peritoneum", "Diaphragm (pleuroperitoneal membranes + septum transversum)", "Omphalocele, Gastroschisis"],
]
row_bgs = [RGBColor(0xE8, 0xF0, 0xFE), RGBColor(0xE0, 0xF5, 0xF5), OFF_WHITE]
for r, (row_data, row_bg) in enumerate(zip(rows, row_bgs)):
y_row = 1.85 + r * 1.45
for i, (cell, w) in enumerate(zip(row_data, col_ws)):
add_rect(s11, xs_t[i], y_row, w-0.05, 1.4, row_bg)
add_textbox(s11, cell, xs_t[i]+0.07, y_row+0.08, w-0.14, 1.25,
font_size=12, color=DARK_TEXT, word_wrap=True)
footer(s11)
# ══════════════════════════════════════════════════════════════════════════════
# SLIDE 12 – KEY POINTS / EXAM PEARLS
# ══════════════════════════════════════════════════════════════════════════════
s12 = prs.slides.add_slide(blank)
slide_bg(s12)
header_bar(s12, "Key Points & Exam Pearls")
pearls = [
("Timing", "The intraembryonic coelom first appears at the END of the 3rd week and forms a horseshoe shape during the 4th week."),
("Shape", "The horseshoe-shaped coelom: cranial bend = pericardial cavity; lateral limbs = pleural & peritoneal cavities."),
("Communication", "The intraembryonic coelom initially communicates freely with the extraembryonic coelom; this communication closes with lateral folding."),
("Layers", "The coelom divides lateral plate mesoderm into somatic (parietal) and splanchnic (visceral) layers → somatopleure and splanchnopleure."),
("Partitions", "Three key partitions divide the coelom: septum transversum, pleuropericardial membranes, and pleuroperitoneal membranes."),
("CDH", "Left-sided CDH is more common because the left pleuroperitoneal canal closes LATER than the right."),
("Phrenic nerve", "The phrenic nerve (C3,4,5) travels within the pleuropericardial membranes → explains shoulder-tip pain with diaphragmatic irritation."),
("Diaphragm", "4 components of diaphragm: (1) septum transversum, (2) esophageal mesentery, (3) pleuroperitoneal membranes, (4) body wall musculature."),
]
for i, (key, val) in enumerate(pearls):
row = i % 4
col = i // 4
x = 0.35 + col * 6.55
y = 1.4 + row * 1.45
add_rect(s12, x, y, 6.1, 1.38, OFF_WHITE)
add_rect(s12, x, y, 1.55, 1.38, LIGHT_TEAL)
add_rect(s12, x, y, 0.08, 1.38, ACCENT_TEAL)
add_textbox(s12, key, x+0.12, y+0.08, 1.38, 1.2,
font_size=13, bold=True, color=MED_BLUE,
v_anchor=MSO_ANCHOR.MIDDLE, align=PP_ALIGN.CENTER)
add_textbox(s12, val, x+1.65, y+0.1, 4.35, 1.18,
font_size=12, color=DARK_TEXT, word_wrap=True)
footer(s12)
# ══════════════════════════════════════════════════════════════════════════════
# SAVE
# ══════════════════════════════════════════════════════════════════════════════
out = "/tmp/workspace/intraembryonic-coelom-ppt/Intraembryonic_Coelom.pptx"
buf = BytesIO()
prs.save(buf)
with open(out, "wb") as f:
f.write(buf.getvalue())
print(f"Saved: {out}")
cd /tmp/workspace/intraembryonic-coelom-ppt && python create_ppt.py 2>&1
python3 -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 = [s.text_frame.text.strip()[:60] for s in slide.shapes if s.has_text_frame and s.text_frame.text.strip()] print(f' Slide {i}: {texts[0] if texts else \"(no text)\"}') import os size = os.path.getsize('/tmp/workspace/intraembryonic-coelom-ppt/Intraembryonic_Coelom.pptx') print(f'File size: {size/1024:.1f} KB') "
Intraembryonic Coelom
Presentation · PPTX
| # | Slide Title | Content Highlights |
|---|---|---|
| 1 | Title Slide | Styled cover with subtitle and topic overview |
| 2 | Overview & Definition | Definition of intraembryonic coelom, timing, location of origin, communication with extraembryonic coelom |
| 3 | Chronological Development | Week-by-week timeline (Week 3 → Week 8) showing progressive formation |
| 4 | Division of Lateral Plate Mesoderm | Somatic vs. splanchnic layers; somatopleure & splanchnopleure derivatives |
| 5 | Embryonic Folding & Coelom | Head fold, lateral folds, tail fold - effects on coelom shape and closure |
| 6 | Division into 3 Body Cavities | Pericardial, pleural (×2), peritoneal - origins and separating structures |
| 7 | Septum Transversum & Diaphragm | 4 components of diaphragm; septum transversum repositioning after cranial folding |
| 8 | Mesenteries | Dorsal mesentery (persists), ventral mesentery (degenerates below liver) |
| 9 | Pleuropericardial & Pleuroperitoneal Membranes | Formation, contents (phrenic nerve, cardinal veins), and timing |
| 10 | Clinical Significance | CDH, congenital pericardial defect, peritoneopericardial hernia, omphalocele/gastroschisis |
| 11 | Summary Table | Side-by-side comparison of all 3 body cavities |
| 12 | Key Points / Exam Pearls | 8 high-yield exam facts (CDH laterality, phrenic nerve, timing, etc.) |