Ppt

Asking for Preferences
Reading File
Reading File
Running Command

mkdir -p /home/daytona/workspace/human-reproduction-ppt

Writing File

~/human-reproduction-ppt/create_ppt.js

const pptxgen = require("pptxgenjs");

const pres = new pptxgen();
pres.layout = "LAYOUT_16x9";
pres.title = "Human Reproduction - Class 12 Biology";
pres.author = "Biology Class 12";

// ─── COLOR PALETTE ───────────────────────────────────────────────
const C = {
  dark:    "0D1B2A",  // deep navy (dominant)
  mid:     "1B3A5C",  // medium navy
  accent1: "00B4D8",  // bright cyan
  accent2: "90E0EF",  // light cyan
  teal:    "0096C7",  // teal
  white:   "FFFFFF",
  offWhite:"E8F4F8",
  light:   "CAF0F8",
  green:   "52B788",
  pink:    "FF6B9D",
  yellow:  "FFD166",
  orange:  "FF9A3C",
  gray:    "8ECAE6",
};

// ─── HELPER: background rect ─────────────────────────────────────
function bg(slide, color) {
  slide.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 5.625, fill: { color } });
}

function accentBar(slide, color = C.accent1) {
  slide.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 0.12, h: 5.625, fill: { color } });
}

function sectionTag(slide, text, x, y, color = C.accent1) {
  slide.addShape(pres.ShapeType.roundRect, { x, y, w: 2.6, h: 0.32, fill: { color }, rectRadius: 0.04 });
  slide.addText(text, { x, y, w: 2.6, h: 0.32, fontSize: 10, color: C.dark, bold: true, align: "center", valign: "middle", margin: 0 });
}

function slideTitle(slide, text, y = 0.22) {
  slide.addText(text, { x: 0.3, y, w: 9.4, h: 0.55, fontSize: 26, bold: true, color: C.white, fontFace: "Calibri", align: "left", valign: "middle" });
}

function dividerLine(slide, y, color = C.accent1) {
  slide.addShape(pres.ShapeType.line, { x: 0.3, y, w: 9.4, h: 0, line: { color, width: 1.5 } });
}

// ────────────────────────────────────────────────────────────────
// SLIDE 1 – TITLE SLIDE
// ────────────────────────────────────────────────────────────────
{
  const s = pres.addSlide();
  bg(s, C.dark);

  // decorative circles
  s.addShape(pres.ShapeType.ellipse, { x: 7.2, y: -1.0, w: 4.5, h: 4.5, fill: { color: C.mid }, line: { color: C.mid } });
  s.addShape(pres.ShapeType.ellipse, { x: 7.9, y: -0.3, w: 3.0, h: 3.0, fill: { color: C.teal }, line: { color: C.teal } });
  s.addShape(pres.ShapeType.ellipse, { x: -1.2, y: 3.5, w: 3.0, h: 3.0, fill: { color: C.mid }, line: { color: C.mid } });

  // accent top bar
  s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 0.09, fill: { color: C.accent1 } });

  // chapter label
  s.addShape(pres.ShapeType.roundRect, { x: 0.5, y: 0.7, w: 2.5, h: 0.36, fill: { color: C.accent1 }, rectRadius: 0.05 });
  s.addText("Chapter 3 | Biology XII", { x: 0.5, y: 0.7, w: 2.5, h: 0.36, fontSize: 11, bold: true, color: C.dark, align: "center", valign: "middle", margin: 0 });

  // main title
  s.addText("Human\nReproduction", { x: 0.5, y: 1.25, w: 6.5, h: 2.0, fontSize: 54, bold: true, color: C.white, fontFace: "Calibri", align: "left", valign: "middle" });

  // subtitle
  s.addText("Male & Female Reproductive Systems • Gametogenesis\nFertilisation • Embryonic Development • Parturition", {
    x: 0.5, y: 3.4, w: 7.0, h: 0.9, fontSize: 14, color: C.gray, fontFace: "Calibri", align: "left", valign: "middle"
  });

  // bottom bar
  s.addShape(pres.ShapeType.rect, { x: 0, y: 5.38, w: 10, h: 0.09, fill: { color: C.accent1 } });
  s.addText("NCERT Class 12 Biology", { x: 0.3, y: 5.2, w: 5, h: 0.25, fontSize: 10, color: C.gray, align: "left" });
}

// ────────────────────────────────────────────────────────────────
// SLIDE 2 – TABLE OF CONTENTS
// ────────────────────────────────────────────────────────────────
{
  const s = pres.addSlide();
  bg(s, C.dark);
  accentBar(s, C.teal);

  slideTitle(s, "Topics Covered");
  dividerLine(s, 0.88, C.teal);

  const topics = [
    { num: "01", title: "Introduction to Human Reproduction", color: C.accent1 },
    { num: "02", title: "Male Reproductive System", color: C.green },
    { num: "03", title: "Female Reproductive System", color: C.pink },
    { num: "04", title: "Gametogenesis", color: C.yellow },
    { num: "05", title: "Menstrual Cycle", color: C.orange },
    { num: "06", title: "Fertilisation & Implantation", color: C.accent2 },
    { num: "07", title: "Embryonic Development", color: C.teal },
    { num: "08", title: "Parturition & Lactation", color: C.green },
  ];

  topics.forEach((t, i) => {
    const col = i < 4 ? 0 : 1;
    const row = i % 4;
    const x = col === 0 ? 0.3 : 5.2;
    const y = 1.05 + row * 1.05;

    s.addShape(pres.ShapeType.roundRect, { x, y, w: 4.5, h: 0.82, fill: { color: C.mid }, rectRadius: 0.07, line: { color: t.color, width: 1.2 } });
    s.addShape(pres.ShapeType.roundRect, { x: x + 0.05, y: y + 0.1, w: 0.46, h: 0.62, fill: { color: t.color }, rectRadius: 0.05 });
    s.addText(t.num, { x: x + 0.05, y: y + 0.1, w: 0.46, h: 0.62, fontSize: 13, bold: true, color: C.dark, align: "center", valign: "middle", margin: 0 });
    s.addText(t.title, { x: x + 0.6, y, w: 3.85, h: 0.82, fontSize: 12, color: C.white, fontFace: "Calibri", valign: "middle" });
  });
}

