Lissajous curve/figure Display

I first learned about Lissajous patterns when I was in high school (1965). But recently I was reading an old book that had some Basic programs. In it's day, 1979, it had some interesting programs. But times have changed and most of them were osolete. However, the program that did interest me was a program that displayed Lissajous patterns. The output was a printer. While they had a sample printout, I had a hard time recognizing anything worth while and what a waste of printer paper. So this prompted me to write a small simulation myself.

For those that are not familiar with Lissajous patterns, please read the detailed explanation available on Wikipedia. But briefly, it is a graph of a system of parametric equations x = A·sin(at + δ) and y = B·sin(bt), which describe complex harmonic motion.

Horizontal
A
a
Vertical
B
b
Phase Delay( δ )
0 (0°)
π/6 (30°) π/4 (45°)
π/3 (60°) π/2 (90°)
3π/4 (135°) π (180°)
5π/4 (225°) 3π/2 (270°)
7π/4 (315°) 2π (360°)

To display the patterns, I created a oscilloscope screen that is 500 × 400 pixels (W×H). The major squares on the screen are thus 50 × 50 pixels (W×H). The center of the oscilloscope screen is considered location 0,0.

The input parameters A and B are the peak amplitudes of the waveforms. A controls the Horizontal amplitude and B controls the Vertical amplitude. a and b are used to describe the ratio (a/b) of the two frequencies. And δ is the Phase Delay between the two signals.

This can usually be done on even the simplest oscilloscope as long as you have access to the vertical and horizontal inputs. The built in Horizontal Sweep of the oscilloscope is not required. The frequencies that you use are not important as long as they are related to each other, as in a/b = 30Hz/50Hz. However, for better control it is probably best to use audio frequencies. Much higher frequencies can also be used but will be more difficult to obtain a stable display. In real life, the displayed patter will roll and change due to a and b not being syncronized or phase locked with each other.