How to use this
Set Length L and the start angle. Damping is off or light. Play runs the swing. Step 1/4 s advances one frame. Restart puts the bob back.
Period is the time for one full swing. Changing the mass is not a control: the period does not use it.
The formula T = 2π√(L/g) assumes sin θ ≈ θ, which holds only for small swings. Drag the bob or set the angle, then compare the period the simulation measures with the formula. The graph shows the angle over time; turn on the small-angle model to see where the cosine curve drifts away.
simulated angle θ(t)
small-angle model θ₀ cos(√(g/L) t)
Period
| measured by the simulation | |
| formula 2π√(L/g) | |
| the real swing is longer by | |
| time t |
g = 9.81 m/s². The simulation solves θ″ = −(g/L) sin θ − c θ′ with fourth-order Runge–Kutta steps of 1/600 s; it never uses the small-angle shortcut.