// ────────────────────────────────────────────────────────────────
// SLIDE 3 – INTRODUCTION
// ────────────────────────────────────────────────────────────────
{
  const s = pres.addSlide();
  bg(s, C.dark);
  accentBar(s, C.accent1);
  sectionTag(s, "01 | Introduction", 0.3, 0.18, C.accent1);

  s.addText("Human Reproduction", { x: 0.3, y: 0.55, w: 9.2, h: 0.65, fontSize: 30, bold: true, color: C.white, fontFace: "Calibri" });
  dividerLine(s, 1.28, C.accent1);

  // info cards
  const cards = [
    { icon: "🔬", title: "Type", body: "Sexual reproduction\n(involves two sexes)" },
    { icon: "🧬", title: "Mode", body: "Viviparous – young\nborn directly" },
    { icon: "📅", title: "Onset", body: "Puberty marks the\nstart of sexual maturity" },
    { icon: "🎯", title: "Goal", body: "Production of offspring\n& perpetuation of species" },
  ];

  cards.forEach((c, i) => {
    const x = 0.25 + i * 2.4;
    s.addShape(pres.ShapeType.roundRect, { x, y: 1.45, w: 2.15, h: 2.4, fill: { color: C.mid }, rectRadius: 0.1 });
    s.addShape(pres.ShapeType.rect, { x, y: 1.45, w: 2.15, h: 0.08, fill: { color: C.accent1 } });
    s.addText(c.icon, { x, y: 1.6, w: 2.15, h: 0.6, fontSize: 26, align: "center" });
    s.addText(c.title, { x, y: 2.22, w: 2.15, h: 0.35, fontSize: 13, bold: true, color: C.accent1, align: "center" });
    s.addText(c.body, { x, y: 2.6, w: 2.15, h: 1.1, fontSize: 11, color: C.white, align: "center", valign: "top" });
  });

  // key note
  s.addShape(pres.ShapeType.roundRect, { x: 0.25, y: 4.1, w: 9.5, h: 1.1, fill: { color: "1A3550" }, rectRadius: 0.08, line: { color: C.teal, width: 1 } });
  s.addText([
    { text: "Key Fact: ", options: { bold: true, color: C.accent1 } },
    { text: "Humans are sexually dimorphic — males and females have distinct anatomical and physiological differences. Reproduction involves formation of gametes (sperms & eggs), fertilisation, and embryo development inside the uterus.", options: { color: C.white } }
  ], { x: 0.4, y: 4.1, w: 9.2, h: 1.1, fontSize: 11.5, valign: "middle" });
}

// ────────────────────────────────────────────────────────────────
// SLIDE 4 – MALE REPRODUCTIVE SYSTEM
// ────────────────────────────────────────────────────────────────
{
  const s = pres.addSlide();
  bg(s, C.dark);
  accentBar(s, C.green);
  sectionTag(s, "02 | Male Reproductive System", 0.3, 0.18, C.green);

  s.addText("Male Reproductive System", { x: 0.3, y: 0.55, w: 9.2, h: 0.65, fontSize: 30, bold: true, color: C.white, fontFace: "Calibri" });
  dividerLine(s, 1.28, C.green);

  // left column – organ list
  const organs = [
    { name: "Testes (pair)", desc: "Primary sex organs; produce sperms & testosterone; located in scrotum" },
    { name: "Epididymis", desc: "Site of sperm maturation and temporary storage" },
    { name: "Vas Deferens", desc: "Muscular tube that carries sperms from epididymis to ejaculatory duct" },
    { name: "Seminal Vesicles", desc: "Secrete fructose-rich fluid; provides energy to sperms (~60% of semen)" },
    { name: "Prostate Gland", desc: "Secretes alkaline fluid; neutralises acidic vaginal environment" },
    { name: "Bulbourethral (Cowper's) Gland", desc: "Secretes lubricating mucus before ejaculation" },
    { name: "Urethra / Penis", desc: "Common passage for urine and semen; copulatory organ" },
  ];

  organs.forEach((o, i) => {
    const y = 1.42 + i * 0.565;
    s.addShape(pres.ShapeType.roundRect, { x: 0.25, y, w: 9.5, h: 0.52, fill: { color: i % 2 === 0 ? C.mid : "152D45" }, rectRadius: 0.06 });
    s.addText(o.name, { x: 0.35, y, w: 2.5, h: 0.52, fontSize: 11.5, bold: true, color: C.green, valign: "middle" });
    s.addText(o.desc, { x: 2.85, y, w: 6.8, h: 0.52, fontSize: 11, color: C.white, valign: "middle" });
  });
}

// ────────────────────────────────────────────────────────────────
// SLIDE 5 – TESTES & SPERMATOGENESIS overview
// ────────────────────────────────────────────────────────────────
{
  const s = pres.addSlide();
  bg(s, C.dark);
  accentBar(s, C.green);
  sectionTag(s, "02 | Male System – Testes", 0.3, 0.18, C.green);

  s.addText("Structure of Testes & Seminiferous Tubules", { x: 0.3, y: 0.55, w: 9.2, h: 0.62, fontSize: 26, bold: true, color: C.white });
  dividerLine(s, 1.25, C.green);

  // two info boxes
  const boxes = [
    {
      title: "Testes – Key Facts",
      color: C.green,
      lines: [
        "Located in scrotum outside abdominal cavity",
        "Lower temperature (~2-2.5°C below body temp) required for spermatogenesis",
        "Divided into ~250 compartments called testicular lobules",
        "Each lobule contains 1-3 highly coiled seminiferous tubules",
        "Total length of seminiferous tubules: ~250 m per testis",
      ]
    },
    {
      title: "Cells Inside Seminiferous Tubules",
      color: C.accent1,
      lines: [
        "Spermatogonia (male germ cells) → give rise to sperms",
        "Sertoli cells → nourish developing sperms (nurse cells)",
        "Leydig (interstitial) cells → outside tubules; secrete testosterone",
        "Testosterone → controls development of secondary sexual characters",
        "FSH → acts on Sertoli cells; LH → acts on Leydig cells",
      ]
    }
  ];

  boxes.forEach((b, i) => {
    const x = i === 0 ? 0.25 : 5.1;
    s.addShape(pres.ShapeType.roundRect, { x, y: 1.38, w: 4.65, h: 3.95, fill: { color: C.mid }, rectRadius: 0.1 });
    s.addShape(pres.ShapeType.rect, { x, y: 1.38, w: 4.65, h: 0.42, fill: { color: b.color } });
    s.addText(b.title, { x, y: 1.38, w: 4.65, h: 0.42, fontSize: 13, bold: true, color: C.dark, align: "center", valign: "middle", margin: 0 });
    b.lines.forEach((l, j) => {
      s.addText("▸  " + l, { x: x + 0.15, y: 1.88 + j * 0.6, w: 4.35, h: 0.56, fontSize: 11, color: C.white, valign: "middle" });
    });
  });
}

