Back to Atlas

Original lesson documentation

1D Cart Collisions

An independently written analytical lab for a narrow subset of rigid-body mechanics: one isolated, central, one-dimensional collision of two translating carts.

Open the cart lab

Authorship and replacement boundary

The user authorized an original replacement at the existing route URL. No archived prose, compiled collision engine, illustrations, fonts or scene implementation is reused in this lesson. The former route-local compiled assets are removed from active distribution; historical Git retains the base. This is not a replica or a claim of parity with the former multidimensional article.

The four section IDs recorded by the former manifest remain usable: #before-we-start introduces assumptions, #what-are-we-trying-to-do opens the lab, #what-is-a-collision gives the derivation, and #conclusion provides the takeaway. Undocumented compiled scene anchors are not claimed preserved.

Mathematical basis, independently derived

Momentum balance gives mA(vA − uA) = −mB(vB − uB). Define J as the impulse delivered to B, so vA = uA − J/mA and vB = uB + J/mB. Substitution into the restitution constraint vB − vA = e(uA − uB) yields J = (1 + e)(uA − uB)/(1/mA + 1/mB). These are standard conservation and restitution relations, not an algorithm taken from the retired runtime.

Expanding K = ½mA vA² + ½mB vB² gives the translational energy loss ½μ(1 − e²)(uA − uB)², where μ = mA mB/(mA + mB). This is nonnegative for 0 ≤ e ≤ 1. Elastic impacts conserve kinetic energy; perfectly inelastic impacts equalize velocity without necessarily stopping either cart. No external text is reproduced and no unverified bibliography URL is supplied.

A starts left of B. If uA ≤ uB, no future contact occurs from a positive gap, and the module returns unchanged velocities. Masses are restricted to 0.1–10 kg, starting velocities to −10–10 m/s, and restitution to 0–1. The pure module rejects nonnumeric, nonfinite and out-of-range inputs. There is no time integration, friction, angular momentum, oblique impact, contact duration or detailed energy-dissipation mechanism.

Interface contract

Five native range inputs update the signed velocity table, schematic direction descriptions, momentum comparison and kinetic-energy comparison immediately. Reset affects only these inputs. Optional prediction is not scored. The diagram does not encode mass or elapsed time. No animation, autoplay, audio, external media, network service, framework or new dependency is used. Lesson state is transient; the existing shared theme preference remains untouched.

The manifest retains the systems family and Bicycle continuation, but declares a lab with no generated navigation and neutral reference mode. Shared theme initialization, shell and footer remain in use. A route-scoped stylesheet implements the approved editorial light/dark tokens; the numerical engine is not remounted on theme changes.

Reproducible checks

node --test tools/tests/rigid-body-collisions.test.mjs checks known solutions, no-approach states, 2,000 bounded combinations, conservation, restitution, energy loss and invalid inputs. node tools/smoke-bundle.mjs . --route rigid-body-collisions exercises all five inputs, keyboard restitution and reset with exact expected results. Historical geometry of the retired engine is not an acceptance reference for this approved replacement.

node tools/rigid-body-browser.mjs runs the replacement’s direct browser matrix without invoking legacy geometry. Chromium 148.0.7778.96 passed 18 fresh stored-theme contexts and four system/storage-failure contexts. It checks exact input consequences, reset, invalid-input recovery, theme preservation, focus outlines, 44px controls, local resources and overflow. The ordinary smoke CLI still blocks on the retired geometry; its exported route scenario was run separately and passed. This baseline-policy integration remains CI-owned.

The independent replacement requires its own six viewport/theme cells and three fresh contexts per cell. Full-site acceptance, real-device behavior, cross-browser behavior, assistive-technology qualification and learner outcomes are separate obligations, not implied by a focused Chromium check.

Implementation and verification record

Loading...
Loading implementation record...