The first graphic shows a single wave. The y-axis represents magnitude and the x-axis represents 'n'. 'n' in discrete systems represents the sample number of the waveform. The above three graphics are actaully constructed by taking 500 samples of the waveform and plotting them by a "connect the dot" method. If the sample rate is high enough, the resulting waveform will very closely resemble the actual waveform. The waveform in the middle graph is the sum of the waveform in the first graph plus a sine wave that has a frequency that is three times that of the the original sine wave. The waveform in the last graphic contains is the sum of the middle waveform plus a sine wave that has a frequency that is six times that of the original sine wave. This waveform faintly resembles a square wave. The addition of the first ten waveforms is shown in the following animation:
After the addition of ten and twenty sinusoids, the resultant waveform is clearly square in shape:
This is all well and good, but what does this have to do with the cool picture? I'm glad you asked! If all the intermediate graphs between the basic sine wave and the 20th iteration were placed evenly spaced on an axis, the result would be a 3-D shape:
From this graph, the Fourier Series operation can be clearly seen. On the bottom left, the first waveform is the basic sine. As the graph progresses backwards and to the right into the monitor, the waveform becomes more and more square. Each line parallel to the 'n' axis is at distinct intervals. As such, the height differences can be seen by observing the green line. Its neighbors are very close at the sinusoidal end of the graph and then become farther and farther apart as the square end is approached. If a surface is "laid" over the wire frame, the graphic that appeared in the previous page is created:
All the preceding graphs were created in Matlab for Windows 4.2 from
The MathWorks, Inc. The .m file used to
generate the graphics is available for download as fourier.m.
Feel free to use and modify the code as you see fit. E-mail me if you have any
comments or corrections about the preceding
discussion!!
If you have any comments or questions, contact Paul Hartke at