In this video, I explain what the Fourier series does, and why it is one of the most surprising results in mathematics.
All the plotted graphs in this video were done in Mathematica. If you don't have the program then you can use the free internet version called Wolfram Alpha. To find the nth order Fourier series of f(x) in either of these, use: FourierTrigSeries[f(x),x,n] or FourierSeries[f(x),x,n] for the exponential version.
If you want to know how to do something more specific (for example code up the Cantor function) then let me know, I'll send it to you. Thank me later when you're spending all your free time plotting graphs.