cell

Asking for Preferences
"Cell" is quite broad. Could you tell me more about what you're looking for?
  • Cell biology — organelles, structure, function
  • Cell division — mitosis, meiosis, cell cycle
  • A specific cell type — neurons, red blood cells, stem cells, etc.
  • Cellular pathology — cancer cells, cell death, disease
  • Something else entirely — phone cell, prison cell, fuel cell, spreadsheet cell…
What's on your mind?

create a well designed powerpoint with good animation and font with images on each organelles and other beautiful pictures with charts on different aspects with a video at last slide showing cell differentiation works pit it in pdf so as i can download it

Reading File
Reading File
Searching Images

cell organelles diagram nucleus mitochondria endoplasmic reticulum

Reading File
Searching Images

cell differentiation stem cell development biology

Running Command

mkdir -p /home/daytona/workspace/cell-biology-ppt && ls /home/daytona/workspace/cell-biology-ppt/

Writing File

~/cell-biology-ppt/build.js

const pptxgen = require("pptxgenjs");
const { execSync } = require("child_process");
const fs = require("fs");

// ─── COLOUR PALETTE ───────────────────────────────────────────────────────────
const BG_DARK   = "0B1120";   // deep navy
const BG_CARD   = "121E35";   // slightly lighter navy
const ACCENT1   = "00D4FF";   // cyan
const ACCENT2   = "7B2FFF";   // violet
const ACCENT3   = "00FFB0";   // mint green
const WHITE     = "FFFFFF";
const LIGHT     = "C8D8F0";
const SUBTITLE  = "8BAED4";

// ─── IMAGE URLS ───────────────────────────────────────────────────────────────
const IMG_URLS = {
  // Cell overview / organelles diagram
  organelles: "https://cdn.orris.care/cdss_images/pmc_clinical_VQA_481036642dccfd84cc85afbaa313a09a33c046eed185f2f14fa3f216a2e146a7.jpg",
  // Mitochondria ER 3D
  mito_er:    "https://cdn.orris.care/cdss_images/pmc_clinical_VQA_a93d4f07af9f284150cb16d5a7de730e1411689752dcdfc303d799b0d6245d5d.jpg",
  // ER stress / signaling
  er_stress:  "https://cdn.orris.care/cdss_images/pmc_clinical_VQA_3fefbb1dca70a3d8f0f429a8bdf67bc8578b98d2672cefb1a86fb20c5a35ccb7.jpg",
  // Cell signaling pathways
  signaling:  "https://cdn.orris.care/cdss_images/pmc_clinical_VQA_c1606e3145fdd8cfd4010380c6e05e6eb2a04ff29296ba15e4b7e8635958b44e.jpg",
  // Stem cell differentiation hierarchy
  stem_hier:  "https://cdn.orris.care/cdss_images/pmc_clinical_VQA_eacb0383af12b26d4cd9962ccdc146817e4024164894ad702d942e1743e72359.jpg",
  // Differentiation pathways
  diff_paths: "https://cdn.orris.care/cdss_images/pmc_clinical_VQA_160bb77cb54bc0d1cfb32c60c3043a091ff38d2ace4ec79df3682c0246fd33b2.jpg",
};

// ─── FETCH IMAGES ─────────────────────────────────────────────────────────────
console.log("Fetching images...");
const urlList = Object.values(IMG_URLS).map(u => `"${u}"`).join(" ");
const fetchResult = JSON.parse(
  execSync(`node /home/daytona/skills/shared/scripts/fetch_images.js ${urlList}`, { maxBuffer: 50 * 1024 * 1024 }).toString()
);

const imgData = {};
Object.keys(IMG_URLS).forEach((key, i) => {
  if (fetchResult[i] && !fetchResult[i].error) {
    imgData[key] = fetchResult[i].base64;
  } else {
    console.warn(`Failed to fetch image: ${key}`);
    imgData[key] = null;
  }
});
console.log("Images fetched:", Object.keys(imgData).filter(k => imgData[k]).join(", "));

// ─── HELPERS ──────────────────────────────────────────────────────────────────
function gradientRect(slide, x, y, w, h, color, opacity = 15) {
  slide.addShape("rect", {
    x, y, w, h,
    fill: { color, transparency: 100 - opacity },
    line: { color: "FFFFFF", transparency: 95, w: 0.5 }
  });
}

