Behind the science
A square wave has an odd-harmonic Fourier series: (4A/π)Σ sin((2n−1)ωt)/(2n−1). Each rotating epicycle represents a harmonic; adding more harmonics sharpens the edge. The remaining overshoot near each jump is an example of the Gibbs phenomenon.