Gravity on an incline. A pinball table is tilted by θ (about 6.5°), so the ball feels geff = g sinθ = 1.11 m/s² along the playfield. The integrator is velocity Verlet at 1/480 s, which is exact for constant acceleration.
Collisions. With the surface normal n and the contact-point velocity vc (zero for walls; ω×r for a swinging flipper), the normal part of the relative velocity is reversed and scaled: v′ = v − (1+e)((v−vc)·n) n. A flipper therefore adds momentum and energy whenever it moves into the ball (work done by the motor); walls with e < 1 remove energy. Pop bumpers add a fixed outward kick (a solenoid) on top of e.
Energy ledger. Mechanical energy E = ½mv² + m geff h. Every collision's measured change in KE is added to the "in" or "lost" account, so E must equal Elaunch + in − lost (plus the tiny potential-energy change when a penetrating ball is pushed out of a surface, tracked separately); the residual shown above is the bookkeeping/integrator error (floating-point level, about 1e-15 J).
Independent checks (run at load): ball launched in free flight against the analytic parabola y = y0 + v0t + ½ g t²; an e = 1 wall bounce preserves |v| and mirrors the angle; a ball at rest on a resting flipper does not tunnel.
Honest simplifications. Frictionless sliding (no spin or rolling), no ramps, no ball-ball collisions, a rectangular table 0.36 × 0.6 m (1 unit = 3 cm), flipper motor as a fixed 25 rad/s sweep, no tilt/nudge. Real flippers and bumpers have more complex contact dynamics.