// ────────────────────────────────────────────────────────────────
// SLIDE 6 – FEMALE REPRODUCTIVE SYSTEM
// ────────────────────────────────────────────────────────────────
{
  const s = pres.addSlide();
  bg(s, C.dark);
  accentBar(s, C.pink);
  sectionTag(s, "03 | Female Reproductive System", 0.3, 0.18, C.pink);

  s.addText("Female Reproductive System", { x: 0.3, y: 0.55, w: 9.2, h: 0.65, fontSize: 30, bold: true, color: C.white });
  dividerLine(s, 1.28, C.pink);

  const organs = [
    { name: "Ovaries (pair)", desc: "Primary sex organs; produce ova (eggs) & hormones (oestrogen, progesterone)" },
    { name: "Fallopian Tubes (Oviducts)", desc: "Carry ova from ovary to uterus; site of fertilisation; fimbriae collect the ovum" },
    { name: "Uterus (Womb)", desc: "Pear-shaped muscular organ; site of implantation & foetal development; layers: perimetrium, myometrium, endometrium" },
    { name: "Cervix", desc: "Lower narrow part of uterus; connects uterus to vagina; secretes mucus" },
    { name: "Vagina", desc: "Birth canal; receives penis during copulation; passage for menstrual flow" },
    { name: "Accessory Glands", desc: "Bartholin's glands – secrete lubricating fluid; Mammary glands – produce milk (lactation)" },
    { name: "External Genitalia (Vulva)", desc: "Includes labia majora, labia minora, clitoris, hymen & vestibule" },
  ];

  organs.forEach((o, i) => {
    const y = 1.42 + i * 0.565;
    s.addShape(pres.ShapeType.roundRect, { x: 0.25, y, w: 9.5, h: 0.52, fill: { color: i % 2 === 0 ? C.mid : "1E2D3D" }, rectRadius: 0.06 });
    s.addText(o.name, { x: 0.35, y, w: 2.8, h: 0.52, fontSize: 11.5, bold: true, color: C.pink, valign: "middle" });
    s.addText(o.desc, { x: 3.15, y, w: 6.5, h: 0.52, fontSize: 11, color: C.white, valign: "middle" });
  });
}

// ────────────────────────────────────────────────────────────────
// SLIDE 7 – GAMETOGENESIS
// ────────────────────────────────────────────────────────────────
{
  const s = pres.addSlide();
  bg(s, C.dark);
  accentBar(s, C.yellow);
  sectionTag(s, "04 | Gametogenesis", 0.3, 0.18, C.yellow);

  s.addText("Gametogenesis", { x: 0.3, y: 0.55, w: 9.2, h: 0.62, fontSize: 30, bold: true, color: C.white });
  dividerLine(s, 1.25, C.yellow);

  // Spermatogenesis column
  s.addShape(pres.ShapeType.roundRect, { x: 0.25, y: 1.35, w: 4.55, h: 4.0, fill: { color: C.mid }, rectRadius: 0.1 });
  s.addShape(pres.ShapeType.rect, { x: 0.25, y: 1.35, w: 4.55, h: 0.42, fill: { color: C.green } });
  s.addText("Spermatogenesis", { x: 0.25, y: 1.35, w: 4.55, h: 0.42, fontSize: 14, bold: true, color: C.dark, align: "center", valign: "middle", margin: 0 });

  const sperSteps = [
    { cell: "Spermatogonia (2n)", note: "Germinal epithelium of seminiferous tubules" },
    { cell: "Primary Spermatocyte (2n)", note: "Mitosis → growth phase" },
    { cell: "Secondary Spermatocyte (n)", note: "Meiosis I (reductional division)" },
    { cell: "Spermatids (n)", note: "Meiosis II (equational division)" },
    { cell: "Spermatozoa (n)", note: "Spermiogenesis – spermatids → sperms" },
  ];

  sperSteps.forEach((step, i) => {
    const y = 1.85 + i * 0.67;
    s.addShape(pres.ShapeType.roundRect, { x: 0.4, y, w: 4.25, h: 0.58, fill: { color: "0D2535" }, rectRadius: 0.06 });
    if (i < sperSteps.length - 1) {
      s.addText("↓", { x: 1.6, y: y + 0.58, w: 1.6, h: 0.1, fontSize: 10, color: C.green, align: "center" });
    }
    s.addText(step.cell, { x: 0.5, y, w: 4.1, h: 0.3, fontSize: 11.5, bold: true, color: C.green });
    s.addText(step.note, { x: 0.5, y: y + 0.28, w: 4.1, h: 0.28, fontSize: 9.5, color: C.gray });
  });

  // Oogenesis column
  s.addShape(pres.ShapeType.roundRect, { x: 5.2, y: 1.35, w: 4.55, h: 4.0, fill: { color: C.mid }, rectRadius: 0.1 });
  s.addShape(pres.ShapeType.rect, { x: 5.2, y: 1.35, w: 4.55, h: 0.42, fill: { color: C.pink } });
  s.addText("Oogenesis", { x: 5.2, y: 1.35, w: 4.55, h: 0.42, fontSize: 14, bold: true, color: C.dark, align: "center", valign: "middle", margin: 0 });

  const oogSteps = [
    { cell: "Oogonia (2n)", note: "Germinal epithelium of ovary; fetal development" },
    { cell: "Primary Oocyte (2n)", note: "Grows & arrested at Prophase I" },
    { cell: "Secondary Oocyte (n) + Polar body", note: "Meiosis I – at ovulation" },
    { cell: "Ovum (n) + 2nd Polar body", note: "Meiosis II – completed after fertilisation" },
    { cell: "Mature Ovum (n)", note: "~1 ovum released per cycle; lifespan ~24 hrs" },
  ];

  oogSteps.forEach((step, i) => {
    const y = 1.85 + i * 0.67;
    s.addShape(pres.ShapeType.roundRect, { x: 5.35, y, w: 4.25, h: 0.58, fill: { color: "0D2535" }, rectRadius: 0.06 });
    if (i < oogSteps.length - 1) {
      s.addText("↓", { x: 6.6, y: y + 0.58, w: 1.6, h: 0.1, fontSize: 10, color: C.pink, align: "center" });
    }
    s.addText(step.cell, { x: 5.45, y, w: 4.1, h: 0.3, fontSize: 11.5, bold: true, color: C.pink });
    s.addText(step.note, { x: 5.45, y: y + 0.28, w: 4.1, h: 0.28, fontSize: 9.5, color: C.gray });
  });
}

