This is an example of using a PhET simulation on demonstrating and reinforcing the concept of a Fourier coefficients. You can adjust the Amplitude coefficients of the harmonics to create an assorted array of periodic functions using either sine or cosines. The function below is based on since functions to generate periodic waveforms.