From 18199ac77e3bf8aaccecf2a5a433331cc027d795 Mon Sep 17 00:00:00 2001 From: William Wong Date: Mon, 19 Oct 2026 14:44:57 +0100 Subject: [PATCH] feat(renderer): give a travelling body a floor to travel on MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The ground grid was 6 m across — ±3 m from the origin — while one line travels 2.11 m on Kimodo and 3.89 m on SnapMoGen, the furthest ghost sibling reaches 4.77 m, and a whole baked poem's net displacement measured 3.63 m. So the body walked off its own floor, and once off it there was no ground left to read the travel against. It is 20 m now at the same 0.5 m cell: about twice the worst measured case, and centred on the origin, so only half of it lies in whichever direction the body happens to go. Day 4's headline 9.51 m is path length, not displacement — that body ran left and then right. Path length is the trails' and the floor path's problem, not the floor's, which only has to reach as far as the body gets from the start. The grid was also painted in --line (#232732): the hairline colour for 1px dividers between panels, chosen at desk distance. Measured against the backgrounds it actually sits on it reached 1.12:1 on the bench and 1.045:1 in performance, and only 1.34:1 even at full opacity, so no amount of alpha was ever going to carry it. It is #434b5c now, with #6b7689 centre lines so the origin is readable and travel reads as distance from somewhere. Both are a step along the house ramp between --line and --ink-faint, measuring 1.94/1.68:1 for the floor and 3.38/2.67:1 for the origin — deliberately under the 3:1 graphics floor, because the performance view exists to send the eye to the body and a floor that passed a text-contrast bar would compete with it. That second change measured better and was judged no better by eye. It is kept because the tuning stopped, not because it was shown to help. What this view needs first is an opinion formed in a room, which is the judgement roadmap.md track 3 says should not be made at a desk. The compare page is unchanged. Its panels pass grid: false and have always been floorless, so there was nothing there to recolour; whether they should share a floor — which would give the travel comparison a common scale instead of a footer number — is left open. roadmap.md records what the wider floor exposes: that nothing else in the performance view travels with the body, the spotlight least of all, since it is a radial gradient pinned to the centre of the viewport. A camera that followed the pelvis would fix that without touching the data, which is a different thing from pelvis-aligning the motion — but with the ghost-cloud on it cannot be done innocently, because the far siblings are where that ~75% of divergence lives. So what a follow camera should follow stays a research decision. Co-Authored-By: Claude Opus 5 Claude-Session: https://claude.ai/code/session_014yJSPiRjB5WvTH2x4LB8V6 --- docs/roadmap.md | 16 ++++++++++++++++ frontend/app/src/renderer.ts | 37 ++++++++++++++++++++++++++++++++---- 2 files changed, 49 insertions(+), 4 deletions(-) diff --git a/docs/roadmap.md b/docs/roadmap.md index 49c19bf..f1e4f87 100644 --- a/docs/roadmap.md +++ b/docs/roadmap.md @@ -49,6 +49,22 @@ quietly half-built. optional view, so the ~0.15 m of genuine articulation difference can be examined on its own when that is the question being asked. An option, never the default. + **A follow camera asks the same question from the other side (2026-10-19.)** The ground grid + was 6 m across — so a body travelling 3.89 m left the floor entirely, with no ground left to + read its travel against. It is 20 m now, sized at roughly twice the furthest measured + sibling. What that change exposes is that nothing else in the performance view travels with + the body: the spotlight is a radial gradient pinned to the centre of the viewport, so a body + at 3.9 m stands outside its own light. + + A camera that followed the pelvis would fix that **without touching the data**, which is a + different thing from pelvis-aligning the motion and does not reopen the decision above. But + with the ghost-cloud on it cannot be done innocently: following the selected line's body + drifts the far siblings out of frame, and the far siblings are where that ~75% lives. + Following the centroid centres nobody. So **what a follow camera should follow is a research + decision rather than a UI default**, and it waits on seeing the extended floor from the back + of a room — the judgement Track 3 of [`v4-proposal.md`](v4-proposal.md) says should not be + made at a desk. + **From v2 — the poem's unfinished edges:** - ~~**Persistence.**~~ **Answered in v3 (2026-08-24.)** The question was never "add saving", diff --git a/frontend/app/src/renderer.ts b/frontend/app/src/renderer.ts index 2c748b2..9773a98 100644 --- a/frontend/app/src/renderer.ts +++ b/frontend/app/src/renderer.ts @@ -14,9 +14,37 @@ const STAGE_BG = 0x0b0c10; const PERF_BG = 0x07080b; // performance: darker, for a projector in a dark room const ACCENT = 0xe9b872; // bone/amber const BONE = 0xd8b985; -const GRID = 0x232732; +// The floor. NOT the --line hairline token it used to borrow (#232732): that is the colour +// of a 1px divider between panels, read at desk distance, and it cannot carry a floor seen +// across a room. Measured against the backgrounds it actually sits on, #232732 reached +// 1.12:1 on the bench and **1.045:1 in performance** — and only 1.34:1 even at full opacity, +// so no amount of alpha was going to rescue it. These two sit between --line and --ink-faint +// on the house ramp, continuing it rather than inventing a colour: 1.94:1 and 1.68:1 for the +// floor, 3.38:1 and 2.67:1 for the origin. Present, and still subordinate to the body. +const GRID_LINE = 0x434b5c; +// The two centre lines, left brighter so the origin is readable. On 20 m of floor that is +// what lets travel read as distance *from* somewhere rather than as a body adrift on a mesh. +const GRID_ORIGIN = 0x6b7689; +// One pair of values, read by both the constructor and setPerformanceMode. +const GRID_OPACITY = 0.85; +const GRID_OPACITY_PERF = 0.7; // a projector in a dark room, not a monitor at arm's length const GHOST = 0x74a7c8; // cool tint — the variance cloud +// How much floor there is, and how fine it is. +// +// Sized from measured travel, not chosen by eye. The grid is centred on the origin, so only +// half of it lies in whichever direction the body goes: 20 m across is ±10 m of floor. +// Against that, one line travels 2.11 m on Kimodo and 3.89 m on SnapMoGen, the furthest +// ghost sibling reaches 4.77 m, and a whole baked poem's net displacement measured 3.63 m +// (docs/journal/2026-09-08-day-4.md). The worst of those is the sibling, so this is about +// twice the worst case. It was 6 m until 2026-10-19, which put a SnapMoGen line and every +// far sibling off the edge — standing on nothing, with no ground left to read travel against. +// +// The 0.5 m cell is the part not to trade away: it is what makes the floor legible as +// *distance* rather than as decoration, so extent grows with the division count. +const GRID_METRES = 20; +const GRID_CELLS = 40; + // Trail shape: how many ghost samples, and how many source-frames apart. const TRAIL_LEN = 8; const TRAIL_STEP = 2; @@ -112,9 +140,10 @@ export class StickFigureRenderer { // ground grid (the "floor" the figure stands on) if (opts.grid !== false) { - const grid = new THREE.GridHelper(6, 12, GRID, GRID); + // GridHelper(size, divisions, centre-line colour, grid colour) + const grid = new THREE.GridHelper(GRID_METRES, GRID_CELLS, GRID_ORIGIN, GRID_LINE); (grid.material as THREE.Material).transparent = true; - (grid.material as THREE.Material).opacity = 0.5; + (grid.material as THREE.Material).opacity = GRID_OPACITY; this.scene.add(grid); this.grid = grid; } @@ -259,7 +288,7 @@ export class StickFigureRenderer { this.scene.background = new THREE.Color(on ? PERF_BG : STAGE_BG); if (this.grid) { const mat = this.grid.material as THREE.Material; - mat.opacity = on ? 0.22 : 0.5; + mat.opacity = on ? GRID_OPACITY_PERF : GRID_OPACITY; } }