// ────────────────────────────────────────────────────────────────
// SLIDE 8 – SPERM STRUCTURE
// ────────────────────────────────────────────────────────────────
{
  const s = pres.addSlide();
  bg(s, C.dark);
  accentBar(s, C.green);
  sectionTag(s, "04 | Sperm Structure", 0.3, 0.18, C.green);

  s.addText("Structure of Human Sperm", { x: 0.3, y: 0.55, w: 9.2, h: 0.62, fontSize: 28, bold: true, color: C.white });
  dividerLine(s, 1.25, C.green);

  // Sperm diagram (text-art style)
  s.addShape(pres.ShapeType.ellipse, { x: 0.6, y: 1.5, w: 1.4, h: 1.1, fill: { color: C.green }, line: { color: C.green } });
  s.addText("Head", { x: 0.6, y: 1.5, w: 1.4, h: 1.1, fontSize: 13, bold: true, color: C.dark, align: "center", valign: "middle", margin: 0 });

  s.addShape(pres.ShapeType.rect, { x: 2.0, y: 1.88, w: 0.9, h: 0.35, fill: { color: C.yellow } });
  s.addText("Neck", { x: 2.0, y: 1.88, w: 0.9, h: 0.35, fontSize: 11, bold: true, color: C.dark, align: "center", valign: "middle", margin: 0 });

  s.addShape(pres.ShapeType.rect, { x: 2.9, y: 1.88, w: 1.3, h: 0.35, fill: { color: C.orange } });
  s.addText("Middle piece", { x: 2.9, y: 1.88, w: 1.3, h: 0.35, fontSize: 10, bold: true, color: C.dark, align: "center", valign: "middle", margin: 0 });

  s.addShape(pres.ShapeType.rect, { x: 4.2, y: 1.88, w: 2.4, h: 0.35, fill: { color: C.accent1 } });
  s.addText("Principal Piece (Tail)", { x: 4.2, y: 1.88, w: 2.4, h: 0.35, fontSize: 10, bold: true, color: C.dark, align: "center", valign: "middle", margin: 0 });

  s.addShape(pres.ShapeType.rect, { x: 6.6, y: 1.88, w: 0.7, h: 0.35, fill: { color: C.gray } });
  s.addText("End", { x: 6.6, y: 1.88, w: 0.7, h: 0.35, fontSize: 10, bold: true, color: C.dark, align: "center", valign: "middle", margin: 0 });

  // Details table
  const parts = [
    { part: "Head", detail: "Contains haploid nucleus (23 chromosomes); covered by acrosome – contains lytic enzymes (hyaluronidase, acrosin) for penetrating the ovum" },
    { part: "Neck", detail: "Connects head to middle piece; contains proximal centriole which forms the axoneme" },
    { part: "Middle Piece", detail: "Contains mitochondrial spiral (mitochondrial sheath) – provides energy (ATP) for flagellar movement" },
    { part: "Principal Piece", detail: "Longest part; contains the axoneme (9+2 arrangement of microtubules); responsible for motility" },
    { part: "End Piece", detail: "Short terminal segment; tapers to end" },
  ];

  parts.forEach((p, i) => {
    const y = 2.55 + i * 0.58;
    s.addShape(pres.ShapeType.roundRect, { x: 0.25, y, w: 9.5, h: 0.52, fill: { color: i % 2 === 0 ? C.mid : "152D45" }, rectRadius: 0.05 });
    s.addText(p.part, { x: 0.35, y, w: 1.6, h: 0.52, fontSize: 11.5, bold: true, color: C.green, valign: "middle" });
    s.addText(p.detail, { x: 1.98, y, w: 7.65, h: 0.52, fontSize: 11, color: C.white, valign: "middle" });
  });
}

// ────────────────────────────────────────────────────────────────
// SLIDE 9 – MENSTRUAL CYCLE
// ────────────────────────────────────────────────────────────────
{
  const s = pres.addSlide();
  bg(s, C.dark);
  accentBar(s, C.orange);
  sectionTag(s, "05 | Menstrual Cycle", 0.3, 0.18, C.orange);

  s.addText("Menstrual Cycle", { x: 0.3, y: 0.55, w: 9.2, h: 0.62, fontSize: 30, bold: true, color: C.white });
  dividerLine(s, 1.25, C.orange);

  const phases = [
    { name: "Menstrual Phase", days: "Day 1-5", color: C.pink, desc: "Shedding of endometrial lining due to fall in progesterone & oestrogen. Menstrual bleeding occurs (~ 50 mL blood loss)" },
    { name: "Follicular Phase", days: "Day 6-13", color: C.yellow, desc: "FSH stimulates Graafian follicle growth. Oestrogen rises → endometrium regenerates & thickens. LH surge triggers ovulation" },
    { name: "Ovulation", days: "Day 14", color: C.orange, desc: "LH surge causes rupture of Graafian follicle. Secondary oocyte released. Ovum viable for ~24 hours" },
    { name: "Luteal Phase", days: "Day 15-28", color: C.green, desc: "Corpus luteum forms from ruptured follicle. Secretes progesterone & oestrogen. Endometrium prepares for implantation. If no fertilisation → corpus luteum degenerates → menstruation" },
  ];

  phases.forEach((ph, i) => {
    const x = i < 2 ? 0.25 : 5.1;
    const y = i % 2 === 0 ? 1.38 : 3.22;
    s.addShape(pres.ShapeType.roundRect, { x, y, w: 4.65, h: 1.75, fill: { color: C.mid }, rectRadius: 0.1, line: { color: ph.color, width: 1.5 } });
    s.addShape(pres.ShapeType.roundRect, { x: x + 0.1, y: y + 0.1, w: 3.7, h: 0.36, fill: { color: ph.color }, rectRadius: 0.05 });
    s.addText(ph.name + "  |  " + ph.days, { x: x + 0.1, y: y + 0.1, w: 3.7, h: 0.36, fontSize: 11.5, bold: true, color: C.dark, valign: "middle", margin: 4 });
    s.addText(ph.desc, { x: x + 0.15, y: y + 0.52, w: 4.35, h: 1.15, fontSize: 10.5, color: C.white, valign: "top" });
  });
}

