From da6c857c2922b31d7d8e911dc242a7ea337518c5 Mon Sep 17 00:00:00 2001 From: Stephen Donahue Date: Fri, 10 Apr 2026 02:17:24 +0000 Subject: [PATCH] [notes] - bell curves --- Notes/absurdity.md | 27 +++++++++++++++- _includes/bell-curve.svg | 5 +++ scripts/generate-bell-curve.js | 57 ++++++++++++++++++++++++++++++++++ 3 files changed, 88 insertions(+), 1 deletion(-) create mode 100644 _includes/bell-curve.svg create mode 100644 scripts/generate-bell-curve.js diff --git a/Notes/absurdity.md b/Notes/absurdity.md index 640a0e3..a8ae7fb 100644 --- a/Notes/absurdity.md +++ b/Notes/absurdity.md @@ -1,3 +1,10 @@ +--- +title: Absurdity +layout: column.njk +tags: column +permalink: /notes/absurdity/ +--- + ## Rough Notes @@ -7,7 +14,25 @@ ## Questions +- What makes a good story? + - the situation? + - the narration? + - what are the rules?! + - Rules are about as compelling as a yield sign + - It doesn't even have the gravity of a full-on stop + - It's just a non-committal suggestion that you might have a better time if you don't do the thing right away + - Rules pave over context. They omit the story by design. + - Betty got hit by a semi on this corner. Her parents sued, so they installed some flashing lights, and added safety paint. + - So seeking out rules feels like paving over the ground: it might make the drive easier, but it leaves less room for the plants to grow +- What does it mean to be tragically normal? + - Can you still be considered normal? The tragic part seems to put you into into some kind of exceptional bucket. + - It's like being painfully average. I feel like it's taken a sharp edge from dead-center. + - But if there are so many categories of 'not-'average, then being dead center starts to feel more exclusive. + - How many people do you know who grew up with 2.5 kids? + - What did they do with the half? + - Or, where did it come from? + - So if being average is actually quite rare, then its more common to not be? - +{% include "bell-curve.svg" %} ## Synthesis \ No newline at end of file diff --git a/_includes/bell-curve.svg b/_includes/bell-curve.svg new file mode 100644 index 0000000..d5b9472 --- /dev/null +++ b/_includes/bell-curve.svg @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/scripts/generate-bell-curve.js b/scripts/generate-bell-curve.js new file mode 100644 index 0000000..2a42110 --- /dev/null +++ b/scripts/generate-bell-curve.js @@ -0,0 +1,57 @@ +// Generates a bell curve SVG and writes it to _includes/bell-curve.svg +// Usage: node scripts/generate-bell-curve.js + +const fs = require("fs"); +const path = require("path"); + +const width = 600; +const height = 300; +const padding = { top: 20, right: 20, bottom: 40, left: 20 }; + +const plotW = width - padding.left - padding.right; +const plotH = height - padding.top - padding.bottom; + +// Standard normal PDF +function gaussian(x) { + return Math.exp(-0.5 * x * x) / Math.sqrt(2 * Math.PI); +} + +// Generate points from -4 to 4 +const steps = 200; +const xMin = -4, xMax = 4; +const points = []; +for (let i = 0; i <= steps; i++) { + const x = xMin + (xMax - xMin) * (i / steps); + points.push({ x, y: gaussian(x) }); +} + +const yMax = gaussian(0); // peak value + +function sx(x) { + return padding.left + ((x - xMin) / (xMax - xMin)) * plotW; +} + +function sy(y) { + return padding.top + plotH - (y / yMax) * plotH; +} + +// Build the curve path +const linePath = points.map((p, i) => { + const cmd = i === 0 ? "M" : "L"; + return `${cmd}${sx(p.x).toFixed(2)},${sy(p.y).toFixed(2)}`; +}).join(" "); + +// Build the filled area path (closed along the baseline) +const areaPath = linePath + + ` L${sx(xMax).toFixed(2)},${sy(0).toFixed(2)}` + + ` L${sx(xMin).toFixed(2)},${sy(0).toFixed(2)} Z`; + +const svg = ` + + + +`; + +const outPath = path.join(__dirname, "..", "_includes", "bell-curve.svg"); +fs.writeFileSync(outPath, svg); +console.log(`Wrote ${outPath}`);