function addSlideHeader(slide, title, subtitle = "") {
  // Top accent bar
  slide.addShape("rect", { x: 0, y: 0, w: 13.33, h: 0.08, fill: { color: ACCENT1 } });
  // Title
  slide.addText(title, {
    x: 0.5, y: 0.15, w: 12.33, h: 0.65,
    fontSize: 28, bold: true, color: WHITE, fontFace: "Calibri",
    align: "left", charSpacing: 1
  });
  if (subtitle) {
    slide.addText(subtitle, {
      x: 0.5, y: 0.82, w: 12.33, h: 0.35,
      fontSize: 14, color: SUBTITLE, fontFace: "Calibri", align: "left", italic: true
    });
  }
  // Bottom accent line
  slide.addShape("line", { x: 0.5, y: 1.22, w: 12.33, h: 0, line: { color: ACCENT1, w: 1, transparency: 60 } });
}

function infoCard(slide, x, y, w, h, heading, body, accentColor = ACCENT1) {
  // Card background
  slide.addShape("roundRect", {
    x, y, w, h, rectRadius: 0.08,
    fill: { color: BG_CARD },
    line: { color: accentColor, w: 1.5, transparency: 30 }
  });
  // Accent top strip
  slide.addShape("roundRect", { x, y, w, h: 0.06, rectRadius: 0.03, fill: { color: accentColor, transparency: 20 } });
  // Heading
  slide.addText(heading, {
    x: x + 0.12, y: y + 0.1, w: w - 0.24, h: 0.3,
    fontSize: 11, bold: true, color: accentColor, fontFace: "Calibri", margin: 0
  });
  // Body
  slide.addText(body, {
    x: x + 0.12, y: y + 0.42, w: w - 0.24, h: h - 0.52,
    fontSize: 9.5, color: LIGHT, fontFace: "Calibri", margin: 0, wrap: true
  });
}

// ─── PRESENTATION ─────────────────────────────────────────────────────────────
const pres = new pptxgen();
pres.layout = "LAYOUT_WIDE";   // 13.33 × 7.5
pres.title  = "The Cell – Biology Masterclass";
pres.author = "Cell Biology";

// ══════════════════════════════════════════════════════════════════════════════
// SLIDE 1 – Title / Cover
// ══════════════════════════════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  s.background = { color: BG_DARK };

  // Radial glow circles
  s.addShape("ellipse", { x: 4.5, y: 0.5, w: 8, h: 8, fill: { color: ACCENT2, transparency: 88 }, line: { type: "none" } });
  s.addShape("ellipse", { x: 5.5, y: 1.2, w: 5.5, h: 5.5, fill: { color: ACCENT1, transparency: 92 }, line: { type: "none" } });

  // Decorative hexagons
  for (let i = 0; i < 5; i++) {
    s.addShape("hexagon", {
      x: 0.3 + i * 0.55, y: 6.3 + (i % 2) * 0.2, w: 0.4, h: 0.4,
      fill: { color: ACCENT1, transparency: 70 }, line: { type: "none" }
    });
  }

  s.addText("THE CELL", {
    x: 0.8, y: 1.2, w: 9, h: 1.5,
    fontSize: 72, bold: true, color: WHITE, fontFace: "Calibri",
    charSpacing: 10, align: "left"
  });
  s.addText("Biology Masterclass", {
    x: 0.8, y: 2.8, w: 9, h: 0.6,
    fontSize: 28, color: ACCENT1, fontFace: "Calibri", align: "left", italic: true
  });
  s.addShape("line", { x: 0.8, y: 3.5, w: 6, h: 0, line: { color: ACCENT1, w: 2 } });
  s.addText("Exploring Organelles · Structure · Function · Division · Differentiation", {
    x: 0.8, y: 3.65, w: 10, h: 0.4,
    fontSize: 14, color: SUBTITLE, fontFace: "Calibri", align: "left"
  });

  s.addText("🔬  Nucleus  ·  Mitochondria  ·  ER  ·  Golgi  ·  Ribosomes  ·  Lysosomes  ·  Cytoskeleton", {
    x: 0.8, y: 6.7, w: 12, h: 0.35,
    fontSize: 11, color: ACCENT3, fontFace: "Calibri", align: "left"
  });
}