// ────────────────────────────────────────────────────────────────
// SLIDE 10 – FERTILISATION
// ────────────────────────────────────────────────────────────────
{
  const s = pres.addSlide();
  bg(s, C.dark);
  accentBar(s, C.accent2);
  sectionTag(s, "06 | Fertilisation & Implantation", 0.3, 0.18, C.accent2);

  s.addText("Fertilisation", { x: 0.3, y: 0.55, w: 9.2, h: 0.62, fontSize: 30, bold: true, color: C.white });
  dividerLine(s, 1.25, C.accent2);

  // Steps flow
  const steps = [
    { n: "1", title: "Sperm reaches ovum", desc: "Millions of sperms deposited; travel through cervix & uterus to fallopian tube; capacitation occurs" },
    { n: "2", title: "Acrosomal reaction", desc: "Acrosome releases enzymes (hyaluronidase); sperm penetrates corona radiata & zona pellucida" },
    { n: "3", title: "Cortical reaction", desc: "Cortical granules prevent polyspermy; zona pellucida hardening" },
    { n: "4", title: "Syngamy", desc: "Fusion of sperm nucleus with egg nucleus; forms diploid zygote (2n = 46 chromosomes)" },
    { n: "5", title: "Restoration of chromosome number", desc: "Meiosis II of secondary oocyte completes; second polar body expelled" },
  ];

  steps.forEach((st, i) => {
    const y = 1.38 + i * 0.78;
    s.addShape(pres.ShapeType.roundRect, { x: 0.25, y, w: 9.5, h: 0.68, fill: { color: C.mid }, rectRadius: 0.08 });
    s.addShape(pres.ShapeType.ellipse, { x: 0.3, y: y + 0.09, w: 0.5, h: 0.5, fill: { color: C.accent1 } });
    s.addText(st.n, { x: 0.3, y: y + 0.09, w: 0.5, h: 0.5, fontSize: 14, bold: true, color: C.dark, align: "center", valign: "middle", margin: 0 });
    s.addText(st.title, { x: 0.9, y, w: 2.8, h: 0.68, fontSize: 12, bold: true, color: C.accent2, valign: "middle" });
    s.addText(st.desc, { x: 3.7, y, w: 6.0, h: 0.68, fontSize: 11, color: C.white, valign: "middle" });
  });
}

// ────────────────────────────────────────────────────────────────
// SLIDE 11 – IMPLANTATION & PLACENTA
// ────────────────────────────────────────────────────────────────
{
  const s = pres.addSlide();
  bg(s, C.dark);
  accentBar(s, C.teal);
  sectionTag(s, "06 | Implantation & Placenta", 0.3, 0.18, C.teal);

  s.addText("Implantation & Placenta", { x: 0.3, y: 0.55, w: 9.2, h: 0.62, fontSize: 28, bold: true, color: C.white });
  dividerLine(s, 1.25, C.teal);

  // Implantation box
  s.addShape(pres.ShapeType.roundRect, { x: 0.25, y: 1.35, w: 4.6, h: 3.85, fill: { color: C.mid }, rectRadius: 0.1 });
  s.addShape(pres.ShapeType.rect, { x: 0.25, y: 1.35, w: 4.6, h: 0.42, fill: { color: C.teal } });
  s.addText("Implantation Timeline", { x: 0.25, y: 1.35, w: 4.6, h: 0.42, fontSize: 13, bold: true, color: C.dark, align: "center", valign: "middle", margin: 0 });

  const timeline = [
    { day: "Day 0", event: "Fertilisation in fallopian tube" },
    { day: "Day 2-3", event: "Cleavage → 2, 4, 8, 16 cells (morula)" },
    { day: "Day 4-5", event: "Morula → Blastocyst formation" },
    { day: "Day 6-7", event: "Blastocyst enters uterus" },
    { day: "Day 8-10", event: "Blastocyst implants in endometrium" },
    { day: "Day ~12", event: "HCG secretion begins (confirms pregnancy)" },
  ];

  timeline.forEach((t, i) => {
    const y = 1.85 + i * 0.55;
    s.addShape(pres.ShapeType.roundRect, { x: 0.4, y, w: 1.1, h: 0.38, fill: { color: C.teal }, rectRadius: 0.04 });
    s.addText(t.day, { x: 0.4, y, w: 1.1, h: 0.38, fontSize: 10, bold: true, color: C.dark, align: "center", valign: "middle", margin: 0 });
    s.addText(t.event, { x: 1.6, y, w: 3.15, h: 0.38, fontSize: 10.5, color: C.white, valign: "middle" });
  });

  // Placenta box
  s.addShape(pres.ShapeType.roundRect, { x: 5.1, y: 1.35, w: 4.65, h: 3.85, fill: { color: C.mid }, rectRadius: 0.1 });
  s.addShape(pres.ShapeType.rect, { x: 5.1, y: 1.35, w: 4.65, h: 0.42, fill: { color: C.orange } });
  s.addText("Placenta – Functions", { x: 5.1, y: 1.35, w: 4.65, h: 0.42, fontSize: 13, bold: true, color: C.dark, align: "center", valign: "middle", margin: 0 });

  const pfunctions = [
    "Exchange of nutrients, O₂, CO₂ between mother & foetus",
    "Acts as endocrine organ – secretes hCG, oestrogen, progesterone, hPL",
    "Barrier to most pathogens (not all viruses)",
    "Immunological tolerance – prevents rejection of foetus",
    "Umbilical cord connects foetus to placenta (2 arteries + 1 vein)",
    "Formed by trophoblast + uterine endometrium (decidua)",
  ];

  pfunctions.forEach((f, i) => {
    s.addText("▸  " + f, { x: 5.25, y: 1.88 + i * 0.54, w: 4.4, h: 0.5, fontSize: 10.5, color: C.white, valign: "middle" });
  });
}

