// Layer opacity against altitude (log axis) for the transition sheet. const W = 1600, H = 330, L = 230, R = 30, T = 30, rowH = 40; const lo = Math.log10(0.5), hi = Math.log10(20000); const X = (km: number) => L + ((Math.log10(km) - lo) / (hi - lo)) * (W - L - R); type Seg = [number, number][]; // [km, opacity] const rows: { name: string; note: string; col: string; pts: Seg; today?: boolean }[] = [ { name: "3D city", note: "buildings sink into the ground", col: "#c7d3d8", pts: [[0.5, 1], [15, 1], [50, 0], [20000, 0]] }, { name: "Painted ground", note: "by distance; near stays today's style", col: "#86a957", pts: [[0.5, 0], [15, 0], [50, 1], [20000, 1]] }, { name: "City banners", note: "more of them lower down", col: "#5cc6c0", pts: [[0.5, 0], [2, 0], [5, 1], [20000, 1]] }, { name: "Hex grid", note: "the unit lenses count in", col: "#fff2c4", pts: [[0.5, 0], [100, 0], [250, 1], [1500, 1], [4000, 0], [20000, 0]] }, { name: "Globe and space", note: "space_factor, exists today", col: "#6fb6e6", pts: [[0.5, 0], [50, 0], [3000, 1], [20000, 1]], today: true }, ]; let s = ``; rows.forEach((r, i) => { const y0 = T + i * rowH, y1 = y0 + rowH - 12; s += `${r.name}${r.note}`; s += ``; const d = r.pts.map(([k, o], j) => `${j ? "L" : "M"}${X(k).toFixed(1)} ${(y1 - o * (rowH - 12)).toFixed(1)}`).join(""); s += ``; }); const yb = T + rows.length * rowH + 4; for (const [km, lab] of [[0.5, "500 m"], [3, "3 km"], [15, "15 km"], [40, "40 km"], [50, ""], [350, "350 km"], [3000, "3,000 km"], [12000, "12,000 km"]] as [number, string][]) { s += ``; if (lab) s += `${lab}`; } s += ``; await Bun.write(process.argv[2], s);