// ══════════════════════════════════════════════════════════════════════════════
// SLIDE 2 – What is a Cell?
// ══════════════════════════════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  s.background = { color: BG_DARK };
  addSlideHeader(s, "What Is a Cell?", "The fundamental unit of life");

  // Two columns
  const facts = [
    ["Discovered By", "Robert Hooke (1665) observed cork cells under a microscope — coined 'cell'"],
    ["Size Range", "Typical eukaryotic cells: 10–100 µm · Prokaryotic: 1–10 µm"],
    ["Cell Theory", "All living things are made of cells · The cell is the basic unit of life · All cells arise from pre-existing cells"],
    ["Types", "Prokaryotes (no nucleus) & Eukaryotes (membrane-bound nucleus)"],
    ["Numbers", "Human body contains ~37 trillion cells across 200+ distinct types"],
  ];

  facts.forEach(([heading, body], i) => {
    const col = i < 3 ? 0 : 1;
    const row = i < 3 ? i : i - 3;
    infoCard(s, 0.4 + col * 6.5, 1.4 + row * 1.82, 6.2, 1.65, heading, body, i % 2 === 0 ? ACCENT1 : ACCENT3);
  });

  // Big number callout
  s.addShape("roundRect", { x: 0.4, y: 1.4 + 3 * 1.82, w: 12.5, h: 1.0, rectRadius: 0.08, fill: { color: ACCENT2, transparency: 80 }, line: { type: "none" } });
  s.addText(""The cell is the atom of biology — the indivisible unit that defines life."", {
    x: 0.6, y: 1.4 + 3 * 1.82 + 0.15, w: 12.1, h: 0.6,
    fontSize: 13, italic: true, color: WHITE, fontFace: "Calibri", align: "center"
  });
}

// ══════════════════════════════════════════════════════════════════════════════
// SLIDE 3 – Cell Overview Diagram (image)
// ══════════════════════════════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  s.background = { color: BG_DARK };
  addSlideHeader(s, "Inside a Cell", "Overview of major organelles");

  if (imgData.organelles) {
    s.addImage({ data: imgData.organelles, x: 0.4, y: 1.35, w: 7.5, h: 5.7 });
  }

  // Caption cards on right
  const items = [
    ["🔵 Nucleus", "Houses DNA & controls gene expression"],
    ["🟢 Mitochondria", "ATP synthesis — the powerhouse"],
    ["🔴 ER", "Protein folding & lipid synthesis"],
    ["🟡 Golgi", "Sorts & ships proteins"],
    ["⚪ Ribosomes", "Translate mRNA → protein"],
    ["🟣 Vacuole", "Storage & waste management"],
  ];
  items.forEach(([h, b], i) => {
    infoCard(s, 8.15, 1.35 + i * 0.95, 5.0, 0.88, h, b, i % 3 === 0 ? ACCENT1 : i % 3 === 1 ? ACCENT3 : ACCENT2);
  });
}

// ══════════════════════════════════════════════════════════════════════════════
// SLIDE 4 – The Nucleus
// ══════════════════════════════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  s.background = { color: BG_DARK };
  addSlideHeader(s, "The Nucleus", "Command centre of the cell");

  s.addShape("ellipse", { x: 0.5, y: 1.4, w: 5.5, h: 5.5, fill: { color: ACCENT2, transparency: 78 }, line: { color: ACCENT2, w: 2, transparency: 40 } });
  s.addShape("ellipse", { x: 1.5, y: 2.4, w: 2.5, h: 2.5, fill: { color: ACCENT1, transparency: 70 }, line: { color: ACCENT1, w: 1.5, transparency: 30 } });
  s.addText("Nucleus", { x: 2.0, y: 3.3, w: 2, h: 0.4, fontSize: 14, bold: true, color: WHITE, fontFace: "Calibri", align: "center" });
  s.addText("Nucleolus", { x: 1.6, y: 3.6, w: 2.8, h: 0.35, fontSize: 11, color: ACCENT3, fontFace: "Calibri", align: "center", italic: true });
  s.addText("Nuclear\nEnvelope", { x: 0.2, y: 2.2, w: 1.8, h: 0.6, fontSize: 10, color: ACCENT1, fontFace: "Calibri", align: "right" });
  s.addShape("line", { x: 1.8, y: 2.5, w: -1.0, h: 0, line: { color: ACCENT1, w: 1 } });

  // Info cards
  const nucleus_facts = [
    ["Nuclear Envelope", "Double phospholipid bilayer punctured by ~3,000 nuclear pore complexes (NPCs) per nucleus"],
    ["Nucleolus", "Dense region where rRNA genes are transcribed; ribosome subunits assembled here"],
    ["Chromatin", "DNA wound around histone octamers → nucleosomes → 30 nm fibre → loops → chromosomes"],
    ["Function", "Stores the genome (3.2 billion bp in humans) · Coordinates DNA replication & transcription"],
  ];
  nucleus_facts.forEach(([h, b], i) => {
    infoCard(s, 6.3, 1.35 + i * 1.5, 6.7, 1.35, h, b, i % 2 === 0 ? ACCENT1 : ACCENT3);
  });
}

