Pinball Machine

An 80 g steel ball on a table tilted by θ. Momentum and energy are tracked through every wall, bumper and flipper contact.

Speed v-Momentum p- Kinetic KE-Potential PE- Total E-Ledger residual- Bumper energy in-Flipper work in- Lost (contacts)-Hits / drains-
The science

Gravity on an incline. The table is tilted by θ (about 6.5°), so the ball feels geff = g sinθ = 1.11 m/s² along the playfield (1 world unit = 3 cm). The integrator is velocity Verlet at 1/480 s, exact for constant acceleration.

Collisions. With surface normal n and contact-point velocity vc (zero for walls; ω×r for a swinging flipper): v′ = v − (1+e)((v−vc)·n) n. A flipper moving into the ball adds momentum and energy (motor work); walls with e < 1 remove energy; pop bumpers add a fixed outward solenoid kick on top of e.

Energy ledger. E = ½mv² + m geff h. Each collision's measured change in KE goes to the "in" or "lost" account, so E = Elaunch + in − lost; the residual shown is bookkeeping/integrator error (floating-point level).

Independent checks (at load): free flight against the analytic parabola y = y0 + v0t + ½gt²; an e = 1 wall bounce preserves |v|; free-fall energy drift.

Honest simplifications. Frictionless sliding (no spin or rolling), no ramps, no ball-ball collisions, a 0.36 × 0.6 m table, flipper motor as a fixed 25 rad/s sweep, no nudge. Real flipper and bumper contacts are more complex. Same model and constants as the 2D twin.