Hii
Can u explain the physiology of thyroid in detail and simple
| Hormone | Full Name | Iodine atoms | Potency |
|---|---|---|---|
| T4 | Thyroxine | 4 | Weaker (inactive "pro-hormone") |
| T3 | Triiodothyronine | 3 | Stronger (active form) |



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
| System | Effect |
|---|---|
| Metabolism | Increase basal metabolic rate, ATP production, O2 consumption, heat generation |
| Heart | Increase heart rate and cardiac output; causes vasodilation |
| Brain/Nervous System | Essential for fetal brain development; affects mood and cognition |
| Growth | Required for normal childhood growth (works with growth hormone) |
| Reproduction | Normal menstrual cycles and fertility depend on thyroid function |
| Liver/Muscle | Stimulates lipid and carbohydrate metabolism |
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
Make this into a ppt
mkdir -p /home/daytona/workspace/thyroid-ppt && ls /home/daytona/workspace/thyro…
node /home/daytona/skills/shared/scripts/fetch_images.js \ "https://cdn.orris.…
~/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); });
cd /home/daytona/workspace/thyroid-ppt && node generate.js 2>&1
ls -lh /home/daytona/workspace/thyroid-ppt/Thyroid_Physiology.pptx
Thyroid Physiology
Presentation · PPTX
| Slide | Content |
|---|---|
| 1 | Title slide - dark teal with gold accents |
| 2 | Agenda - 8 topics overview |
| 3 | Anatomy & Structure - follicle diagram |
| 4 | T3 vs T4 - side-by-side comparison cards |
| 5 | Step-by-Step Hormone Synthesis - with textbook diagram |
| 6 | Blood Transport - protein binding & normal values |
| 7 | T4 → T3 Conversion - deiodinase types + cellular action diagram |
| 8 | HPT Feedback Axis - dark slide with flow + feedback diagram |
| 9 | Physiological Effects - 6-system grid |
| 10 | Iodine - deficiency effects & dietary sources |
| 11 | Summary - full pathway flow recap |