// ══════════════════════════════════════════════════════════════════════════════
// SLIDE 5 – Mitochondria
// ══════════════════════════════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  s.background = { color: BG_DARK };
  addSlideHeader(s, "Mitochondria", "The powerhouse of the cell");

  if (imgData.mito_er) {
    s.addImage({ data: imgData.mito_er, x: 0.4, y: 1.35, w: 6.0, h: 5.7 });
  }

  const mito = [
    ["Structure", "Double membrane: outer (smooth) + inner (folded cristae) · Matrix inside · Own mtDNA (~16.5 kb)"],
    ["ATP Synthesis", "Electron transport chain (ETC) on inner membrane · Proton gradient drives ATP synthase · ~30 ATP per glucose"],
    ["Endosymbiosis", "Arose ~1.5 billion years ago from engulfed α-proteobacterium · Still divides by binary fission"],
    ["Other Roles", "Ca²⁺ buffering · Apoptosis initiation (cytochrome c) · Heat production in brown fat · ROS signalling"],
    ["Disease", "Mitochondrial myopathies · Parkinson's disease · Metabolic syndrome"],
  ];
  mito.forEach(([h, b], i) => {
    infoCard(s, 6.7, 1.35 + i * 1.2, 6.3, 1.1, h, b, i % 2 === 0 ? ACCENT3 : ACCENT1);
  });
}

// ══════════════════════════════════════════════════════════════════════════════
// SLIDE 6 – Endoplasmic Reticulum & Golgi
// ══════════════════════════════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  s.background = { color: BG_DARK };
  addSlideHeader(s, "ER & Golgi Apparatus", "The cell's manufacturing and shipping network");

  if (imgData.er_stress) {
    s.addImage({ data: imgData.er_stress, x: 6.8, y: 1.35, w: 6.2, h: 5.7 });
  }

  const er_golgi = [
    ["Rough ER", "Studded with ribosomes · Synthesises secretory, membrane & lysosomal proteins · Initiates N-glycosylation"],
    ["Smooth ER", "Lipid & steroid synthesis · Drug detoxification (P450 enzymes) · Ca²⁺ storage"],
    ["ER Stress (UPR)", "Unfolded proteins trigger PERK/IRE1α/ATF6 pathways → either restore homeostasis or trigger apoptosis"],
    ["Golgi Apparatus", "Stacked cisternae (cis → medial → trans) · O-glycosylation · Protein sorting to lysosomes, plasma membrane, secretion"],
    ["Vesicle Transport", "COPII vesicles: ER→Golgi · COPI: Golgi→ER (retrograde) · Clathrin: Golgi→endosomes"],
  ];
  er_golgi.forEach(([h, b], i) => {
    infoCard(s, 0.4, 1.35 + i * 1.2, 6.1, 1.1, h, b, i % 2 === 0 ? ACCENT1 : ACCENT2);
  });
}

// ══════════════════════════════════════════════════════════════════════════════
// SLIDE 7 – Other Key Organelles
// ══════════════════════════════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  s.background = { color: BG_DARK };
  addSlideHeader(s, "Other Key Organelles", "Ribosomes · Lysosomes · Peroxisomes · Cytoskeleton · Plasma Membrane");

  const organelles = [
    { name: "Ribosomes", icon: "⚙️", body: "80S (eukaryotes): 60S + 40S subunits · Translates mRNA into protein · Free (cytosolic) or bound to rER", color: ACCENT1 },
    { name: "Lysosomes", icon: "🔵", body: "pH 4.5–5 lumen · ~60 hydrolytic enzymes · Degrades phagocytosed material, old organelles (autophagy), excess glycogen", color: ACCENT2 },
    { name: "Peroxisomes", icon: "🟢", body: "Oxidative degradation of fatty acids (β-oxidation) · Detoxifies H₂O₂ via catalase · Bile acid synthesis", color: ACCENT3 },
    { name: "Cytoskeleton", icon: "🕸️", body: "Microfilaments (actin, 7nm) · Intermediate filaments (10nm) · Microtubules (25nm, tubulin) · Cell shape, motility, division", color: ACCENT1 },
    { name: "Plasma Membrane", icon: "🔲", body: "Fluid mosaic model: phospholipid bilayer + cholesterol + integral/peripheral proteins · Selective permeability · Receptor signalling", color: ACCENT3 },
    { name: "Centrosome", icon: "✴️", body: "2 centrioles (9+0 triplet MTs) · Organises mitotic spindle · Nucleates microtubules from γ-TuRC", color: ACCENT2 },
  ];

  const cols = 3, rows = 2;
  const cw = 4.1, ch = 2.55, gx = 0.3, gy = 1.35;
  organelles.forEach(({ name, icon, body, color }, i) => {
    const col = i % cols;
    const row = Math.floor(i / cols);
    const x = gx + col * (cw + 0.2);
    const y = gy + row * (ch + 0.15);
    infoCard(s, x, y, cw, ch, `${icon} ${name}`, body, color);
  });
}

// ══════════════════════════════════════════════════════════════════════════════
// SLIDE 8 – Cell Signalling (image + data)
// ══════════════════════════════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  s.background = { color: BG_DARK };
  addSlideHeader(s, "Cell Signalling Pathways", "How cells receive and process information");

  if (imgData.signaling) {
    s.addImage({ data: imgData.signaling, x: 0.4, y: 1.35, w: 6.5, h: 5.7 });
  }

  const pathways = [
    ["MAPK / ERK", "Growth factor receptors → RAS → RAF → MEK → ERK → gene transcription · Mutated in ~30% of cancers"],
    ["PI3K / AKT / mTOR", "Insulin/IGF signalling · Cell survival & metabolism · Inhibited by PTEN tumour suppressor"],
    ["NF-κB", "Inflammatory cytokines (TNF-α, IL-1β) → IKK → IκB degradation → NF-κB nucleus entry → inflammation genes"],
    ["Wnt / β-catenin", "Developmental patterning · Stem cell maintenance · Aberrant activation → colorectal cancer"],
    ["EGFR Pathway", "EGF binds receptor → RAS/MAPK + PI3K · Target for cancer therapy (Erlotinib, Cetuximab)"],
  ];
  pathways.forEach(([h, b], i) => {
    infoCard(s, 7.2, 1.35 + i * 1.2, 5.9, 1.1, h, b, [ACCENT1, ACCENT3, ACCENT2, ACCENT1, ACCENT3][i]);
  });
}

// ══════════════════════════════════════════════════════════════════════════════
// SLIDE 9 – CHART: Organelle Size Comparison
// ══════════════════════════════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  s.background = { color: BG_DARK };
  addSlideHeader(s, "Organelle Size Comparison", "Approximate diameters / lengths in micrometres (µm)");

  s.addChart(pres.ChartType.bar, [
    {
      name: "Size (µm)",
      labels: ["Nucleus", "Mitochondria", "Lysosome", "Peroxisome", "Ribosome (nm×10)", "Vesicle", "Microtubule dia."],
      values: [6, 2, 1, 0.5, 0.25, 0.1, 0.025]
    }
  ], {
    x: 0.4, y: 1.35, w: 8.5, h: 5.7,
    chartColors: [ACCENT1, ACCENT3, ACCENT2, "FF6B6B", "FFD93D", "6BCB77", "4D96FF"],
    showLegend: false, showTitle: false, showValue: true,
    valAxisTitle: "Size (µm)", catAxisTitle: "Organelle",
    valAxisTitleColor: LIGHT, catAxisTitleColor: LIGHT,
    valAxisLabelColor: LIGHT, catAxisLabelColor: LIGHT,
    dataLabelColor: WHITE, dataLabelFontSize: 10,
    plotAreaBorderColor: "FFFFFF", plotAreaBorderTransparency: 90,
    valGridLineColor: "FFFFFF",
    barGapWidthPct: 35,
    barDir: "bar"
  });

  // Annotations
  const notes = [
    "Nucleus: largest organelle, 6 µm avg",
    "Mitochondria: 1–10 µm, highly dynamic",
    "Lysosomes: 0.1–1.2 µm, acidic lumen",
    "Ribosomes: only ~25 nm — hundreds of thousands per cell",
  ];
  notes.forEach((n, i) => {
    s.addText(`• ${n}`, {
      x: 9.1, y: 1.5 + i * 1.3, w: 4.0, h: 1.1,
      fontSize: 10.5, color: LIGHT, fontFace: "Calibri", wrap: true,
      fill: { color: BG_CARD }, margin: 8
    });
  });
}

// ══════════════════════════════════════════════════════════════════════════════
// SLIDE 10 – CHART: Energy Production
// ══════════════════════════════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  s.background = { color: BG_DARK };
  addSlideHeader(s, "Cellular Energy Production", "ATP yield per glucose molecule across metabolic pathways");

  s.addChart(pres.ChartType.bar, [
    {
      name: "ATP Yield",
      labels: ["Glycolysis", "Pyruvate\nDecarboxylation", "Krebs\nCycle", "Electron\nTransport Chain", "Total"],
      values: [2, 2, 2, 28, 34]
    }
  ], {
    x: 0.4, y: 1.35, w: 7.5, h: 5.7,
    chartColors: [ACCENT2, ACCENT2, ACCENT2, ACCENT1, ACCENT3],
    showLegend: false, showTitle: false, showValue: true,
    dataLabelColor: WHITE, dataLabelFontSize: 12,
    valAxisLabelColor: LIGHT, catAxisLabelColor: LIGHT,
    barGapWidthPct: 40,
    barDir: "col"
  });

  const atp_notes = [
    ["Glycolysis", "Cytoplasm · Glucose → 2 Pyruvate · Net 2 ATP (substrate-level phosphorylation)"],
    ["Pyruvate Decarboxylation", "Mitochondrial matrix · Pyruvate → Acetyl-CoA · 2 NADH produced"],
    ["Krebs Cycle", "Matrix · 2 turns per glucose · 6 NADH, 2 FADH₂, 2 GTP, 4 CO₂"],
    ["ETC", "Inner membrane · NADH/FADH₂ → proton gradient → ATP synthase → ~28 ATP"],
    ["Total Yield", "~34 ATP per glucose (aerobic) vs 2 ATP (anaerobic fermentation)"],
  ];
  atp_notes.forEach(([h, b], i) => {
    infoCard(s, 8.1, 1.35 + i * 1.2, 5.0, 1.1, h, b, i === 3 ? ACCENT1 : i === 4 ? ACCENT3 : ACCENT2);
  });
}

