Skip to content

feat: add a Length Contraction screen (ladder and barn) - #3

Merged
veillette merged 1 commit into
mainfrom
claude/simulation-interactivity-e5c0b3
Aug 4, 2026
Merged

feat: add a Length Contraction screen (ladder and barn)#3
veillette merged 1 commit into
mainfrom
claude/simulation-interactivity-e5c0b3

Conversation

@veillette

Copy link
Copy Markdown
Contributor

Length contraction was the one standard topic the sim deliberately left out,
and the repo's own docs flagged a ladder-and-barn treatment as the natural
next screen. This adds it, third of five, after the Spacetime Diagram screen
that introduces the simultaneity it is resolved by.

A ladder of proper length L0 flies at beta through a barn whose two doors are
wired to one switch. The two slams are events at ( -B/2, 0 ) and ( +B/2, 0 )
in the barn frame: spacelike separated for every non-zero barn, so no frame's
answer to "which shut first?" is the wrong one. The barn frame sees the ladder
contracted to L0/gamma and briefly wholly inside; the ladder frame sees the
barn contracted to B/gamma, the exit door shutting and reopening while the
nose is still short of it, and the entrance door shutting behind the tail
gammabetaB later. No door ever touches the ladder in either account.

The screen's central control is the frame selector. Flipping it rearranges the
stage completely while changing exactly one thing on the spacetime diagram
below - the tilt of the simultaneity slice the measurement is taken along -
because the diagram is always drawn in barn-frame coordinates and the two
slam markers do not move. Each object's ends sweep out a world sheet, so
"does it fit?" becomes visibly a question about which slice of the overlap
you take.

Also here:

  • both frames' clocks are zeroed on one shared event (the centres crossing),
    which is what makes a single scene-time number meaningful across the toggle;
  • no scrubber - at high beta the window is set by the slams rather than the
    fly-past, so a fixed-range slider would have had a few percent of useful
    travel. Two "go to slam" buttons replace it, and teach better: in the barn
    frame they land on the same instant;
  • createPushButton takes an optional enabledProperty, and controlHelpers gains
    createRadioButtonGroup, so the new controls are the shared ones;
  • 22 new tests, including each frame's fitting verdict re-derived by sweeping
    the snapshots the view actually draws, and the check that no door shuts
    through the ladder;
  • en/es/fr strings, a11y summary, keyboard help, and screen icon;
  • model.md, implementation-notes.md, CLAUDE.md and README updated.

Co-Authored-By: Claude Opus 5 noreply@anthropic.com
Claude-Session: https://claude.ai/code/session_01D861mRUkK82cR8wuSLwtij

Length contraction was the one standard topic the sim deliberately left out,
and the repo's own docs flagged a ladder-and-barn treatment as the natural
next screen. This adds it, third of five, after the Spacetime Diagram screen
that introduces the simultaneity it is resolved by.

A ladder of proper length L0 flies at beta through a barn whose two doors are
wired to one switch. The two slams are events at ( -B/2, 0 ) and ( +B/2, 0 )
in the barn frame: spacelike separated for every non-zero barn, so no frame's
answer to "which shut first?" is the wrong one. The barn frame sees the ladder
contracted to L0/gamma and briefly wholly inside; the ladder frame sees the
barn contracted to B/gamma, the exit door shutting and reopening while the
nose is still short of it, and the entrance door shutting behind the tail
gamma*beta*B later. No door ever touches the ladder in either account.

The screen's central control is the frame selector. Flipping it rearranges the
stage completely while changing exactly one thing on the spacetime diagram
below - the tilt of the simultaneity slice the measurement is taken along -
because the diagram is always drawn in barn-frame coordinates and the two
slam markers do not move. Each object's ends sweep out a world sheet, so
"does it fit?" becomes visibly a question about which slice of the overlap
you take.

Also here:
- both frames' clocks are zeroed on one shared event (the centres crossing),
  which is what makes a single scene-time number meaningful across the toggle;
- no scrubber - at high beta the window is set by the slams rather than the
  fly-past, so a fixed-range slider would have had a few percent of useful
  travel. Two "go to slam" buttons replace it, and teach better: in the barn
  frame they land on the same instant;
- createPushButton takes an optional enabledProperty, and controlHelpers gains
  createRadioButtonGroup, so the new controls are the shared ones;
- 22 new tests, including each frame's fitting verdict re-derived by sweeping
  the snapshots the view actually draws, and the check that no door shuts
  through the ladder;
- en/es/fr strings, a11y summary, keyboard help, and screen icon;
- model.md, implementation-notes.md, CLAUDE.md and README updated.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01D861mRUkK82cR8wuSLwtij
@cursor

cursor Bot commented Aug 4, 2026

Copy link
Copy Markdown

Bugbot is not enabled for your account, so this pull request was not reviewed.

Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs.

@veillette
veillette merged commit 61e9919 into main Aug 4, 2026
6 of 7 checks passed
@veillette
veillette deleted the claude/simulation-interactivity-e5c0b3 branch August 7, 2026 01:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants