Concept: gravitational PE and kinetic energy trade back and forth while total energy stays constant.
Conservation of mechanical energy. As the bob swings down it loses height, so gravitational potential energy falls and kinetic energy rises by the same amount — the two bars always sum to the same total. Speed is maximal at the bottom (all KE) and zero at the turning points (all PE).
The pendulum is integrated from θ″ = −(g/L)·sinθ (the true equation, not the small-angle approximation). Live θ, v, KE and PE are measured each frame; the KE/PE bars visualise the trade while their sum E stays flat.
Galileo (isochronism, 1602); Newtonian mechanics; standard g = 9.81 m/s².