// ══════════════════════════════════════════════════════════════════════════════
// SLIDE 11 – CHART: Cell Division phases
// ══════════════════════════════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  s.background = { color: BG_DARK };
  addSlideHeader(s, "Cell Cycle & Division", "Phases of mitosis and their relative duration");

  s.addChart(pres.ChartType.doughnut, [
    {
      name: "Cell Cycle Duration",
      labels: ["G1 Phase", "S Phase (DNA replication)", "G2 Phase", "M Phase (Mitosis)", "Cytokinesis"],
      values: [40, 35, 15, 8, 2]
    }
  ], {
    x: 0.3, y: 1.35, w: 6.5, h: 5.7,
    chartColors: [ACCENT2, ACCENT1, ACCENT3, "FF6B6B", "FFD93D"],
    showLegend: true, showTitle: false, showValue: true, showPercent: true,
    dataLabelColor: WHITE, dataLabelFontSize: 10,
    legendColor: LIGHT, legendFontSize: 11,
    holeSize: 55,
  });

  const phases = [
    ["G1 Phase (~40%)", "Cell grows, synthesises proteins, organelles double · Checkpoint: adequate size & nutrients?"],
    ["S Phase (~35%)", "DNA synthesis — entire genome duplicated · Histone synthesis · PCNA/RPA orchestrate replication"],
    ["G2 Phase (~15%)", "Cell continues growing · DNA damage checkpoint · Cyclin B/CDK1 complex primes entry into M"],
    ["M Phase — Mitosis (~8%)", "Prophase→Metaphase→Anaphase→Telophase · Chromosomes segregated by spindle apparatus"],
    ["Cytokinesis (~2%)", "Cleavage furrow (animals) or cell plate (plants) · Two genetically identical daughters formed"],
  ];
  phases.forEach(([h, b], i) => {
    infoCard(s, 7.1, 1.35 + i * 1.2, 6.0, 1.1, h, b, [ACCENT2, ACCENT1, ACCENT3, "FF6B6B", "FFD93D"][i]);
  });
}

// ══════════════════════════════════════════════════════════════════════════════
// SLIDE 12 – CHART: Cell Types in the Human Body
// ══════════════════════════════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  s.background = { color: BG_DARK };
  addSlideHeader(s, "Human Cell Types by Number", "Estimated cell counts (billions) across major categories");

  s.addChart(pres.ChartType.bar, [
    {
      name: "Billions of cells",
      labels: ["Red Blood Cells", "Platelets", "Muscle Cells", "Glial Cells", "Epithelial Cells", "Neurons", "White Blood Cells"],
      values: [25000, 1500, 700, 85, 50, 100, 50]
    }
  ], {
    x: 0.4, y: 1.35, w: 8.5, h: 5.7,
    chartColors: ["FF6B6B", "FFD93D", ACCENT2, ACCENT1, ACCENT3, "FF8C42", "C084FC"],
    showLegend: false, showTitle: false, showValue: true,
    dataLabelColor: WHITE, dataLabelFontSize: 9,
    valAxisLabelColor: LIGHT, catAxisLabelColor: LIGHT,
    barGapWidthPct: 30, barDir: "bar"
  });

  const cell_types = [
    ["Red Blood Cells", "~25 trillion · No nucleus · Carry O₂ via haemoglobin · Live 120 days"],
    ["Neurons", "~86 billion · Post-mitotic · Longest-lived cells · Up to 1 metre long (motor neurons)"],
    ["Muscle Cells", "~700 billion · Multinucleated myotubes · Specialised sarcomere contractile units"],
    ["Epithelial Cells", "~50 billion · Line all body surfaces · Tight junctions · High turnover every 3–7 days"],
  ];
  cell_types.forEach(([h, b], i) => {
    infoCard(s, 9.1, 1.35 + i * 1.52, 4.0, 1.38, h, b, [ACCENT1, ACCENT3, ACCENT2, "FF6B6B"][i]);
  });
}