// ────────────────────────────────────────────────────────────────
// SLIDE 12 – EMBRYONIC DEVELOPMENT
// ────────────────────────────────────────────────────────────────
{
  const s = pres.addSlide();
  bg(s, C.dark);
  accentBar(s, C.teal);
  sectionTag(s, "07 | Embryonic Development", 0.3, 0.18, C.teal);

  s.addText("Embryonic Development", { x: 0.3, y: 0.55, w: 9.2, h: 0.62, fontSize: 30, bold: true, color: C.white });
  dividerLine(s, 1.25, C.teal);

  const stages = [
    { stage: "Zygote", time: "Day 0", desc: "Single diploid cell (2n = 46); formed by syngamy" },
    { stage: "Cleavage", time: "Day 1-4", desc: "Rapid mitotic divisions; cells called blastomeres; no growth in size" },
    { stage: "Morula", time: "Day 3-4", desc: "Solid ball of 16-32 cells; moves toward uterus" },
    { stage: "Blastocyst", time: "Day 5-6", desc: "Hollow ball; inner cell mass (ICM/embryoblast) + outer trophoblast" },
    { stage: "Implantation", time: "Day 7-10", desc: "Blastocyst embeds in endometrium; trophoblast invades uterine wall" },
    { stage: "Gastrulation", time: "Week 3", desc: "ICM → 3 germ layers: ectoderm, mesoderm, endoderm" },
    { stage: "Organogenesis", time: "Week 4-8", desc: "All major organ systems begin forming from the 3 germ layers" },
    { stage: "Foetal Period", time: "Week 9 - Birth", desc: "Growth & maturation of organs; foetal movements from ~Week 16" },
  ];

  stages.forEach((st, i) => {
    const col = i < 4 ? 0 : 1;
    const row = i % 4;
    const x = col === 0 ? 0.25 : 5.1;
    const y = 1.38 + row * 1.0;
    s.addShape(pres.ShapeType.roundRect, { x, y, w: 4.65, h: 0.88, fill: { color: C.mid }, rectRadius: 0.08 });
    s.addShape(pres.ShapeType.roundRect, { x: x + 0.08, y: y + 0.08, w: 1.3, h: 0.3, fill: { color: C.teal }, rectRadius: 0.04 });
    s.addText(st.time, { x: x + 0.08, y: y + 0.08, w: 1.3, h: 0.3, fontSize: 9.5, bold: true, color: C.dark, align: "center", valign: "middle", margin: 0 });
    s.addText(st.stage, { x: x + 1.5, y: y + 0.05, w: 3.05, h: 0.35, fontSize: 12.5, bold: true, color: C.accent2 });
    s.addText(st.desc, { x: x + 0.1, y: y + 0.46, w: 4.45, h: 0.38, fontSize: 10.5, color: C.white });
  });
}

// ────────────────────────────────────────────────────────────────
// SLIDE 13 – GERM LAYERS
// ────────────────────────────────────────────────────────────────
{
  const s = pres.addSlide();
  bg(s, C.dark);
  accentBar(s, C.teal);
  sectionTag(s, "07 | Germ Layers", 0.3, 0.18, C.teal);

  s.addText("Germ Layers & Their Derivatives", { x: 0.3, y: 0.55, w: 9.2, h: 0.62, fontSize: 28, bold: true, color: C.white });
  dividerLine(s, 1.25, C.teal);

  const layers = [
    {
      name: "Ectoderm", emoji: "🔵", color: C.accent1,
      derives: ["Skin (epidermis) and its derivatives", "Nervous system (brain, spinal cord)", "Sensory organs (eye lens, ear, nose)", "Tooth enamel, hair, nails", "Anterior pituitary gland"]
    },
    {
      name: "Mesoderm", emoji: "🟢", color: C.green,
      derives: ["Muscles (skeletal, smooth, cardiac)", "Skeleton (bones & cartilage)", "Circulatory system (heart, blood vessels, blood)", "Kidneys & gonads (urogenital system)", "Dermis of skin, connective tissue"]
    },
    {
      name: "Endoderm", emoji: "🟡", color: C.yellow,
      derives: ["Lining of digestive tract", "Respiratory system epithelium", "Liver & pancreas", "Thyroid, parathyroid glands", "Urinary bladder lining"]
    }
  ];

  layers.forEach((l, i) => {
    const x = 0.25 + i * 3.2;
    s.addShape(pres.ShapeType.roundRect, { x, y: 1.35, w: 3.0, h: 3.95, fill: { color: C.mid }, rectRadius: 0.1 });
    s.addShape(pres.ShapeType.rect, { x, y: 1.35, w: 3.0, h: 0.5, fill: { color: l.color } });
    s.addText(l.name, { x, y: 1.35, w: 3.0, h: 0.5, fontSize: 15, bold: true, color: C.dark, align: "center", valign: "middle", margin: 0 });
    l.derives.forEach((d, j) => {
      s.addText("• " + d, { x: x + 0.1, y: 1.95 + j * 0.63, w: 2.8, h: 0.58, fontSize: 10.5, color: C.white, valign: "top" });
    });
  });

  // footer note
  s.addShape(pres.ShapeType.roundRect, { x: 0.25, y: 5.2, w: 9.5, h: 0.3, fill: { color: "1A3550" }, rectRadius: 0.04 });
  s.addText("Remember: Ecto → outside derivatives | Meso → middle layer organs | Endo → internal lining organs", {
    x: 0.35, y: 5.2, w: 9.3, h: 0.3, fontSize: 10, color: C.gray, align: "center", valign: "middle"
  });
}

