A square wave can be approached by adding smooth sine waves at odd frequencies.
These are the Fourier coefficients of the 2π-periodic square wave with levels ±1. At a jump, the series converges to the midpoint 0. Overshoot near jumps persists as more terms are added, though the overshoot region becomes narrower: the Gibbs phenomenon.
The Fourier series equals the midpoint at a discontinuity, not either one-sided value.
Add faster, smaller rotations. Watch their vertical components combine into a waveform.
This finite sum approximates a square wave. At jumps the infinite series approaches the midpoint 0. The small overshoot near jumps does not vanish in height. Horizontal display shows the preceding phase interval, not recorded simulation history.