Lissajous Curves

The parametric equations of harmonic motion are:

     x = rsin(at)   

     y = rsin(bt)

As the point oscillates in both the x and y direction, it traces out different curves depending on the ratio of a to b. In the top column (and row) of these tables, the second circle spins twice as fast as the first, the third three times as fast, etc. This way, the curves produced by all the different ratios are expressed in the table. Where the ratio of speeds is 1:1, a circle is traced (the diagonal line across the middle).

I made this after watching this excellent tutorial on Youtube: Coding Challenge #116: Lissajous Curve Table, by The Coding Train. My own code is very similar to that on the tutorial. I was so inspired by this that I also decided to take it into 3D! (see: Lissajous Knots).