// ────────────────────────────────────────────────────────────────
// SLIDE 14 – PARTURITION & LACTATION
// ────────────────────────────────────────────────────────────────
{
  const s = pres.addSlide();
  bg(s, C.dark);
  accentBar(s, C.green);
  sectionTag(s, "08 | Parturition & Lactation", 0.3, 0.18, C.green);

  s.addText("Parturition & Lactation", { x: 0.3, y: 0.55, w: 9.2, h: 0.62, fontSize: 30, bold: true, color: C.white });
  dividerLine(s, 1.25, C.green);

  // Parturition
  s.addShape(pres.ShapeType.roundRect, { x: 0.25, y: 1.35, w: 4.65, h: 3.85, fill: { color: C.mid }, rectRadius: 0.1 });
  s.addShape(pres.ShapeType.rect, { x: 0.25, y: 1.35, w: 4.65, h: 0.42, fill: { color: C.green } });
  s.addText("Parturition (Childbirth)", { x: 0.25, y: 1.35, w: 4.65, h: 0.42, fontSize: 13, bold: true, color: C.dark, align: "center", valign: "middle", margin: 0 });

  const parts = [
    { h: "Gestation Period", b: "~9 months (38-40 weeks) in humans" },
    { h: "Trigger", b: "Mild uterine contractions → parturition signal (oxytocin role)" },
    { h: "Foetal Ejection Reflex", b: "Fully developed foetus + placenta trigger oxytocin release from pituitary" },
    { h: "Stages of Labour", b: "1st – cervix dilates | 2nd – baby delivered | 3rd – placenta expelled (afterbirth)" },
    { h: "Oxytocin", b: "Positive feedback loop – uterine contractions intensify until birth" },
  ];

  parts.forEach((p, i) => {
    const y = 1.85 + i * 0.64;
    s.addText(p.h + ":", { x: 0.4, y, w: 4.35, h: 0.28, fontSize: 11.5, bold: true, color: C.green });
    s.addText(p.b, { x: 0.4, y: y + 0.27, w: 4.35, h: 0.32, fontSize: 10.5, color: C.white });
  });

  // Lactation
  s.addShape(pres.ShapeType.roundRect, { x: 5.1, y: 1.35, w: 4.65, h: 3.85, fill: { color: C.mid }, rectRadius: 0.1 });
  s.addShape(pres.ShapeType.rect, { x: 5.1, y: 1.35, w: 4.65, h: 0.42, fill: { color: C.yellow } });
  s.addText("Lactation (Milk Production)", { x: 5.1, y: 1.35, w: 4.65, h: 0.42, fontSize: 13, bold: true, color: C.dark, align: "center", valign: "middle", margin: 0 });

  const lacts = [
    { h: "Colostrum", b: "First milk produced; yellowish; rich in antibodies (IgA) – passive immunity to newborn" },
    { h: "Prolactin", b: "Hormone from anterior pituitary; stimulates milk synthesis in alveoli of mammary glands" },
    { h: "Oxytocin", b: "Causes milk ejection (let-down reflex) when infant suckles" },
    { h: "Mammary glands", b: "Modified sweat glands; contain alveoli → ducts → nipple; glandular + adipose tissue" },
    { h: "Lactational amenorrhea", b: "Ovulation suppressed during breastfeeding (high prolactin suppresses GnRH)" },
  ];

  lacts.forEach((l, i) => {
    const y = 1.85 + i * 0.64;
    s.addText(l.h + ":", { x: 5.25, y, w: 4.35, h: 0.28, fontSize: 11.5, bold: true, color: C.yellow });
    s.addText(l.b, { x: 5.25, y: y + 0.27, w: 4.35, h: 0.32, fontSize: 10.5, color: C.white });
  });
}

// ────────────────────────────────────────────────────────────────
// SLIDE 15 – HORMONAL CONTROL
// ────────────────────────────────────────────────────────────────
{
  const s = pres.addSlide();
  bg(s, C.dark);
  accentBar(s, C.accent1);
  sectionTag(s, "Quick Reference | Hormones", 0.3, 0.18, C.accent1);

  s.addText("Hormones in Human Reproduction", { x: 0.3, y: 0.55, w: 9.2, h: 0.62, fontSize: 28, bold: true, color: C.white });
  dividerLine(s, 1.25, C.accent1);

  const hormones = [
    { hormone: "FSH", source: "Anterior Pituitary", role: "Stimulates follicle development in ovary; acts on Sertoli cells in testis" },
    { hormone: "LH", source: "Anterior Pituitary", role: "Triggers ovulation; stimulates Leydig cells to produce testosterone" },
    { hormone: "Oestrogen", source: "Graafian Follicle", role: "Endometrial growth; secondary sexual characters; LH surge trigger" },
    { hormone: "Progesterone", source: "Corpus Luteum / Placenta", role: "Maintains endometrium for implantation; inhibits uterine contractions during pregnancy" },
    { hormone: "hCG", source: "Trophoblast", role: "Maintains corpus luteum early in pregnancy; basis of pregnancy test" },
    { hormone: "Testosterone", source: "Leydig Cells", role: "Spermatogenesis; secondary sexual characters in males" },
    { hormone: "Oxytocin", source: "Posterior Pituitary", role: "Uterine contractions during labour; milk ejection (let-down reflex)" },
    { hormone: "Prolactin", source: "Anterior Pituitary", role: "Milk production in mammary glands post-delivery" },
  ];

  // header row
  s.addShape(pres.ShapeType.rect, { x: 0.25, y: 1.35, w: 9.5, h: 0.38, fill: { color: C.teal } });
  s.addText("Hormone", { x: 0.3, y: 1.35, w: 1.8, h: 0.38, fontSize: 11.5, bold: true, color: C.dark, valign: "middle" });
  s.addText("Source", { x: 2.1, y: 1.35, w: 2.5, h: 0.38, fontSize: 11.5, bold: true, color: C.dark, valign: "middle" });
  s.addText("Key Role", { x: 4.6, y: 1.35, w: 5.1, h: 0.38, fontSize: 11.5, bold: true, color: C.dark, valign: "middle" });

  hormones.forEach((h, i) => {
    const y = 1.73 + i * 0.47;
    s.addShape(pres.ShapeType.rect, { x: 0.25, y, w: 9.5, h: 0.46, fill: { color: i % 2 === 0 ? C.mid : "152D45" } });
    s.addText(h.hormone, { x: 0.3, y, w: 1.8, h: 0.46, fontSize: 11.5, bold: true, color: C.accent1, valign: "middle" });
    s.addText(h.source, { x: 2.1, y, w: 2.5, h: 0.46, fontSize: 10.5, color: C.gray, valign: "middle" });
    s.addText(h.role, { x: 4.6, y, w: 5.1, h: 0.46, fontSize: 10, color: C.white, valign: "middle" });
  });
}

