Signal Synthesize and Decompose

By Fourier theory, any periodic signal can be decomposed as a series of sine and cosine signal.
    + a1*sin(2*pi*f1*t)+b1*cos(2*pi*f1*t)
    + a2*sin(2*pi*f2*t)+b2*cos(2*pi*f2t)
That is to say, any signal can be composed by a series of sine and cosine signal. For example, a square signal can be written as:
By add these sine signal together, we can get a square signal.

The applet below can generate sine or cosine signal and add them together, so you can use it to compose any complicated signal.

Signal Synthesize and Decompose
1.Input Frequency, Amplitude and phase of a sine signal.
2.Press "Generate" to produce this signal
3.Press "AddOff" or "AddOn" to On/Off the signal synthesize function.
Do 1,2 steps again and again to compose a complicated signal.
4.Press "Reset" to clear the signal in the window