If you do any electronics work–especially digital signal processing–you probably know that any signal can be decomposed into a bunch of sine waves. Conversely, you can generate any signal by adding up a bunch of sine waves. For example, consider a square wave. A square wave of frequency F can be made with a sine wave of frequency F along with all of its odd harmonics (that is, 3F, 5F, 7F, etc.). Of course, to get a perfect square wave, you need an infinite number of odd harmonics, but in practice only a few will do the job.
Like a lot of abstract concepts, it is easy to understand the basic premise and you could look up any of the mathematical algorithms that can take a signal and perform a Fourier transform on it. But can you visualize why the transform works the way it does? If you can’t (or even if you can), you should check out [Mehmet’s] MATLAB visualization of harmonic circles. If you don’t have MATLAB yourself, you can always check out the video (see below).
The first part of the video makes the point (visually) that a sine wave is really just a point on a rotating circle moving through time. The second part shows how those circles moving together describe a square wave with ripple. If you haven’t been able to visualize a sum of sine waves, the video will be a real eye-opener.
We’ve talked about a similar (but much older) video a few years back, but the state of animation has apparently advanced a bit since then. You might also enjoy [Bill Herd’s] take on sine and square waves.
Filed under: misc hacks