// ────────────────────────────────────────────────────────────────
// SLIDE 16 – KEY TERMS & MNEMONICS
// ────────────────────────────────────────────────────────────────
{
  const s = pres.addSlide();
  bg(s, C.dark);
  accentBar(s, C.yellow);
  sectionTag(s, "Quick Reference | Key Terms", 0.3, 0.18, C.yellow);

  s.addText("Important Terms & Exam Tips", { x: 0.3, y: 0.55, w: 9.2, h: 0.62, fontSize: 28, bold: true, color: C.white });
  dividerLine(s, 1.25, C.yellow);

  const terms = [
    { term: "Menarche", def: "First menstruation (typically age 12-15)" },
    { term: "Menopause", def: "Cessation of menstruation (~45-50 years)" },
    { term: "Graafian Follicle", def: "Mature ovarian follicle that releases ovum at ovulation" },
    { term: "Corpus Luteum", def: "Yellow body formed after ovulation; secretes progesterone" },
    { term: "Spermiogenesis", def: "Transformation of spermatids into spermatozoa" },
    { term: "Spermiation", def: "Release of mature sperms from Sertoli cells into lumen" },
    { term: "Capacitation", def: "Activation of sperm in female reproductive tract" },
    { term: "Morula", def: "16-cell stage embryo; looks like a mulberry" },
    { term: "Blastocyst", def: "Hollow ball stage; trophoblast + inner cell mass" },
    { term: "Gastrulation", def: "Formation of three primary germ layers" },
    { term: "Organogenesis", def: "Formation of organs from germ layers" },
    { term: "Colostrum", def: "First breast milk; rich in IgA antibodies (maternal immunity)" },
  ];

  terms.forEach((t, i) => {
    const col = i < 6 ? 0 : 1;
    const row = i % 6;
    const x = col === 0 ? 0.25 : 5.1;
    const y = 1.38 + row * 0.69;
    s.addShape(pres.ShapeType.roundRect, { x, y, w: 4.65, h: 0.6, fill: { color: i % 2 === 0 ? C.mid : "152D45" }, rectRadius: 0.06 });
    s.addText(t.term, { x: x + 0.1, y, w: 1.8, h: 0.6, fontSize: 11.5, bold: true, color: C.yellow, valign: "middle" });
    s.addText(t.def, { x: x + 1.95, y, w: 2.65, h: 0.6, fontSize: 10.5, color: C.white, valign: "middle" });
  });
}

// ────────────────────────────────────────────────────────────────
// SLIDE 17 – SUMMARY / CONCLUSION
// ────────────────────────────────────────────────────────────────
{
  const s = pres.addSlide();
  bg(s, C.dark);

  // decorative
  s.addShape(pres.ShapeType.ellipse, { x: 6.5, y: 1.5, w: 5.0, h: 5.0, fill: { color: C.mid }, line: { color: C.mid } });
  s.addShape(pres.ShapeType.ellipse, { x: 7.5, y: 2.3, w: 3.0, h: 3.0, fill: { color: C.teal }, line: { color: C.teal } });
  s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 0.09, fill: { color: C.accent1 } });

  s.addText("Key Takeaways", { x: 0.5, y: 0.5, w: 6.0, h: 0.55, fontSize: 14, bold: true, color: C.accent1, charSpacing: 3 });
  s.addText("Human Reproduction\nAt A Glance", { x: 0.5, y: 1.1, w: 6.0, h: 1.3, fontSize: 38, bold: true, color: C.white, fontFace: "Calibri" });

  const points = [
    "Humans are viviparous with internal fertilisation",
    "Testes produce sperms via spermatogenesis; ovaries produce ova via oogenesis",
    "Menstrual cycle (~28 days): Menstrual → Follicular → Ovulation → Luteal",
    "Fertilisation occurs in fallopian tube; zygote → morula → blastocyst",
    "Implantation in endometrium around Day 7-10 after fertilisation",
    "Placenta: nutritional, hormonal & immunological functions",
    "Parturition triggered by oxytocin; gestation ~9 months",
    "Colostrum provides passive immunity to the newborn",
  ];

  points.forEach((p, i) => {
    s.addShape(pres.ShapeType.roundRect, { x: 0.4, y: 2.55 + i * 0.36, w: 0.28, h: 0.28, fill: { color: C.accent1 }, rectRadius: 0.04 });
    s.addText(p, { x: 0.8, y: 2.52 + i * 0.36, w: 5.8, h: 0.34, fontSize: 11, color: C.white, valign: "middle" });
  });

  s.addShape(pres.ShapeType.rect, { x: 0, y: 5.38, w: 10, h: 0.09, fill: { color: C.accent1 } });
  s.addText("NCERT Class 12 Biology  |  Chapter 3: Human Reproduction", { x: 0.3, y: 5.2, w: 9.4, h: 0.22, fontSize: 9.5, color: C.gray, align: "center" });
}

// ─── WRITE FILE ───────────────────────────────────────────────
pres.writeFile({ fileName: "/home/daytona/workspace/human-reproduction-ppt/Human_Reproduction_Class12.pptx" })
  .then(() => console.log("PPT saved successfully!"))
  .catch(e => console.error("Error:", e));
Running Command

cd /home/daytona/workspace/human-reproduction-ppt && node create_ppt.js

Running Command

ls -lh /home/daytona/workspace/human-reproduction-ppt/Human_Reproduction_Class12.pptx

Your presentation is ready! Download it here:

Human Reproduction Class12

Presentation · PPTX


Here's what's included across 17 slides with a dark navy + cyan professional design:
SlideContent
1Title slide
2Table of Contents
3Introduction to Human Reproduction
4Male Reproductive System (all organs + functions)
5Testes structure & seminiferous tubules
6Female Reproductive System (all organs + functions)
7Gametogenesis - Spermatogenesis vs Oogenesis (step-by-step)
8Sperm structure (head, neck, middle piece, tail, end piece)
9Menstrual Cycle - all 4 phases with hormones
10Fertilisation - 5 step process
11Implantation timeline + Placenta functions
12Embryonic Development (Zygote → Foetal period)
13Germ Layers - Ectoderm, Mesoderm, Endoderm derivatives
14Parturition & Lactation (colostrum, oxytocin, prolactin)
15Hormones table (FSH, LH, Oestrogen, Progesterone, hCG, etc.)
16Key Terms & Definitions (menarche, corpus luteum, blastocyst, etc.)
17Summary - 8 key takeaways
Everything is aligned with the NCERT Class 12 Biology syllabus. Let me know if you'd like any changes!
This is a shared conversation. Sign in to Orris to start your own chat.