Hii

Hey! How can I help you today?

Can u explain the physiology of thyroid in detail and simple

Reading File
Finding Sources
Finding Sources
Reading File
Reading File
Reading File
Reading File
Reading File
Reading File
Loading Image
Loading Image
Loading Image
I now have everything I need from the authoritative textbooks (Ganong's Review of Medical Physiology and Sabiston Textbook of Surgery). Here's a detailed yet simple explanation:

Thyroid Physiology - A Simple, Detailed Guide

1. What Is the Thyroid Gland?

The thyroid is a butterfly-shaped gland sitting at the front of your neck, just below the Adam's apple. It has two lobes connected by a thin strip called the isthmus.
Structure at the microscopic level:
  • The gland is made of thousands of tiny sacs called follicles
  • Each follicle is lined by a single layer of follicular cells (thyrocytes)
  • The center of each follicle is filled with a thick, jelly-like substance called colloid, which stores thyroglobulin (the raw material for thyroid hormones)
  • Between follicles are parafollicular (C) cells, which make calcitonin (a separate hormone for calcium regulation)

2. What Hormones Does the Thyroid Make?

The thyroid makes two main hormones, both needing iodine:
HormoneFull NameIodine atomsPotency
T4Thyroxine4Weaker (inactive "pro-hormone")
T3Triiodothyronine3Stronger (active form)
Think of T4 as the "storage form" and T3 as the "active form." Most T3 in the body is actually made from T4 by removing one iodine atom in the liver, kidneys, and other tissues.

3. How Are Thyroid Hormones Synthesized? (Step by Step)

Thyroid hormone biosynthesis diagram showing iodide transport and thyroglobulin iodination
Step 1 - Iodide Trapping: Thyrocytes actively pump iodide (I-) from the blood into the cell using a protein called the Na/I Symporter (NIS). The concentration of iodine inside the follicle is many times higher than in the blood.
Step 2 - Oxidation: Inside the cell, iodide (I-) is oxidized to iodine (I2) by an enzyme called thyroid peroxidase (TPO). This iodine can then pass through to the colloid.
Step 3 - Organification: In the colloid, iodine attaches to the tyrosine residues on thyroglobulin (a large protein made by the thyrocytes):
  • 1 iodine + tyrosine = MIT (monoiodotyrosine)
  • 2 iodines + tyrosine = DIT (diiodotyrosine)
Step 4 - Coupling:
  • DIT + DITT4 (thyroxine, 4 iodines)
  • MIT + DITT3 (triiodothyronine, 3 iodines)
All this happens on the thyroglobulin molecule, which acts as a scaffold and a hormone storage depot in the colloid. You can go 2 months on a zero-iodine diet before your hormone levels even drop - that's how big this colloid reservoir is!
Step 5 - Secretion: When TSH (see below) signals the thyroid, thyrocytes engulf the colloid by endocytosis, lysosomes break down thyroglobulin, and free T4 and T3 are released into the blood.

4. Transport in the Blood

Once in the blood, more than 99% of T4 and T3 are bound to carrier proteins (mainly thyroxine-binding globulin, albumin):
  • Only the tiny free fraction (<1%) is biologically active
  • The bound pool acts as a reserve - when free levels drop, bound hormone is released
Normal levels:
  • Total T4: ~8 µg/dL
  • Total T3: ~0.15 µg/dL
  • Free T4: ~0.002 µg/dL (just a tiny fraction)

5. Conversion of T4 to T3 (Peripheral Deiodination)

T3, T4 and reverse T3 interconversion and cellular mechanism of action
T4 is converted to the active T3 in peripheral tissues (liver, kidneys) by enzymes called deiodinases, which remove one iodine:
  • Type I deiodinase - liver, kidneys (main source of circulating T3)
  • Type II deiodinase - pituitary, brain, brown fat (local T3 supply)
T4 can also be converted to Reverse T3 (RT3), which is biologically inactive. This happens more during:
  • Starvation or fasting (RT3 rises, T3 falls - conserving calories)
  • Critical illness, burns, trauma, cancer

6. How Thyroid Hormones Work at the Cell Level

T3 (the active hormone) enters the cell and travels to the nucleus, where it binds to Thyroid Hormone Receptors (TR) on DNA. This acts like a switch - flipping on or off genes that control:
  • Metabolism and energy production
  • Heart rate and cardiac output
  • Growth and development
  • Body temperature

7. The Control System - HPT Axis (Hypothalamus - Pituitary - Thyroid)

Regulation diagram showing pituitary TSH feedback loop with free T4
This is a classic negative feedback loop - like a thermostat:
Hypothalamus → releases TRH (Thyrotropin-Releasing Hormone)
        ↓
Anterior Pituitary → releases TSH (Thyroid-Stimulating Hormone)
        ↓
Thyroid Gland → makes T3 and T4
        ↓
T3/T4 rises in blood → feeds back to SUPPRESS both TRH and TSH
  • Low T3/T4? → More TRH → More TSH → Thyroid makes more hormones
  • High T3/T4? → Less TRH → Less TSH → Thyroid slows down
TSH is a glycoprotein secreted in a pulsatile rhythm - it rises around 9 PM and peaks before sleep, meaning thyroid activity has a daily cycle.

8. What Do Thyroid Hormones Do? (Major Effects)

SystemEffect
MetabolismIncrease basal metabolic rate, ATP production, O2 consumption, heat generation
HeartIncrease heart rate and cardiac output; causes vasodilation
Brain/Nervous SystemEssential for fetal brain development; affects mood and cognition
GrowthRequired for normal childhood growth (works with growth hormone)
ReproductionNormal menstrual cycles and fertility depend on thyroid function
Liver/MuscleStimulates lipid and carbohydrate metabolism

9. Iodine - The Key Ingredient

  • Daily requirement: 0.1 mg/day
  • Entirely from diet (seafood, iodized salt)
  • Iodine deficiency → thyroid cannot make hormones → gland enlarges trying to compensate → goiter
  • The US has iodized salt since 1924; ~54 countries still have iodine deficiency worldwide

Quick Summary

Iodine from diet → Trapped by thyrocytes → Combined with tyrosines on thyroglobulin → Forms T4/T3 → Released into blood → Mostly bound to proteins → T4 converted to active T3 in tissues → T3 binds nuclear receptors → Controls metabolism, growth, heart rate → Regulated by TSH (pituitary) and TRH (hypothalamus) via negative feedback
Sources: Ganong's Review of Medical Physiology, 26th Ed. | Sabiston Textbook of Surgery, 21st Ed.

Make this into a ppt

Reading File
Reading File
Reading File
Running Command

mkdir -p /home/daytona/workspace/thyroid-ppt && ls /home/daytona/workspace/thyro…

Running Command

node /home/daytona/skills/shared/scripts/fetch_images.js \ "https://cdn.orris.…

Writing File

~/thyroid-ppt/generate.js

const pptxgen = require("pptxgenjs");
const fs = require("fs");

// Load images
const images = JSON.parse(fs.readFileSync("/home/daytona/workspace/thyroid-ppt/images.json"));
const imgSynthesis  = images[0].base64; // thyroid hormone biosynthesis
const imgFeedback   = images[1].base64; // HPT feedback loop
const imgCellular   = images[2].base64; // cellular mechanism T3/T4

// ─── Palette ───────────────────────────────────────────────────────────────
const C = {
  darkTeal:    "0A3D4A",   // dominant bg for title/section slides
  midTeal:     "0E5C6E",   // accent bars & cards
  lightTeal:   "1A8FA3",   // highlights / icon accents
  mint:        "D0F0F5",   // light fill boxes
  white:       "FFFFFF",
  offWhite:    "F5FAFB",
  gold:        "F0A500",   // warm accent for step numbers
  softGold:    "FDE9B7",   // gold box fill
  textDark:    "1A2B31",   // body text on light bg
  textMid:     "2E5D6A",   // sub-heading on light bg
};

const FONT = "Calibri";

let pres = new pptxgen();
pres.layout = "LAYOUT_16x9"; // 10 x 5.625 inches
pres.title  = "Thyroid Physiology";
pres.author = "Orris Medical";

// ══════════════════════════════════════════════════════════════════
// HELPER FUNCTIONS
// ══════════════════════════════════════════════════════════════════

function darkBg(slide) {
  slide.addShape(pres.shapes.RECTANGLE, {
    x: 0, y: 0, w: 10, h: 5.625,
    fill: { color: C.darkTeal }, line: { color: C.darkTeal }
  });
}

function sectionHeader(slide, label) {
  // top accent strip
  slide.addShape(pres.shapes.RECTANGLE, {
    x: 0, y: 0, w: 10, h: 0.08,
    fill: { color: C.gold }, line: { color: C.gold }
  });
  // left accent bar
  slide.addShape(pres.shapes.RECTANGLE, {
    x: 0, y: 0, w: 0.06, h: 5.625,
    fill: { color: C.lightTeal }, line: { color: C.lightTeal }
  });
  // section pill label
  slide.addShape(pres.shapes.ROUNDED_RECTANGLE, {
    x: 0.3, y: 0.2, w: 1.8, h: 0.35,
    fill: { color: C.lightTeal }, line: { color: C.lightTeal }, rectRadius: 0.08
  });
  slide.addText(label.toUpperCase(), {
    x: 0.3, y: 0.2, w: 1.8, h: 0.35,
    fontSize: 9, bold: true, color: C.white, align: "center", valign: "middle",
    fontFace: FONT, margin: 0
  });
}

function slideTitle(slide, title, sub) {
  slide.addText(title, {
    x: 0.25, y: 0.62, w: 9.5, h: 0.7,
    fontSize: 26, bold: true, color: C.textDark, fontFace: FONT
  });
  if (sub) {
    slide.addShape(pres.shapes.RECTANGLE, {
      x: 0.25, y: 1.3, w: 1.2, h: 0.06,
      fill: { color: C.gold }, line: { color: C.gold }
    });
    slide.addText(sub, {
      x: 0.25, y: 1.42, w: 9.5, h: 0.35,
      fontSize: 13, color: C.textMid, fontFace: FONT, italic: true
    });
  }
}

function card(slide, x, y, w, h, fillColor) {
  slide.addShape(pres.shapes.RECTANGLE, {
    x, y, w, h,
    fill: { color: fillColor || C.mint },
    line: { color: C.lightTeal, width: 1 },
    shadow: { type: "outer", color: "000000", blur: 5, offset: 2, angle: 135, opacity: 0.1 }
  });
}

function stepBadge(slide, num, x, y) {
  slide.addShape(pres.shapes.ROUNDED_RECTANGLE, {
    x, y, w: 0.42, h: 0.42,
    fill: { color: C.gold }, line: { color: C.gold }, rectRadius: 0.08
  });
  slide.addText(String(num), {
    x, y, w: 0.42, h: 0.42,
    fontSize: 16, bold: true, color: C.darkTeal, align: "center", valign: "middle",
    fontFace: FONT, margin: 0
  });
}

// ══════════════════════════════════════════════════════════════════
// SLIDE 1 — TITLE
// ══════════════════════════════════════════════════════════════════
{
  let s = pres.addSlide();
  darkBg(s);

  // decorative teal circles
  s.addShape(pres.shapes.OVAL, {
    x: 7.8, y: -1.2, w: 4.5, h: 4.5,
    fill: { color: C.midTeal, transparency: 60 }, line: { color: C.midTeal, transparency: 60 }
  });
  s.addShape(pres.shapes.OVAL, {
    x: 8.6, y: 2.8, w: 2.8, h: 2.8,
    fill: { color: C.lightTeal, transparency: 70 }, line: { color: C.lightTeal, transparency: 70 }
  });

  // gold accent line
  s.addShape(pres.shapes.RECTANGLE, {
    x: 0.6, y: 2.0, w: 1.4, h: 0.07,
    fill: { color: C.gold }, line: { color: C.gold }
  });

  s.addText("THYROID", {
    x: 0.6, y: 1.1, w: 8, h: 0.85,
    fontSize: 52, bold: true, color: C.white, fontFace: FONT, charSpacing: 6
  });
  s.addText("PHYSIOLOGY", {
    x: 0.6, y: 1.9, w: 8, h: 0.8,
    fontSize: 52, bold: true, color: C.gold, fontFace: FONT, charSpacing: 6
  });
  s.addText("A Simple, Detailed Guide", {
    x: 0.6, y: 2.75, w: 7, h: 0.45,
    fontSize: 18, color: C.mint, fontFace: FONT, italic: true
  });
  s.addText("Sources: Ganong's Review of Medical Physiology · Sabiston Textbook of Surgery", {
    x: 0.6, y: 5.1, w: 9, h: 0.35,
    fontSize: 9, color: C.mint, fontFace: FONT, transparency: 40
  });
}

// ══════════════════════════════════════════════════════════════════
// SLIDE 2 — OVERVIEW / AGENDA
// ══════════════════════════════════════════════════════════════════
{
  let s = pres.addSlide();
  s.addShape(pres.shapes.RECTANGLE, { x:0, y:0, w:10, h:5.625, fill:{color:C.offWhite}, line:{color:C.offWhite} });
  sectionHeader(s, "Overview");
  slideTitle(s, "What We Will Cover", "Eight key topics in thyroid physiology");

  const topics = [
    ["01", "Anatomy & Structure"],
    ["02", "Hormones: T3 & T4"],
    ["03", "Hormone Synthesis (Steps)"],
    ["04", "Transport in Blood"],
    ["05", "T4 → T3 Conversion"],
    ["06", "Cellular Mechanism"],
    ["07", "HPT Feedback Axis"],
    ["08", "Physiological Effects"],
  ];

  const cols = [[0,1,2,3],[4,5,6,7]];
  cols.forEach((col, ci) => {
    col.forEach((idx, ri) => {
      const t = topics[idx];
      const x = 0.25 + ci * 4.95;
      const y = 1.75 + ri * 0.9;
      card(s, x, y, 4.6, 0.72, C.white);
      // number badge
      s.addShape(pres.shapes.RECTANGLE, {
        x, y, w: 0.5, h: 0.72,
        fill: { color: C.midTeal }, line: { color: C.midTeal }
      });
      s.addText(t[0], {
        x, y, w: 0.5, h: 0.72,
        fontSize: 16, bold: true, color: C.white, align: "center", valign: "middle",
        fontFace: FONT, margin: 0
      });
      s.addText(t[1], {
        x: x + 0.56, y, w: 4.0, h: 0.72,
        fontSize: 14, color: C.textDark, valign: "middle", fontFace: FONT
      });
    });
  });
}

// ══════════════════════════════════════════════════════════════════
// SLIDE 3 — ANATOMY & STRUCTURE
// ══════════════════════════════════════════════════════════════════
{
  let s = pres.addSlide();
  s.addShape(pres.shapes.RECTANGLE, { x:0, y:0, w:10, h:5.625, fill:{color:C.offWhite}, line:{color:C.offWhite} });
  sectionHeader(s, "01 · Anatomy");
  slideTitle(s, "The Thyroid Gland", "Butterfly-shaped gland at the front of the neck");

  // LEFT: key facts
  const facts = [
    ["Location", "Front of neck, below the Adam's apple"],
    ["Shape", "Butterfly — two lobes joined by an isthmus"],
    ["Follicles", "Tiny sacs lined by thyrocytes; filled with colloid"],
    ["Colloid", "Gel-like center storing thyroglobulin (Tg)"],
    ["C-cells", "Parafollicular cells — produce calcitonin"],
  ];
  facts.forEach((f, i) => {
    const y = 1.68 + i * 0.72;
    card(s, 0.25, y, 5.3, 0.65, C.white);
    s.addShape(pres.shapes.RECTANGLE, {
      x: 0.25, y, w: 1.55, h: 0.65,
      fill: { color: C.midTeal }, line: { color: C.midTeal }
    });
    s.addText(f[0], {
      x: 0.25, y, w: 1.55, h: 0.65,
      fontSize: 11, bold: true, color: C.white, align: "center", valign: "middle",
      fontFace: FONT, margin: 0
    });
    s.addText(f[1], {
      x: 1.86, y, w: 3.65, h: 0.65,
      fontSize: 12, color: C.textDark, valign: "middle", fontFace: FONT
    });
  });

  // RIGHT: visual representation of follicle
  card(s, 5.8, 1.55, 3.9, 3.75, C.mint);
  s.addText("Thyroid Follicle Unit", {
    x: 5.8, y: 1.6, w: 3.9, h: 0.35,
    fontSize: 11, bold: true, color: C.textMid, align: "center", fontFace: FONT
  });
  // Colloid circle
  s.addShape(pres.shapes.OVAL, {
    x: 6.8, y: 2.05, w: 1.9, h: 1.9,
    fill: { color: C.softGold }, line: { color: C.gold, width: 2 }
  });
  s.addText("Colloid\n(Tg stores)", {
    x: 6.8, y: 2.05, w: 1.9, h: 1.9,
    fontSize: 10, bold: true, color: C.darkTeal, align: "center", valign: "middle", fontFace: FONT
  });
  // Surrounding cells label
  s.addText("Thyrocytes\n(follicular cells)", {
    x: 5.85, y: 3.9, w: 1.7, h: 0.55,
    fontSize: 9.5, color: C.textMid, align: "center", fontFace: FONT, italic: true
  });
  s.addText("Parafollicular\n(C-cells)", {
    x: 7.95, y: 3.9, w: 1.6, h: 0.55,
    fontSize: 9.5, color: C.textMid, align: "center", fontFace: FONT, italic: true
  });
  // arrows from text to oval (simple lines)
  s.addShape(pres.shapes.RECTANGLE, {
    x: 6.7, y: 3.9, w: 0.06, h: 0.12,
    fill: {color: C.midTeal}, line:{color:C.midTeal}
  });
}

// ══════════════════════════════════════════════════════════════════
// SLIDE 4 — THYROID HORMONES T3 & T4
// ══════════════════════════════════════════════════════════════════
{
  let s = pres.addSlide();
  s.addShape(pres.shapes.RECTANGLE, { x:0, y:0, w:10, h:5.625, fill:{color:C.offWhite}, line:{color:C.offWhite} });
  sectionHeader(s, "02 · Hormones");
  slideTitle(s, "T3 & T4 – The Thyroid Hormones", "Both require iodine to be synthesized");

  // T4 card
  card(s, 0.25, 1.65, 4.55, 3.55, C.white);
  s.addShape(pres.shapes.RECTANGLE, {
    x: 0.25, y: 1.65, w: 4.55, h: 0.55,
    fill: { color: C.midTeal }, line: { color: C.midTeal }
  });
  s.addText("T4  —  Thyroxine", {
    x: 0.25, y: 1.65, w: 4.55, h: 0.55,
    fontSize: 16, bold: true, color: C.white, align: "center", valign: "middle",
    fontFace: FONT, margin: 0
  });
  const t4Facts = [
    "4 iodine atoms",
    "Weaker / inactive 'pro-hormone'",
    "80 µg secreted per day",
    "Converted to T3 in tissues",
    "Half-life: ~7 days",
    "Main form secreted by thyroid",
  ];
  s.addText(t4Facts.map((f,i) => ({
    text: f, options: { bullet: true, breakLine: i < t4Facts.length-1, color: C.textDark, fontSize: 13, fontFace: FONT }
  })), { x: 0.4, y: 2.3, w: 4.2, h: 2.75 });

  // T3 card
  card(s, 5.2, 1.65, 4.55, 3.55, C.white);
  s.addShape(pres.shapes.RECTANGLE, {
    x: 5.2, y: 1.65, w: 4.55, h: 0.55,
    fill: { color: C.lightTeal }, line: { color: C.lightTeal }
  });
  s.addText("T3  —  Triiodothyronine", {
    x: 5.2, y: 1.65, w: 4.55, h: 0.55,
    fontSize: 16, bold: true, color: C.white, align: "center", valign: "middle",
    fontFace: FONT, margin: 0
  });
  const t3Facts = [
    "3 iodine atoms",
    "Stronger, active form",
    "4 µg secreted per day",
    "Most T3 made from T4 in tissues",
    "Half-life: ~1 day",
    "Binds nuclear receptor (TR)",
  ];
  s.addText(t3Facts.map((f,i) => ({
    text: f, options: { bullet: true, breakLine: i < t3Facts.length-1, color: C.textDark, fontSize: 13, fontFace: FONT }
  })), { x: 5.35, y: 2.3, w: 4.2, h: 2.75 });

  // center connector label
  s.addText("T4 → T3", {
    x: 4.1, y: 3.3, w: 1.8, h: 0.4,
    fontSize: 13, bold: true, color: C.gold, align: "center", fontFace: FONT
  });
  s.addText("(deiodination)", {
    x: 4.0, y: 3.65, w: 2.0, h: 0.35,
    fontSize: 10, color: C.textMid, align: "center", fontFace: FONT, italic: true
  });
}

// ══════════════════════════════════════════════════════════════════
// SLIDE 5 — HORMONE SYNTHESIS (diagram + steps)
// ══════════════════════════════════════════════════════════════════
{
  let s = pres.addSlide();
  s.addShape(pres.shapes.RECTANGLE, { x:0, y:0, w:10, h:5.625, fill:{color:C.offWhite}, line:{color:C.offWhite} });
  sectionHeader(s, "03 · Synthesis");
  slideTitle(s, "Step-by-Step Hormone Synthesis", "Occurs at the thyrocyte–colloid interface");

  // textbook synthesis diagram on right
  s.addImage({ data: imgSynthesis, x: 5.1, y: 0.65, w: 4.7, h: 4.85, altText: "Thyroid hormone biosynthesis diagram" });

  // Steps on left
  const steps = [
    ["1", "Iodide Trapping", "Na/I Symporter (NIS) pumps I⁻ from blood into thyrocyte"],
    ["2", "Oxidation", "Thyroid Peroxidase (TPO) converts I⁻ → I₂"],
    ["3", "Organification", "I₂ attaches to tyrosines on Thyroglobulin (Tg) → MIT, DIT"],
    ["4", "Coupling", "DIT+DIT → T4 ; MIT+DIT → T3"],
    ["5", "Secretion", "TSH triggers endocytosis → lysosomes release free T4/T3"],
  ];

  steps.forEach((st, i) => {
    const y = 1.55 + i * 0.78;
    stepBadge(s, st[0], 0.25, y + 0.05);
    s.addText(st[1], {
      x: 0.75, y, w: 4.1, h: 0.33,
      fontSize: 12, bold: true, color: C.textDark, fontFace: FONT
    });
    s.addText(st[2], {
      x: 0.75, y: y + 0.3, w: 4.1, h: 0.38,
      fontSize: 10.5, color: C.textMid, fontFace: FONT
    });
  });
}

// ══════════════════════════════════════════════════════════════════
// SLIDE 6 — TRANSPORT IN BLOOD
// ══════════════════════════════════════════════════════════════════
{
  let s = pres.addSlide();
  s.addShape(pres.shapes.RECTANGLE, { x:0, y:0, w:10, h:5.625, fill:{color:C.offWhite}, line:{color:C.offWhite} });
  sectionHeader(s, "04 · Transport");
  slideTitle(s, "Transport in the Bloodstream", "99% of thyroid hormones are protein-bound");

  // Big stat highlight
  card(s, 0.25, 1.7, 4.0, 1.3, C.darkTeal);
  s.addText(">99%", {
    x: 0.25, y: 1.72, w: 4.0, h: 0.7,
    fontSize: 40, bold: true, color: C.gold, align: "center", fontFace: FONT
  });
  s.addText("Bound to carrier proteins", {
    x: 0.25, y: 2.37, w: 4.0, h: 0.55,
    fontSize: 13, color: C.white, align: "center", fontFace: FONT
  });

  const prots = [
    ["TBG", "Thyroxine-Binding Globulin", "Binds ~70% of T4"],
    ["Albumin", "Most abundant plasma protein", "Binds ~20%"],
    ["TTR", "Transthyretin (pre-albumin)", "Binds ~10%"],
  ];
  prots.forEach((p, i) => {
    const y = 3.18 + i * 0.72;
    card(s, 0.25, y, 4.0, 0.65, C.white);
    s.addShape(pres.shapes.RECTANGLE, {
      x: 0.25, y, w: 0.8, h: 0.65,
      fill: { color: C.midTeal }, line: { color: C.midTeal }
    });
    s.addText(p[0], {
      x: 0.25, y, w: 0.8, h: 0.65,
      fontSize: 11, bold: true, color: C.white, align: "center", valign: "middle",
      fontFace: FONT, margin: 0
    });
    s.addText([
      { text: p[1] + "\n", options: { bold: true, fontSize: 11, color: C.textDark } },
      { text: p[2], options: { fontSize: 10, color: C.textMid } }
    ], { x: 1.1, y, w: 3.1, h: 0.65, valign: "middle", fontFace: FONT });
  });

  // Right side: normal values
  card(s, 4.55, 1.7, 5.2, 2.15, C.mint);
  s.addText("Normal Blood Levels", {
    x: 4.55, y: 1.73, w: 5.2, h: 0.38,
    fontSize: 14, bold: true, color: C.textDark, align: "center", fontFace: FONT
  });
  const vals = [
    ["Total T4", "~8 µg/dL"],
    ["Free T4", "~0.002 µg/dL"],
    ["Total T3", "~0.15 µg/dL"],
  ];
  vals.forEach((v, i) => {
    card(s, 4.7, 2.17 + i * 0.55, 4.85, 0.48, C.white);
    s.addText(v[0], {
      x: 4.7, y: 2.17 + i * 0.55, w: 2.5, h: 0.48,
      fontSize: 12, color: C.textDark, valign: "middle", fontFace: FONT
    });
    s.addText(v[1], {
      x: 7.2, y: 2.17 + i * 0.55, w: 2.3, h: 0.48,
      fontSize: 13, bold: true, color: C.midTeal, valign: "middle", align: "right",
      fontFace: FONT
    });
  });

  // key concept box
  card(s, 4.55, 3.95, 5.2, 1.4, C.softGold);
  s.addText("Key Concept", {
    x: 4.55, y: 3.97, w: 5.2, h: 0.35,
    fontSize: 11, bold: true, color: C.darkTeal, align: "center", fontFace: FONT
  });
  s.addText(
    "Only the FREE (unbound) fraction of T3/T4 is biologically active and feeds back to suppress TSH. The bound pool acts as a hormone reservoir.",
    {
      x: 4.7, y: 4.35, w: 5.0, h: 0.9,
      fontSize: 11, color: C.textDark, fontFace: FONT
    }
  );
}

// ══════════════════════════════════════════════════════════════════
// SLIDE 7 — T4 → T3 DEIODINATION
// ══════════════════════════════════════════════════════════════════
{
  let s = pres.addSlide();
  s.addShape(pres.shapes.RECTANGLE, { x:0, y:0, w:10, h:5.625, fill:{color:C.offWhite}, line:{color:C.offWhite} });
  sectionHeader(s, "05 · Conversion");
  slideTitle(s, "T4 → T3 Peripheral Conversion", "Most active T3 is made in the tissues, not the thyroid");

  // 3 deiodinase type cards
  const dei = [
    { type: "Type I", tissue: "Liver & Kidneys", role: "Main source of circulating T3 from T4", color: C.midTeal },
    { type: "Type II", tissue: "Pituitary, Brain, Brown Fat", role: "Local T3 supply for brain & pituitary feedback", color: C.lightTeal },
    { type: "Type III", tissue: "Placenta, Brain", role: "Converts T4 → Reverse T3 (rT3, inactive)", color: "5A7D8A" },
  ];
  dei.forEach((d, i) => {
    const y = 1.65 + i * 1.15;
    card(s, 0.25, y, 5.5, 1.0, C.white);
    s.addShape(pres.shapes.RECTANGLE, {
      x: 0.25, y, w: 1.4, h: 1.0,
      fill: { color: d.color }, line: { color: d.color }
    });
    s.addText(d.type, {
      x: 0.25, y, w: 1.4, h: 1.0,
      fontSize: 13, bold: true, color: C.white, align: "center", valign: "middle",
      fontFace: FONT, margin: 0
    });
    s.addText([
      { text: d.tissue + "\n", options: { bold: true, fontSize: 12, color: C.textDark } },
      { text: d.role, options: { fontSize: 11, color: C.textMid } }
    ], { x: 1.72, y, w: 3.9, h: 1.0, valign: "middle", fontFace: FONT });
  });

  // rT3 starvation fact box
  card(s, 0.25, 5.0, 5.5, 0.45, C.softGold);
  s.addText("During fasting/illness: T3 falls, rT3 rises — conserving calories and protein.", {
    x: 0.3, y: 5.03, w: 5.4, h: 0.38,
    fontSize: 10.5, color: C.darkTeal, fontFace: FONT, italic: true
  });

  // Right: cellular mechanism image
  s.addImage({ data: imgCellular, x: 5.85, y: 1.15, w: 3.95, h: 4.2, altText: "Cellular mechanism of thyroid hormone action" });
  s.addText("Cellular Mechanism of T3 Action", {
    x: 5.85, y: 5.28, w: 3.95, h: 0.25,
    fontSize: 8.5, color: C.textMid, align: "center", fontFace: FONT, italic: true
  });
}

// ══════════════════════════════════════════════════════════════════
// SLIDE 8 — HPT FEEDBACK AXIS
// ══════════════════════════════════════════════════════════════════
{
  let s = pres.addSlide();
  darkBg(s);
  // top strip
  s.addShape(pres.shapes.RECTANGLE, {
    x: 0, y: 0, w: 10, h: 0.08,
    fill: { color: C.gold }, line: { color: C.gold }
  });
  s.addText("06 · Regulation", {
    x: 0.3, y: 0.2, w: 2.0, h: 0.35,
    fontSize: 9, bold: true, color: C.darkTeal, align: "center", valign: "middle",
    fontFace: FONT,
    fill: { color: C.lightTeal }
  });

  s.addText("The HPT Axis — Negative Feedback", {
    x: 0.25, y: 0.65, w: 9.5, h: 0.6,
    fontSize: 24, bold: true, color: C.white, fontFace: FONT
  });
  s.addShape(pres.shapes.RECTANGLE, {
    x: 0.25, y: 1.22, w: 1.2, h: 0.06,
    fill: { color: C.gold }, line: { color: C.gold }
  });
  s.addText("Hypothalamus → Pituitary → Thyroid — controlled by T3/T4 feedback", {
    x: 0.25, y: 1.32, w: 9.5, h: 0.33,
    fontSize: 13, color: C.mint, fontFace: FONT, italic: true
  });

  // Feedback image on right
  s.addImage({ data: imgFeedback, x: 5.9, y: 1.55, w: 3.8, h: 3.8, altText: "HPT feedback axis diagram" });

  // Flow boxes on left
  const nodes = [
    { label: "Hypothalamus", sub: "Releases TRH", color: C.midTeal },
    { label: "Anterior Pituitary", sub: "Releases TSH", color: C.lightTeal },
    { label: "Thyroid Gland", sub: "Produces T3 & T4", color: "2AAD8F" },
    { label: "Bloodstream", sub: "Free T3/T4 rise", color: "3DA87A" },
  ];
  nodes.forEach((n, i) => {
    const y = 1.6 + i * 0.9;
    s.addShape(pres.shapes.ROUNDED_RECTANGLE, {
      x: 0.3, y, w: 3.9, h: 0.7,
      fill: { color: n.color }, line: { color: C.white, width: 1 }, rectRadius: 0.08
    });
    s.addText([
      { text: n.label + "  ", options: { bold: true, fontSize: 13, color: C.white } },
      { text: n.sub, options: { fontSize: 11, color: C.mint } }
    ], { x: 0.5, y, w: 3.7, h: 0.7, valign: "middle", fontFace: FONT });

    if (i < nodes.length - 1) {
      s.addText("▼", {
        x: 1.9, y: y + 0.72, w: 0.5, h: 0.18,
        fontSize: 12, color: C.gold, align: "center", fontFace: FONT
      });
    }
  });

  // Negative feedback label
  card(s, 0.3, 5.18, 3.9, 0.3, "1A3D4A");
  s.addText("⟵  Negative feedback suppresses TRH & TSH when T3/T4 are high", {
    x: 0.3, y: 5.18, w: 3.9, h: 0.3,
    fontSize: 9.5, color: C.gold, align: "center", valign: "middle", fontFace: FONT
  });
}

// ══════════════════════════════════════════════════════════════════
// SLIDE 9 — PHYSIOLOGICAL EFFECTS
// ══════════════════════════════════════════════════════════════════
{
  let s = pres.addSlide();
  s.addShape(pres.shapes.RECTANGLE, { x:0, y:0, w:10, h:5.625, fill:{color:C.offWhite}, line:{color:C.offWhite} });
  sectionHeader(s, "07 · Effects");
  slideTitle(s, "What Do Thyroid Hormones Do?", "T3/T4 affect virtually every cell in the body");

  const effects = [
    { sys: "Metabolism", icon: "⚡", detail: "↑ Basal metabolic rate, ATP production, O₂ consumption & heat generation" },
    { sys: "Heart", icon: "❤", detail: "↑ Heart rate & cardiac output; promotes vasodilation" },
    { sys: "Brain", icon: "🧠", detail: "Essential for fetal brain development; affects mood & cognition" },
    { sys: "Growth", icon: "📈", detail: "Required for normal childhood growth; works with growth hormone" },
    { sys: "Reproduction", icon: "♀", detail: "Normal menstrual cycles and fertility depend on T3/T4" },
    { sys: "Liver/Muscle", icon: "⚙", detail: "Stimulates lipid and carbohydrate metabolism" },
  ];

  // 2 × 3 grid
  effects.forEach((e, i) => {
    const col = i % 2;
    const row = Math.floor(i / 2);
    const x = 0.25 + col * 4.9;
    const y = 1.65 + row * 1.27;
    card(s, x, y, 4.55, 1.12, C.white);
    // colored left strip with icon
    s.addShape(pres.shapes.RECTANGLE, {
      x, y, w: 0.75, h: 1.12,
      fill: { color: C.midTeal }, line: { color: C.midTeal }
    });
    s.addText(e.icon, {
      x, y, w: 0.75, h: 1.12,
      fontSize: 20, align: "center", valign: "middle", fontFace: FONT, margin: 0
    });
    s.addText([
      { text: e.sys + "\n", options: { bold: true, fontSize: 13, color: C.textDark } },
      { text: e.detail, options: { fontSize: 11, color: C.textMid } }
    ], { x: x + 0.82, y, w: 3.65, h: 1.12, valign: "middle", fontFace: FONT });
  });
}

// ══════════════════════════════════════════════════════════════════
// SLIDE 10 — IODINE & CLINICAL CONTEXT
// ══════════════════════════════════════════════════════════════════
{
  let s = pres.addSlide();
  s.addShape(pres.shapes.RECTANGLE, { x:0, y:0, w:10, h:5.625, fill:{color:C.offWhite}, line:{color:C.offWhite} });
  sectionHeader(s, "08 · Iodine");
  slideTitle(s, "Iodine — The Essential Ingredient", "Thyroid hormones cannot be made without iodine");

  // Stats row
  const stats = [
    { val: "0.1 mg", label: "Daily iodine requirement" },
    { val: "2 months", label: "Iodine reserve in colloid" },
    { val: "54", label: "Countries still iodine-deficient" },
  ];
  stats.forEach((st, i) => {
    card(s, 0.25 + i * 3.22, 1.65, 2.95, 1.25, C.darkTeal);
    s.addText(st.val, {
      x: 0.25 + i * 3.22, y: 1.68, w: 2.95, h: 0.75,
      fontSize: 30, bold: true, color: C.gold, align: "center", fontFace: FONT
    });
    s.addText(st.label, {
      x: 0.25 + i * 3.22, y: 2.38, w: 2.95, h: 0.45,
      fontSize: 11, color: C.mint, align: "center", fontFace: FONT
    });
  });

  // Deficiency box
  card(s, 0.25, 3.05, 4.55, 2.25, C.white);
  s.addShape(pres.shapes.RECTANGLE, {
    x: 0.25, y: 3.05, w: 4.55, h: 0.45,
    fill: { color: "B03030" }, line: { color: "B03030" }
  });
  s.addText("Iodine Deficiency Effects", {
    x: 0.25, y: 3.05, w: 4.55, h: 0.45,
    fontSize: 13, bold: true, color: C.white, align: "center", valign: "middle",
    fontFace: FONT, margin: 0
  });
  const defFacts = [
    "Thyroid can't make enough T3/T4",
    "TSH rises, gland enlarges → Goiter",
    "Hypothyroidism (fatigue, weight gain, cold intolerance)",
    "In pregnancy: cretinism, impaired fetal brain development",
  ];
  s.addText(defFacts.map((f, i) => ({
    text: f, options: { bullet: true, breakLine: i < defFacts.length-1, fontSize: 12, color: C.textDark, fontFace: FONT }
  })), { x: 0.4, y: 3.55, w: 4.2, h: 1.68 });

  // Sources box
  card(s, 5.0, 3.05, 4.75, 2.25, C.white);
  s.addShape(pres.shapes.RECTANGLE, {
    x: 5.0, y: 3.05, w: 4.75, h: 0.45,
    fill: { color: C.midTeal }, line: { color: C.midTeal }
  });
  s.addText("Dietary Iodine Sources", {
    x: 5.0, y: 3.05, w: 4.75, h: 0.45,
    fontSize: 13, bold: true, color: C.white, align: "center", valign: "middle",
    fontFace: FONT, margin: 0
  });
  const foods = ["Fish & Seafood", "Seaweed", "Iodized salt (USA since 1924)", "Dairy products", "Eggs"];
  s.addText(foods.map((f, i) => ({
    text: f, options: { bullet: true, breakLine: i < foods.length-1, fontSize: 12, color: C.textDark, fontFace: FONT }
  })), { x: 5.15, y: 3.55, w: 4.45, h: 1.68 });
}

// ══════════════════════════════════════════════════════════════════
// SLIDE 11 — SUMMARY / RECAP
// ══════════════════════════════════════════════════════════════════
{
  let s = pres.addSlide();
  darkBg(s);
  s.addShape(pres.shapes.RECTANGLE, {
    x: 0, y: 0, w: 10, h: 0.08,
    fill: { color: C.gold }, line: { color: C.gold }
  });

  s.addText("Summary", {
    x: 0.3, y: 0.18, w: 1.6, h: 0.36,
    fontSize: 9, bold: true, color: C.darkTeal, align: "center", valign: "middle",
    fontFace: FONT, fill: { color: C.lightTeal }
  });

  s.addText("The Full Thyroid Story", {
    x: 0.3, y: 0.65, w: 9.4, h: 0.6,
    fontSize: 26, bold: true, color: C.white, fontFace: FONT
  });

  // flow arrow chain
  const flow = [
    "Dietary Iodine",
    "NIS Trapping",
    "Organification (TPO)",
    "T4/T3 in Colloid",
    "TSH → Secretion",
    "Blood Transport",
    "T4 → T3 (Deiodinase)",
    "Nuclear Receptor (TR)",
    "Gene Expression",
  ];
  flow.forEach((label, i) => {
    const x = 0.25 + (i % 5) * 1.92;
    const y = i < 5 ? 1.5 : 3.35;
    s.addShape(pres.shapes.ROUNDED_RECTANGLE, {
      x, y, w: 1.75, h: 0.65,
      fill: { color: i === 0 ? C.gold : C.midTeal },
      line: { color: C.lightTeal, width: 1 },
      rectRadius: 0.08
    });
    s.addText(label, {
      x, y, w: 1.75, h: 0.65,
      fontSize: 9.5, bold: i === 0, color: i === 0 ? C.darkTeal : C.white,
      align: "center", valign: "middle", fontFace: FONT, margin: 0
    });
    // arrows between nodes (except last of each row)
    if (i < 4 || (i >= 5 && i < 8)) {
      s.addText("→", {
        x: x + 1.77, y, w: 0.15, h: 0.65,
        fontSize: 12, color: C.gold, align: "center", valign: "middle", fontFace: FONT
      });
    }
  });

  // feedback loop label
  s.addShape(pres.shapes.RECTANGLE, {
    x: 0.25, y: 2.2, w: 9.5, h: 0.06,
    fill: { color: "1A4D5A" }, line: { color: "1A4D5A" }
  });
  s.addText("↑ T3/T4 feeds back to suppress TRH & TSH (negative feedback)", {
    x: 0.25, y: 2.28, w: 9.5, h: 0.35,
    fontSize: 11, color: C.gold, align: "center", fontFace: FONT, italic: true
  });

  s.addText("Sources: Ganong's Review of Medical Physiology, 26th Ed. · Sabiston Textbook of Surgery, 21st Ed.", {
    x: 0.3, y: 5.28, w: 9.4, h: 0.25,
    fontSize: 8, color: C.mint, align: "center", fontFace: FONT
  });
}

// ══════════════════════════════════════════════════════════════════
// SAVE
// ══════════════════════════════════════════════════════════════════
pres.writeFile({ fileName: "/home/daytona/workspace/thyroid-ppt/Thyroid_Physiology.pptx" })
  .then(() => console.log("✅ Saved: Thyroid_Physiology.pptx"))
  .catch(e => { console.error("❌ Error:", e); process.exit(1); });
Running Command

cd /home/daytona/workspace/thyroid-ppt && node generate.js 2>&1

Running Command

ls -lh /home/daytona/workspace/thyroid-ppt/Thyroid_Physiology.pptx

Your presentation is ready! Here's the download link:

Thyroid Physiology

Presentation · PPTX


What's inside (11 slides):
SlideContent
1Title slide - dark teal with gold accents
2Agenda - 8 topics overview
3Anatomy & Structure - follicle diagram
4T3 vs T4 - side-by-side comparison cards
5Step-by-Step Hormone Synthesis - with textbook diagram
6Blood Transport - protein binding & normal values
7T4 → T3 Conversion - deiodinase types + cellular action diagram
8HPT Feedback Axis - dark slide with flow + feedback diagram
9Physiological Effects - 6-system grid
10Iodine - deficiency effects & dietary sources
11Summary - full pathway flow recap
The design uses a dark teal + gold medical palette with real textbook diagrams (from Ganong's Physiology) embedded directly into the slides.
This is a shared conversation. Sign in to Orris to start your own chat.