Two lines oscillate following a sine function. Yellow line goes up and down (Y position) at speed Y. The red line goes sideways (X position) at speed X. When ratio of speed Y to speed X is 1.5, a pattern much like a Celtic knot results. Works best when ratio of amplitude X to amplitude Y is 1.5. The background knot works with X amplitude of 150. Change ratio of speeds for different patterns. At a ratio 1 you just get a line (change one sine to cosine and you get a circle). Other ratios yield interesting Lissajous figures. Whole number ratios yield knots, meaning the ends are connected. Such knots repeat. Sometimes these are called Lissajous knots. Spacebar to hide variables. Generates Lissajous patterns of coupled harmonic motion.
Pen matches the X position of the red line and the Y of of the yellow line. This generates a type of harmonic motion that creates Lissajous figures. Usually the presentation of Lissajous is complex, with sine or cosine functions, but the underlying principle is simple. Two circling motions can generate these Lissajous patterns.