[view the Python code]

Fun With Sine Waves #1

Fun with matplotlib!

This plots a series of sine waves and their sum (in red). That summation is:

Which amounts to:

Out to 17.

As you can see, the series generates a square wave. More or less. Adding more terms converges on an actually square wave.

Funny how all those sine curves add up to a square wave!