⚙️ Mechanical Clock: Escapement & Gear Train (2D)
A schematic side-view of a pendulum clock's movement: watch a lock-and-release escapement bleed off the gear train one tooth at a time, converting a swinging pendulum into a steady tick that drives the hands.
This 2D companion drives the exact same escapement mechanics as the 3D movement — a semi-implicit-Euler pendulum, a lock-and-release threshold at dead-centre, and a four-wheel gear train with the same 30/8, 56/8, 48/8 and 40-tooth ratios — but renders it as a flat side-elevation schematic instead of a rendered 3D case. That makes the mechanism easier to read at a glance: the dial's hour and minute hands, the escape wheel's one-tooth-per-swing advance, and the anchor rocking in lockstep with the pendulum are all visible on a single screen with nothing occluding them. Sliders let you change the pendulum's length (and therefore its natural period, since a real pendulum clock is tuned by physically adjusting bob height), the escapement's sustaining impulse, and air damping, while a live readout tracks simulated time-of-day, tick count, pendulum angle and measured oscillation period.
Semi-implicit-Euler pendulum physics (g/L restoring torque, linear air damping, a soft nonlinear limit past ±1.05 rad) coupled to a lock-and-release escapement: crossing a ±0.015 rad threshold near dead-centre fires one escape-wheel tooth and injects a small sustaining velocity kick. Gear angles are pure functions of tick count via the same 1/210 total ratio as the 3D original, so hands and tick count never drift out of sync.
2D · HTML5 Canvas 2D · 60 FPS target · runs fully client-side, no install