Please finish the theory part before starting this exercise
In this simple exercise we are trying to recreate and understand the magic of the harmonograph in Processing.
We then push it a bit further to get comfy with our new tool.
Sin and Cos should become your new best friends. Although they are simple and easy to understand the form the basics of many complex shape generation methods. Mastering them will add effective control mechanisms to your generative repertoire.
It all starts with Jules Antoine Lissajous, who invented the Lissajous apparatus, a device that creates the figures that bear his name. In it, a beam of light is bounced off a mirror attached to a vibrating tuning fork, and then reflected off a second mirror attached to a perpendicularly oriented vibrating tuning fork (usually of a different pitch, creating a specific harmonic interval), onto a wall, resulting in a Lissajous figure. This led to the invention of other apparatus such as the harmonograph. (Wikipedia)

They were also prominently featured in the titles for Vertigo that were created by the Whitney brothers together with Saul Bass (remember?).

Here are few contemporary projects that heavily rely on the use of harmonics and basic sine and cosine implementations: