feat: add a Length Contraction screen (ladder and barn) - #3
Merged
Conversation
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
|
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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:
which is what makes a single scene-time number meaningful across the toggle;
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;
createRadioButtonGroup, so the new controls are the shared ones;
the snapshots the view actually draws, and the check that no door shuts
through the ladder;
Co-Authored-By: Claude Opus 5 noreply@anthropic.com
Claude-Session: https://claude.ai/code/session_01D861mRUkK82cR8wuSLwtij