// ══════════════════════════════════════════════════════════════════════════════
// SLIDE 13 – Stem Cell Differentiation (images)
// ══════════════════════════════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  s.background = { color: BG_DARK };
  addSlideHeader(s, "Stem Cell Differentiation", "From totipotency to specialised cell identity");

  if (imgData.stem_hier) {
    s.addImage({ data: imgData.stem_hier, x: 0.4, y: 1.35, w: 6.2, h: 5.7 });
  }
  if (imgData.diff_paths) {
    s.addImage({ data: imgData.diff_paths, x: 6.9, y: 1.35, w: 6.1, h: 5.7 });
  }

  // Overlay label strip at bottom
  s.addShape("rect", { x: 0, y: 6.9, w: 13.33, h: 0.6, fill: { color: BG_DARK, transparency: 20 }, line: { type: "none" } });
  s.addText("Totipotent → Pluripotent (ESC/iPSC) → Multipotent (Haematopoietic, Mesenchymal) → Unipotent → Terminally Differentiated", {
    x: 0.4, y: 6.95, w: 12.5, h: 0.4,
    fontSize: 11, color: ACCENT1, fontFace: "Calibri", align: "center", italic: true
  });
}

// ══════════════════════════════════════════════════════════════════════════════
// SLIDE 14 – Differentiation Mechanisms
// ══════════════════════════════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  s.background = { color: BG_DARK };
  addSlideHeader(s, "How Differentiation Works", "Transcription factors, epigenetics & signalling");

  const mech = [
    { title: "Master Transcription Factors", body: "OCT4, SOX2, NANOG maintain pluripotency · MyoD specifies muscle · PAX5 specifies B-cells · Lineage-specific TFs activate/repress hundreds of genes", color: ACCENT1 },
    { title: "Epigenetic Remodelling", body: "DNA methylation (CpG) silences genes · H3K27me3 (Polycomb) represses developmental genes · H3K4me3 marks active promoters · Bivalent domains poise lineage genes in stem cells", color: ACCENT2 },
    { title: "Signalling Gradients", body: "Morphogen gradients (BMP, Shh, Wnt, FGF) establish positional identity in the embryo · Concentration thresholds activate distinct gene sets → different cell fates", color: ACCENT3 },
    { title: "Cell-Cell Communication", body: "Notch-Delta lateral inhibition → adjacent cells adopt different fates · Gap junctions synchronise differentiation · Extracellular matrix cues (integrin signalling)", color: ACCENT1 },
    { title: "Induced Pluripotency (iPSC)", body: "Yamanaka factors (OCT4, SOX2, KLF4, c-MYC) reprogramme somatic cells to pluripotency → Nobel Prize 2012 → patient-specific regenerative medicine", color: ACCENT3 },
    { title: "Lineage Commitment", body: "Stochastic gene-expression fluctuations → attractor states (Waddington landscape) · Once committed, epigenetic barriers prevent reversal · Key for cancer (de-differentiation)", color: ACCENT2 },
  ];

  const cols = 3, rows = 2, cw = 4.1, ch = 2.55;
  mech.forEach(({ title, body, color }, i) => {
    const col = i % cols;
    const row = Math.floor(i / cols);
    infoCard(s, 0.3 + col * (cw + 0.2), 1.35 + row * (ch + 0.15), cw, ch, title, body, color);
  });
}

// ══════════════════════════════════════════════════════════════════════════════
// SLIDE 15 – CHART: Gene Expression changes during differentiation
// ══════════════════════════════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  s.background = { color: BG_DARK };
  addSlideHeader(s, "Gene Expression During Differentiation", "Relative expression levels of key regulators across stages");

  s.addChart(pres.ChartType.line, [
    {
      name: "OCT4 / NANOG (Pluripotency)",
      labels: ["ESC", "Epiblast", "Progenitor", "Committed", "Differentiated"],
      values: [100, 75, 40, 8, 2]
    },
    {
      name: "Lineage TFs (e.g. PAX5, MyoD)",
      labels: ["ESC", "Epiblast", "Progenitor", "Committed", "Differentiated"],
      values: [2, 15, 45, 80, 95]
    },
    {
      name: "Epigenetic Silencing (H3K27me3)",
      labels: ["ESC", "Epiblast", "Progenitor", "Committed", "Differentiated"],
      values: [20, 35, 55, 70, 85]
    }
  ], {
    x: 0.4, y: 1.35, w: 8.5, h: 5.7,
    chartColors: [ACCENT1, ACCENT3, ACCENT2],
    showLegend: true, showTitle: false, showValue: false,
    lineSize: 3, lineSmooth: true,
    legendColor: LIGHT, legendFontSize: 10,
    valAxisLabelColor: LIGHT, catAxisLabelColor: LIGHT,
    dataLabelColor: WHITE,
  });

  const diff_notes = [
    "As cells differentiate, OCT4/NANOG (pluripotency factors) decline sharply",
    "Lineage-specific TFs (PAX5, MyoD, GATA1) rise and lock in cell identity",
    "Epigenetic silencing (H3K27me3) progressively restricts gene expression repertoire",
    "This one-way ratchet ensures stable, heritable cell identity across cell divisions",
  ];
  diff_notes.forEach((n, i) => {
    s.addShape("roundRect", {
      x: 9.1, y: 1.45 + i * 1.38, w: 4.0, h: 1.25, rectRadius: 0.08,
      fill: { color: BG_CARD }, line: { color: [ACCENT1, ACCENT3, ACCENT2, "FFD93D"][i], w: 1.5, transparency: 20 }
    });
    s.addText(n, {
      x: 9.25, y: 1.5 + i * 1.38, w: 3.7, h: 1.1,
      fontSize: 10, color: LIGHT, fontFace: "Calibri", wrap: true, margin: 4
    });
  });
}

// ══════════════════════════════════════════════════════════════════════════════
// SLIDE 16 – Video: Cell Differentiation
// ══════════════════════════════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  s.background = { color: BG_DARK };

  // Full-slide dark overlay design
  s.addShape("rect", { x: 0, y: 0, w: 13.33, h: 7.5, fill: { color: BG_DARK }, line: { type: "none" } });

  // Glowing ellipse background
  s.addShape("ellipse", { x: 2, y: 0.5, w: 9, h: 7, fill: { color: ACCENT2, transparency: 90 }, line: { type: "none" } });

  // Slide title
  s.addText("Cell Differentiation in Action", {
    x: 0.5, y: 0.2, w: 12.3, h: 0.7,
    fontSize: 32, bold: true, color: WHITE, fontFace: "Calibri", align: "center", charSpacing: 2
  });

  // Video placeholder box (centre)
  s.addShape("roundRect", {
    x: 1.8, y: 1.1, w: 9.7, h: 5.45, rectRadius: 0.15,
    fill: { color: "000000" }, line: { color: ACCENT1, w: 3, transparency: 10 }
  });

  // Play button
  s.addShape("triangle", {
    x: 6.1, y: 2.8, w: 1.1, h: 1.1,
    fill: { color: ACCENT1, transparency: 10 }, line: { type: "none" },
    rotate: 90
  });

  s.addText("▶", {
    x: 6.0, y: 2.75, w: 1.3, h: 1.3,
    fontSize: 60, color: WHITE, fontFace: "Calibri", align: "center", valign: "middle"
  });

  s.addText("Watch: How Stem Cells Become Specialised Cells", {
    x: 1.8, y: 4.1, w: 9.7, h: 0.5,
    fontSize: 16, color: ACCENT1, fontFace: "Calibri", align: "center", italic: true
  });

  s.addText("https://www.youtube.com/watch?v=ORwf8DjZpwE", {
    x: 1.8, y: 4.65, w: 9.7, h: 0.35,
    fontSize: 12, color: SUBTITLE, fontFace: "Calibri", align: "center",
    hyperlink: { url: "https://www.youtube.com/watch?v=ORwf8DjZpwE" }
  });

  s.addText("(Click the link above in presentation mode to play the video)", {
    x: 1.8, y: 5.05, w: 9.7, h: 0.3,
    fontSize: 10, color: SUBTITLE, fontFace: "Calibri", align: "center", italic: true
  });

  s.addText("🎬  Cell Differentiation · Stem Cells · Developmental Biology", {
    x: 0, y: 7.1, w: 13.33, h: 0.35,
    fontSize: 11, color: ACCENT3, fontFace: "Calibri", align: "center"
  });
}

// ══════════════════════════════════════════════════════════════════════════════
// WRITE FILE
// ══════════════════════════════════════════════════════════════════════════════
const outPath = "/home/daytona/workspace/cell-biology-ppt/Cell_Biology_Masterclass.pptx";
pres.writeFile({ fileName: outPath }).then(() => {
  console.log("PPTX written to:", outPath);
}).catch(err => {
  console.error("Error writing PPTX:", err);
  process.exit(1);
});
Your credits are exhausted. Your daily credits reset tomorrow, or you can purchase a top-up for more.

cell structure and differentiation

Your credits are exhausted. Your daily credits reset tomorrow, or you can purchase a top-up for more.
This is a shared conversation. Sign in to Orris to start your own chat.