Hi
I wanna make a ppt
HANGING
ls /home/daytona/workspace/ 2>/dev/null || echo "workspace empty or not found"
mkdir -p /home/daytona/workspace/hanging-forensic-ppt
~/hanging-forensic-ppt/create_ppt.js
const pptxgen = require("pptxgenjs");
const pres = new pptxgen();
pres.layout = "LAYOUT_16x9";
pres.title = "Hanging – Forensic Medicine";
pres.author = "Forensic Medicine";
// ─── COLOR PALETTE ──────────────────────────────────────────────────────────
// Deep navy dominates; slate grey for content areas; crimson accent; white text
const C = {
navy: "0D1F3C",
navyMid: "152B52",
slate: "1E3A5F",
panel: "F4F6F9",
accent: "C0392B",
accent2: "E74C3C",
gold: "D4AC0D",
white: "FFFFFF",
light: "D6E4F0",
dark: "0A1628",
grey: "6C8EAD",
bullet: "C0392B",
};
// ─── HELPERS ────────────────────────────────────────────────────────────────
function titleBar(slide, text, sub) {
// Dark header band
slide.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0, w: 10, h: 1.1, fill: { color: C.navy }, line: { color: C.navy } });
// Accent left strip
slide.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0, w: 0.08, h: 1.1, fill: { color: C.accent }, line: { color: C.accent } });
slide.addText(text, { x: 0.2, y: 0.08, w: 9.5, h: 0.65, fontSize: 24, bold: true, color: C.white, fontFace: "Calibri", margin: 0 });
if (sub) {
slide.addText(sub, { x: 0.2, y: 0.72, w: 9.5, h: 0.32, fontSize: 12, color: C.light, fontFace: "Calibri", italic: true, margin: 0 });
}
}
function footer(slide, pageNum) {
slide.addShape(pres.shapes.RECTANGLE, { x: 0, y: 5.35, w: 10, h: 0.275, fill: { color: C.dark }, line: { color: C.dark } });
slide.addText("Forensic Medicine | Hanging", { x: 0.2, y: 5.36, w: 6, h: 0.24, fontSize: 8, color: C.grey, fontFace: "Calibri", margin: 0 });
slide.addText(`${pageNum}`, { x: 9.6, y: 5.36, w: 0.35, h: 0.24, fontSize: 8, color: C.grey, fontFace: "Calibri", align: "right", margin: 0 });
}
function contentBg(slide) {
slide.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: C.panel }, line: { color: C.panel } });
}
function bullets(slide, items, x, y, w, h, opts = {}) {
const textArr = items.map((item, i) => ({
text: item,
options: {
bullet: { type: "bullet", code: "2022" },
color: opts.color || C.navy,
fontSize: opts.fontSize || 14,
fontFace: "Calibri",
bold: opts.bold || false,
breakLine: i < items.length - 1,
paraSpaceBefore: 4,
},
}));
slide.addText(textArr, { x, y, w, h, valign: "top" });
}
function twoColPanel(slide, leftTitle, leftItems, rightTitle, rightItems, leftColor, rightColor) {
// Left panel
slide.addShape(pres.shapes.RECTANGLE, { x: 0.2, y: 1.2, w: 4.6, h: 3.9, fill: { color: leftColor || C.navy }, line: { color: leftColor || C.navy }, rectRadius: 0.08 });
slide.addText(leftTitle, { x: 0.3, y: 1.3, w: 4.4, h: 0.45, fontSize: 13, bold: true, color: C.white, fontFace: "Calibri", margin: 0 });
bullets(slide, leftItems, 0.3, 1.78, 4.3, 3.0, { color: C.white, fontSize: 12.5 });
// Right panel
slide.addShape(pres.shapes.RECTANGLE, { x: 5.1, y: 1.2, w: 4.6, h: 3.9, fill: { color: rightColor || C.slate }, line: { color: rightColor || C.slate }, rectRadius: 0.08 });
slide.addText(rightTitle, { x: 5.2, y: 1.3, w: 4.4, h: 0.45, fontSize: 13, bold: true, color: C.white, fontFace: "Calibri", margin: 0 });
bullets(slide, rightItems, 5.2, 1.78, 4.3, 3.0, { color: C.white, fontSize: 12.5 });
}
// ════════════════════════════════════════════════════════════════════════════
// SLIDE 1 – TITLE SLIDE
// ════════════════════════════════════════════════════════════════════════════
{
const slide = pres.addSlide();
// Full dark background
slide.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: C.navy }, line: { color: C.navy } });
// Accent bottom strip
slide.addShape(pres.shapes.RECTANGLE, { x: 0, y: 5.1, w: 10, h: 0.525, fill: { color: C.accent }, line: { color: C.accent } });
// Decorative left accent
slide.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0, w: 0.12, h: 5.625, fill: { color: C.gold }, line: { color: C.gold } });
// Central white divider
slide.addShape(pres.shapes.RECTANGLE, { x: 1, y: 2.45, w: 8, h: 0.04, fill: { color: C.grey }, line: { color: C.grey } });
slide.addText("HANGING", {
x: 1, y: 1.0, w: 8, h: 1.1,
fontSize: 54, bold: true, color: C.white, fontFace: "Calibri",
align: "center", charSpacing: 12,
});
slide.addText("Forensic Medicine & Medico-legal Aspects", {
x: 1, y: 2.1, w: 8, h: 0.5,
fontSize: 18, color: C.light, fontFace: "Calibri", align: "center", italic: true,
});
slide.addText("Types • Mechanisms • PM Findings • Medico-legal Significance", {
x: 1, y: 2.65, w: 8, h: 0.45,
fontSize: 13, color: C.grey, fontFace: "Calibri", align: "center",
});
slide.addText("Source: Parikh's Textbook of Medical Jurisprudence & Forensic Medicine; P C Dikshit Textbook; DiMaio's Forensic Pathology 3rd Ed.", {
x: 1, y: 5.1, w: 8, h: 0.45,
fontSize: 9, color: C.white, fontFace: "Calibri", align: "center",
});
}
// ════════════════════════════════════════════════════════════════════════════
// SLIDE 2 – DEFINITION & OVERVIEW
// ════════════════════════════════════════════════════════════════════════════
{
const slide = pres.addSlide();
contentBg(slide);
titleBar(slide, "Definition & Overview", "Parikh's Textbook of Medical Jurisprudence & Forensic Medicine");
// Definition box
slide.addShape(pres.shapes.RECTANGLE, { x: 0.3, y: 1.2, w: 9.4, h: 1.1, fill: { color: C.accent }, line: { color: C.accent }, rectRadius: 0.08 });
slide.addText(
"Hanging is a form of violent asphyxia resulting from suspension of the body by a ligature round the neck, the constricting force being the weight of the body.",
{ x: 0.45, y: 1.25, w: 9.1, h: 1.0, fontSize: 14, color: C.white, fontFace: "Calibri", bold: false, valign: "middle" }
);
// Key facts 2-col
const leftItems = [
"The ligature constricts neurovascular bundles and/or upper airways",
"Complete hanging: entire body weight acts as constricting force",
"Partial hanging: only head weight (~5–6 kg) acts; feet touch ground",
"Head weight (10–12 lb) alone suffices to occlude jugular veins & carotid arteries",
];
const rightItems = [
"Most common method of suicide worldwide",
"Virtually all hangings are suicidal; homicidal hangings are rare",
"Accidental hangings are uncommon",
"In India, more common among males; preferred method of suicide",
];
slide.addShape(pres.shapes.RECTANGLE, { x: 0.3, y: 2.4, w: 4.5, h: 2.8, fill: { color: C.navy }, line: { color: C.navy }, rectRadius: 0.08 });
slide.addText("Mechanism", { x: 0.4, y: 2.48, w: 4.2, h: 0.4, fontSize: 13, bold: true, color: C.gold, fontFace: "Calibri", margin: 0 });
bullets(slide, leftItems, 0.4, 2.88, 4.2, 2.2, { color: C.white, fontSize: 12 });
slide.addShape(pres.shapes.RECTANGLE, { x: 5.1, y: 2.4, w: 4.5, h: 2.8, fill: { color: C.slate }, line: { color: C.slate }, rectRadius: 0.08 });
slide.addText("Epidemiology", { x: 5.2, y: 2.48, w: 4.2, h: 0.4, fontSize: 13, bold: true, color: C.gold, fontFace: "Calibri", margin: 0 });
bullets(slide, rightItems, 5.2, 2.88, 4.2, 2.2, { color: C.white, fontSize: 12 });
footer(slide, 2);
}
// ════════════════════════════════════════════════════════════════════════════
// SLIDE 3 – CLASSIFICATION / TYPES
// ════════════════════════════════════════════════════════════════════════════
{
const slide = pres.addSlide();
contentBg(slide);
titleBar(slide, "Classification of Hanging", "P C Dikshit Textbook of Forensic Medicine & Toxicology");
const categories = [
{ title: "By Position of Feet", color: C.navy, items: ["Complete Hanging – whole body weight acts; feet off ground", "Partial Hanging – only head weight acts; toes/knees/buttocks touch ground"] },
{ title: "By Position of Noose", color: C.slate, items: ["Typical Hanging – knot at the back of neck (occiput)", "Atypical Hanging – knot at front or side of neck (most common in suicides)"] },
{ title: "By Mode / Manner", color: "1A4D2E", items: ["Suicidal (most common)", "Accidental (rare)", "Homicidal (very rare)", "Judicial hanging", "Autoerotic / Sexual hanging"] },
];
const positions = [
{ x: 0.2, y: 1.2, w: 3.0 },
{ x: 3.45, y: 1.2, w: 3.0 },
{ x: 6.7, y: 1.2, w: 3.0 },
];
categories.forEach((cat, i) => {
const p = positions[i];
slide.addShape(pres.shapes.RECTANGLE, { x: p.x, y: p.y, w: p.w, h: 3.9, fill: { color: cat.color }, line: { color: cat.color }, rectRadius: 0.08 });
slide.addText(cat.title, { x: p.x + 0.1, y: p.y + 0.1, w: p.w - 0.2, h: 0.5, fontSize: 12.5, bold: true, color: C.gold, fontFace: "Calibri", margin: 0 });
bullets(slide, cat.items, p.x + 0.12, p.y + 0.65, p.w - 0.22, 3.0, { color: C.white, fontSize: 12 });
});
footer(slide, 3);
}
// ════════════════════════════════════════════════════════════════════════════
// SLIDE 4 – CAUSE OF DEATH
// ════════════════════════════════════════════════════════════════════════════
{
const slide = pres.addSlide();
contentBg(slide);
titleBar(slide, "Cause of Death in Hanging", "Parikh's Textbook of Medical Jurisprudence & Forensic Medicine");
// 5 cause boxes arranged in a cross/grid
const causes = [
{ num: "1", title: "Cerebral Ischaemia", text: "Obstruction of arterial blood flow to brain by pressure on carotid arteries (occluded at 3.5 kg / ~11 lb)" },
{ num: "2", title: "Cerebral Congestion", text: "Compression of jugular veins (occluded at 2 kg / ~4.4 lb); vertebral arteries continue to supply blood → congestion & petechiae" },
{ num: "3", title: "Airway Obstruction", text: "Direct compression of trachea (needs ~15 kg) or tongue root pulled up by ligature blocking pharynx" },
{ num: "4", title: "Vagal Inhibition", text: "Pressure on vagus nerve or carotid sinus → reflex cardiac arrest; common cause of rapid death" },
{ num: "5", title: "Spinal Cord Injury", text: "Fracture-dislocation of upper cervical vertebrae (mainly in judicial hanging with long drop); 'Hangman's fracture' at C2" },
];
causes.forEach((c, i) => {
const col = i % 2 === 0 ? 0 : 5;
const row = Math.floor(i / 2);
const x = col === 0 ? 0.2 : 5.1;
const y = 1.2 + row * 2.05;
const w = 4.6;
const h = 1.85;
if (i === 4) { // last item centered
slide.addShape(pres.shapes.RECTANGLE, { x: 2.65, y: y, w: 4.6, h: 1.35, fill: { color: C.accent }, line: { color: C.accent }, rectRadius: 0.08 });
slide.addText(`${c.num}. ${c.title}`, { x: 2.75, y: y + 0.07, w: 4.3, h: 0.38, fontSize: 13, bold: true, color: C.white, fontFace: "Calibri", margin: 0 });
slide.addText(c.text, { x: 2.75, y: y + 0.45, w: 4.3, h: 0.85, fontSize: 11.5, color: C.white, fontFace: "Calibri", valign: "top" });
} else {
slide.addShape(pres.shapes.RECTANGLE, { x, y, w, h, fill: { color: i % 2 === 0 ? C.navy : C.slate }, line: { color: i % 2 === 0 ? C.navy : C.slate }, rectRadius: 0.08 });
slide.addText(`${c.num}. ${c.title}`, { x: x + 0.12, y: y + 0.07, w: w - 0.22, h: 0.38, fontSize: 13, bold: true, color: C.gold, fontFace: "Calibri", margin: 0 });
slide.addText(c.text, { x: x + 0.12, y: y + 0.47, w: w - 0.22, h: 1.2, fontSize: 11.5, color: C.white, fontFace: "Calibri", valign: "top" });
}
});
// Note
slide.addText("★ Most common: Compression of neurovascular bundles, NOT asphyxia — evidenced by suicidal hanging with tracheostomy below noose level", {
x: 0.2, y: 5.1, w: 9.5, h: 0.3, fontSize: 9.5, color: C.accent, fontFace: "Calibri", italic: true, margin: 0,
});
footer(slide, 4);
}
// ════════════════════════════════════════════════════════════════════════════
// SLIDE 5 – FATAL PERIOD & SEQUENCE OF EVENTS
// ════════════════════════════════════════════════════════════════════════════
{
const slide = pres.addSlide();
contentBg(slide);
titleBar(slide, "Fatal Period & Sequence of Events", "DiMaio's Forensic Pathology 3rd Ed. / Parikh's Textbook");
// Timeline bar
const events = [
{ t: "0 s", label: "Ligature\ntightens", color: C.navy },
{ t: "~13 s", label: "Loss of\nconsciousness", color: C.slate },
{ t: "~15 s", label: "Mild\nconvulsions", color: "1F618D" },
{ t: "~19 s", label: "Decerebrate\nposturing", color: "154360" },
{ t: "~1 min", label: "Loss of\nmuscle tone", color: C.accent },
{ t: "4–8 min", label: "Complete loss\nof movement", color: "7B241C" },
];
const startX = 0.3;
const barY = 2.0;
const boxW = 1.48;
const gap = 0.05;
events.forEach((ev, i) => {
const x = startX + i * (boxW + gap);
slide.addShape(pres.shapes.RECTANGLE, { x, y: barY, w: boxW, h: 1.7, fill: { color: ev.color }, line: { color: ev.color }, rectRadius: 0.07 });
slide.addText(ev.t, { x, y: barY + 0.08, w: boxW, h: 0.4, fontSize: 13, bold: true, color: C.gold, fontFace: "Calibri", align: "center", margin: 0 });
slide.addText(ev.label, { x, y: barY + 0.52, w: boxW, h: 1.1, fontSize: 11, color: C.white, fontFace: "Calibri", align: "center", valign: "middle" });
});
// Arrow
slide.addShape(pres.shapes.RIGHT_ARROW, { x: 0.3, y: 3.85, w: 9.4, h: 0.25, fill: { color: C.accent }, line: { color: C.accent } });
slide.addText("Time →", { x: 0.3, y: 3.87, w: 9.4, h: 0.22, fontSize: 9, color: C.white, fontFace: "Calibri", align: "center", margin: 0 });
// Fatal period boxes
slide.addShape(pres.shapes.RECTANGLE, { x: 0.3, y: 4.2, w: 4.5, h: 1.0, fill: { color: C.navy }, line: { color: C.navy }, rectRadius: 0.08 });
slide.addText("Non-Judicial Hanging", { x: 0.4, y: 4.24, w: 4.3, h: 0.35, fontSize: 12, bold: true, color: C.gold, fontFace: "Calibri", margin: 0 });
slide.addText("Fatal period: 5–8 minutes (no spinal cord injury; partial airway block)", { x: 0.4, y: 4.6, w: 4.2, h: 0.55, fontSize: 11, color: C.white, fontFace: "Calibri" });
slide.addShape(pres.shapes.RECTANGLE, { x: 5.1, y: 4.2, w: 4.5, h: 1.0, fill: { color: C.accent }, line: { color: C.accent }, rectRadius: 0.08 });
slide.addText("Judicial Hanging (Long Drop)", { x: 5.2, y: 4.24, w: 4.3, h: 0.35, fontSize: 12, bold: true, color: C.white, fontFace: "Calibri", margin: 0 });
slide.addText("Death instantaneous from C2 fracture-dislocation; heart may beat 15–20 min", { x: 5.2, y: 4.6, w: 4.2, h: 0.55, fontSize: 11, color: C.white, fontFace: "Calibri" });
footer(slide, 5);
}
// ════════════════════════════════════════════════════════════════════════════
// SLIDE 6 – LIGATURE MARK
// ════════════════════════════════════════════════════════════════════════════
{
const slide = pres.addSlide();
contentBg(slide);
titleBar(slide, "Ligature Mark in Hanging", "P C Dikshit Textbook / DiMaio's Forensic Pathology");
// Characteristic features left column
slide.addShape(pres.shapes.RECTANGLE, { x: 0.2, y: 1.2, w: 5.9, h: 3.95, fill: { color: C.navy }, line: { color: C.navy }, rectRadius: 0.08 });
slide.addText("Characteristic Features", { x: 0.32, y: 1.28, w: 5.6, h: 0.42, fontSize: 14, bold: true, color: C.gold, fontFace: "Calibri", margin: 0 });
const charItems = [
"Oblique, non-continuous furrow slanting upward toward the knot (point of suspension)",
"Inverted-V / inverted-U shape; apex at the knot",
"Does NOT completely encircle the neck (unlike ligature strangulation)",
"Pale, yellowish, parchment-like appearance (dries out); later dark brown",
"Thin line of congestion / haemorrhage above & below the deepest point of groove",
"Rope → deep, well-demarcated, mirror-image weave impression",
"Soft cloth (sari, dupatta) → broad, shallow, poorly defined or absent mark",
"Belt → two parallel furrows (upper and lower edges)",
];
bullets(slide, charItems, 0.32, 1.72, 5.65, 3.3, { color: C.white, fontSize: 11.5 });
// Differentiating factors right column
slide.addShape(pres.shapes.RECTANGLE, { x: 6.3, y: 1.2, w: 3.5, h: 3.95, fill: { color: C.slate }, line: { color: C.slate }, rectRadius: 0.08 });
slide.addText("Hanging vs Strangulation\nLigature Mark", { x: 6.4, y: 1.28, w: 3.3, h: 0.72, fontSize: 13, bold: true, color: C.gold, fontFace: "Calibri", margin: 0 });
const diffItems = [
"Hanging: oblique, not continuous, below jaw",
"Strangulation: horizontal, continuous, encircles neck completely",
"Hanging: deeper opposite knot",
"Strangulation: uniform depth around neck",
"Hanging: pale/parchmentised",
"Strangulation: more abrasion & bruising",
"Scratch abrasions above/below mark may indicate victim tried to undo noose",
];
bullets(slide, diffItems, 6.4, 2.02, 3.3, 3.0, { color: C.white, fontSize: 11 });
footer(slide, 6);
}
// ════════════════════════════════════════════════════════════════════════════
// SLIDE 7 – POST-MORTEM FINDINGS (External)
// ════════════════════════════════════════════════════════════════════════════
{
const slide = pres.addSlide();
contentBg(slide);
titleBar(slide, "Post-mortem Findings – External", "Parikh's Textbook / DiMaio's Forensic Pathology");
const findings = [
{ icon: "👁", label: "Face & Eyes", desc: "Usually pale (in complete suspension); congested/swollen face with petechiae in partial hanging (vertebral arteries continue perfusing). Eyeballs prominent (congestion). Subconjunctival haemorrhages (petechiae) may be present." },
{ icon: "👅", label: "Tongue", desc: "Turgid, may protrude; exposed part becomes dark brown/black from drying. Protruded due to pressure at base of tongue by the ligature." },
{ icon: "💧", label: "Salivary Dribble", desc: "Saliva may dribble from corner of mouth opposite side of knot — caused by pressure on salivary glands by the ligature." },
{ icon: "🔵", label: "Lividity", desc: "Postmortem lividity circumferentially on dependent arms, legs, face, and neck above the ligature. Tardieu spots (punctate haemorrhages) on hands/forearms/lower legs from hydrostatic vessel rupture." },
{ icon: "🫁", label: "Neck", desc: "Stretched due to upward pull. Head inclines to side opposite the knot. Cyanosis of hands and nail beds." },
];
findings.forEach((f, i) => {
const row = Math.floor(i / 2);
const col = i % 2;
const x = col === 0 ? 0.2 : 5.1;
const y = 1.25 + row * 2.1;
const w = 4.6;
const h = 1.9;
if (i === 4) {
slide.addShape(pres.shapes.RECTANGLE, { x: 2.65, y, w, h: 1.55, fill: { color: C.accent }, line: { color: C.accent }, rectRadius: 0.08 });
slide.addText(`${f.icon} ${f.label}`, { x: 2.75, y: y + 0.06, w: 4.3, h: 0.38, fontSize: 13, bold: true, color: C.white, fontFace: "Calibri", margin: 0 });
slide.addText(f.desc, { x: 2.75, y: y + 0.46, w: 4.3, h: 1.0, fontSize: 11, color: C.white, fontFace: "Calibri", valign: "top" });
} else {
const bgColor = (i % 2 === 0) ? C.navy : C.slate;
slide.addShape(pres.shapes.RECTANGLE, { x, y, w, h, fill: { color: bgColor }, line: { color: bgColor }, rectRadius: 0.08 });
slide.addText(`${f.icon} ${f.label}`, { x: x + 0.12, y: y + 0.07, w: w - 0.22, h: 0.38, fontSize: 13, bold: true, color: C.gold, fontFace: "Calibri", margin: 0 });
slide.addText(f.desc, { x: x + 0.12, y: y + 0.47, w: w - 0.22, h: 1.3, fontSize: 11, color: C.white, fontFace: "Calibri", valign: "top" });
}
});
footer(slide, 7);
}
// ════════════════════════════════════════════════════════════════════════════
// SLIDE 8 – POST-MORTEM FINDINGS (Internal)
// ════════════════════════════════════════════════════════════════════════════
{
const slide = pres.addSlide();
contentBg(slide);
titleBar(slide, "Post-mortem Findings – Internal", "DiMaio's Forensic Pathology 3rd Ed. / Parikh's Textbook");
const internal = [
{ title: "Brain", text: "Cerebral congestion and oedema. Petechial haemorrhages on brain surface (in asphyxial deaths)." },
{ title: "Internal Neck Injuries", text: "Rare in non-judicial hanging (~9–12%). May include strap muscle haemorrhage, hyoid fracture (uncommon), thyroid cartilage superior horn fracture." },
{ title: "Lungs", text: "Congested, oedematous. Sub-pleural petechiae (Tardieu spots). Vomitus may be found in bronchi below the level of neck constriction." },
{ title: "Heart & Vessels", text: "Carotid artery intimal tears possible. Right heart typically distended with dark fluid blood (asphyxial pattern). Petechiae over heart surface." },
{ title: "Spinal Column", text: "Fracture-dislocation of C2 ('Hangman's fracture' — through pedicles of C2) in judicial hanging. Non-judicial: cervical fracture rare, seen with osteoarthritis + obesity + long drop." },
{ title: "Bladder & Rectum", text: "Involuntary passage of urine and faeces common due to relaxation of sphincters at death — an asphyxial sign." },
];
internal.forEach((item, i) => {
const col = i % 2;
const row = Math.floor(i / 2);
const x = col === 0 ? 0.2 : 5.1;
const y = 1.2 + row * 1.45;
const w = 4.6;
const h = 1.3;
const bgColor = col === 0 ? C.navy : C.slate;
slide.addShape(pres.shapes.RECTANGLE, { x, y, w, h, fill: { color: bgColor }, line: { color: bgColor }, rectRadius: 0.08 });
slide.addText(item.title, { x: x + 0.12, y: y + 0.06, w: w - 0.22, h: 0.35, fontSize: 12.5, bold: true, color: C.gold, fontFace: "Calibri", margin: 0 });
slide.addText(item.text, { x: x + 0.12, y: y + 0.42, w: w - 0.22, h: 0.82, fontSize: 11, color: C.white, fontFace: "Calibri", valign: "top" });
});
footer(slide, 8);
}
// ════════════════════════════════════════════════════════════════════════════
// SLIDE 9 – JUDICIAL HANGING
// ════════════════════════════════════════════════════════════════════════════
{
const slide = pres.addSlide();
contentBg(slide);
titleBar(slide, "Judicial Hanging", "DiMaio's Forensic Pathology 3rd Ed.");
// Large description box
slide.addShape(pres.shapes.RECTANGLE, { x: 0.2, y: 1.2, w: 9.6, h: 0.9, fill: { color: C.accent }, line: { color: C.accent }, rectRadius: 0.08 });
slide.addText(
"Judicial hanging uses a long drop calculated by weight to cause C2 fracture-dislocation (Hangman's fracture), producing immediate unconsciousness and death.",
{ x: 0.35, y: 1.28, w: 9.3, h: 0.74, fontSize: 13, color: C.white, fontFace: "Calibri", valign: "middle" }
);
const leftItems = [
"Knot placed under left ear or under the chin",
"Trapdoor sprung → prisoner falls calculated distance",
"Head jerked violently backward at end of fall",
"Classical Hangman's Fracture: fracture through pedicles of C2; posterior arch fixed to C3",
"If drop insufficient → strangulation (not broken neck)",
"If drop excessive → decapitation",
];
const rightItems = [
"Loss of consciousness: immediate",
"Heart may continue beating 8–20 min post-hanging",
"Muscular contractions, facial twitching, limb convulsions, violent respiratory movements may occur",
"Injury level: C2–C3 cord transection",
"Associated findings: hyoid fracture, thyroid cartilage fracture, vertebral artery laceration, subarachnoid haemorrhage",
];
slide.addShape(pres.shapes.RECTANGLE, { x: 0.2, y: 2.2, w: 4.6, h: 3.1, fill: { color: C.navy }, line: { color: C.navy }, rectRadius: 0.08 });
slide.addText("Mechanism & Procedure", { x: 0.32, y: 2.28, w: 4.4, h: 0.4, fontSize: 13, bold: true, color: C.gold, fontFace: "Calibri", margin: 0 });
bullets(slide, leftItems, 0.32, 2.7, 4.38, 2.5, { color: C.white, fontSize: 11.5 });
slide.addShape(pres.shapes.RECTANGLE, { x: 5.1, y: 2.2, w: 4.6, h: 3.1, fill: { color: C.slate }, line: { color: C.slate }, rectRadius: 0.08 });
slide.addText("Clinical Features & Findings", { x: 5.22, y: 2.28, w: 4.4, h: 0.4, fontSize: 13, bold: true, color: C.gold, fontFace: "Calibri", margin: 0 });
bullets(slide, rightItems, 5.22, 2.7, 4.38, 2.5, { color: C.white, fontSize: 11.5 });
footer(slide, 9);
}
// ════════════════════════════════════════════════════════════════════════════
// SLIDE 10 – MEDICO-LEGAL ASPECTS
// ════════════════════════════════════════════════════════════════════════════
{
const slide = pres.addSlide();
contentBg(slide);
titleBar(slide, "Medico-legal Aspects", "Parikh's / P C Dikshit / DiMaio's");
const manners = [
{
title: "SUICIDAL (Most Common)",
color: "1A5276",
items: [
"Ligature tied with knots the person could reach",
"Usually single loop; noose applied by self",
"Hands sometimes tied to prevent change of mind",
"Scratch marks above/below noose (attempts to undo)",
"Chosen ligature material easily accessible",
"Scene: note, overturned object, no third-party evidence",
"Usually atypical hanging (knot at front or side)",
],
},
{
title: "HOMICIDAL (Very Rare)",
color: "7B241C",
items: [
"Homicidal hanging is very difficult unless victim is already unconscious",
"Knot may be too complex for self-application",
"Evidence of struggle, restraint injuries, defensive wounds",
"Other injuries inconsistent with self-infliction",
"Posture/position inconsistent with suicide",
"Multiple ligature marks or ligature applied post-mortem",
],
},
{
title: "ACCIDENTAL / AUTOEROTIC",
color: "1F618D",
items: [
"Autoerotic (Sexual): elaborate apparatus, partial suspension, evidence of sexual activity",
"Padding under ligature to prevent marks",
"Cross-dressing, pornographic material at scene",
"Accidental: children, psychiatric patients",
"No suicide intent evident",
],
},
];
manners.forEach((m, i) => {
const x = 0.15 + i * 3.28;
const w = 3.1;
slide.addShape(pres.shapes.RECTANGLE, { x, y: 1.15, w, h: 4.15, fill: { color: m.color }, line: { color: m.color }, rectRadius: 0.08 });
slide.addText(m.title, { x: x + 0.1, y: 1.22, w: w - 0.18, h: 0.5, fontSize: 11.5, bold: true, color: C.gold, fontFace: "Calibri", margin: 0 });
bullets(slide, m.items, x + 0.12, 1.74, w - 0.22, 3.4, { color: C.white, fontSize: 11 });
});
footer(slide, 10);
}
// ════════════════════════════════════════════════════════════════════════════
// SLIDE 11 – HANGING vs LIGATURE STRANGULATION (Differences)
// ════════════════════════════════════════════════════════════════════════════
{
const slide = pres.addSlide();
contentBg(slide);
titleBar(slide, "Hanging vs Ligature Strangulation – Key Differences", "Parikh's / DiMaio's");
const headers = ["Feature", "Hanging", "Ligature Strangulation"];
const rows = [
["Constricting force", "Body weight", "External force (other than body weight)"],
["Manner", "Usually suicidal", "Usually homicidal"],
["Ligature mark direction", "Oblique, upward toward knot", "Horizontal, encircles neck completely"],
["Continuity of mark", "Incomplete (gap at knot site)", "Continuous all around"],
["Neck fractures", "Rare (except judicial hanging)", "Rare"],
["Hyoid fracture", "Uncommon", "More common"],
["Face appearance", "Usually pale (complete suspension)", "Usually congested, cyanotic"],
["Petechiae", "Less common (complete suspension)", "Common"],
["Position of mark", "Above the thyroid cartilage / oblique", "Usually at or below thyroid cartilage / horizontal"],
];
const colWidths = [2.2, 3.6, 3.6];
const rowH = 0.46;
const startY = 1.15;
const startX = 0.2;
// Header row
headers.forEach((h, ci) => {
const x = startX + colWidths.slice(0, ci).reduce((a, b) => a + b + 0.05, 0);
slide.addShape(pres.shapes.RECTANGLE, { x, y: startY, w: colWidths[ci], h: 0.46, fill: { color: C.accent }, line: { color: C.accent } });
slide.addText(h, { x: x + 0.07, y: startY + 0.04, w: colWidths[ci] - 0.12, h: 0.38, fontSize: 12, bold: true, color: C.white, fontFace: "Calibri", margin: 0 });
});
// Data rows
rows.forEach((row, ri) => {
const y = startY + 0.46 + ri * rowH;
const bgColor = ri % 2 === 0 ? C.navy : C.navyMid;
row.forEach((cell, ci) => {
const x = startX + colWidths.slice(0, ci).reduce((a, b) => a + b + 0.05, 0);
slide.addShape(pres.shapes.RECTANGLE, { x, y, w: colWidths[ci], h: rowH, fill: { color: bgColor }, line: { color: bgColor } });
slide.addText(cell, { x: x + 0.07, y: y + 0.02, w: colWidths[ci] - 0.12, h: rowH - 0.04, fontSize: 10.5, color: C.white, fontFace: "Calibri", valign: "middle", margin: 0 });
});
});
footer(slide, 11);
}
// ════════════════════════════════════════════════════════════════════════════
// SLIDE 12 – SUMMARY & KEY POINTS
// ════════════════════════════════════════════════════════════════════════════
{
const slide = pres.addSlide();
// Dark full background
slide.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: C.dark }, line: { color: C.dark } });
slide.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0, w: 10, h: 0.06, fill: { color: C.accent }, line: { color: C.accent } });
slide.addShape(pres.shapes.RECTANGLE, { x: 0, y: 5.565, w: 10, h: 0.06, fill: { color: C.accent }, line: { color: C.accent } });
slide.addText("Summary & Key Points", {
x: 0.5, y: 0.2, w: 9, h: 0.7,
fontSize: 26, bold: true, color: C.white, fontFace: "Calibri", align: "center", charSpacing: 3,
});
const keyPoints = [
"Hanging = violent asphyxia; constricting force is body weight acting via a noose",
"Death primarily from vascular compression (carotid/jugular), NOT airway obstruction",
"Complete vs partial based on position of feet; typical vs atypical based on knot position",
"Ligature mark: oblique, non-continuous, parchment-like, V-shaped with apex at knot",
"External PM: face pale (or congested in partial), protruding black tongue, petechiae, Tardieu spots",
"Internal PM: neck injuries rare; brain congestion; sub-pleural & sub-epicardial petechiae",
"Judicial hanging: long drop → Hangman's fracture C2 → instant death",
"Nearly all hangings are suicidal; homicidal hanging is very rare",
"Autoerotic hanging: partial suspension, sexual paraphernalia, padding under ligature",
"Medico-legal: examine ligature material, knot type, mark features, scene, history",
];
keyPoints.forEach((pt, i) => {
const col = i % 2;
const row = Math.floor(i / 2);
const x = col === 0 ? 0.3 : 5.2;
const y = 1.05 + row * 0.92;
const w = 4.6;
// Bullet circle
slide.addShape(pres.shapes.OVAL, { x, y: y + 0.12, w: 0.22, h: 0.22, fill: { color: C.accent }, line: { color: C.accent } });
slide.addText(pt, { x: x + 0.3, y, w: w - 0.3, h: 0.82, fontSize: 11, color: C.light, fontFace: "Calibri", valign: "middle" });
});
// References
slide.addText("References: Parikh's Textbook of Medical Jurisprudence (9th ed.) • P C Dikshit Textbook of Forensic Medicine & Toxicology • DiMaio's Forensic Pathology 3rd Ed.", {
x: 0.3, y: 5.45, w: 9.4, h: 0.2,
fontSize: 7.5, color: C.grey, fontFace: "Calibri", align: "center", margin: 0,
});
}
// ─── WRITE FILE ─────────────────────────────────────────────────────────────
pres.writeFile({ fileName: "/home/daytona/workspace/hanging-forensic-ppt/Hanging_Forensic_Medicine.pptx" })
.then(() => console.log("✅ PPT saved successfully!"))
.catch(err => { console.error("ERROR:", err); process.exit(1); });
cd /home/daytona/workspace/hanging-forensic-ppt && node create_ppt.js
ls -lh /home/daytona/workspace/hanging-forensic-ppt/
Hanging Forensic Medicine
Presentation · PPTX
| # | Slide | Content |
|---|---|---|
| 1 | Title Slide | Bold "HANGING" on dark navy with accent design |
| 2 | Definition & Overview | Definition, complete vs partial, epidemiology |
| 3 | Classification | By feet position, noose position, mode/manner |
| 4 | Cause of Death | 5 mechanisms - cerebral ischaemia, congestion, airway, vagal inhibition, spinal injury |
| 5 | Fatal Period & Sequence | Timeline from 0s → 4-8 min; judicial vs non-judicial |
| 6 | Ligature Mark | Characteristics, rope vs soft cloth vs belt; hanging vs strangulation comparison |
| 7 | PM Findings (External) | Face, tongue, salivary dribble, lividity, Tardieu spots, neck |
| 8 | PM Findings (Internal) | Brain, lungs, heart, neck structures, spinal column, bladder/rectum |
| 9 | Judicial Hanging | Hangman's fracture C2, long drop, knot placement, findings |
| 10 | Medico-legal Aspects | Suicidal vs homicidal vs accidental/autoerotic features |
| 11 | Hanging vs Strangulation | 9-row comparison table |
| 12 | Summary | 10 key takeaways + references |