Lissajous figures or Lissajous curves are the curves in the $x$-$y$ plane obtained by taking $x$ and $y$ to vary sinusoidally with respect to a parameter $t$, typically with different frequencies. They are named after the 19th century French mathematician Jules Antoine Lissajous.

To keep things simple let's assume that the sine waves in both directions have amplitude $1$ and the frequencies are both positive integers, hence rationally related. Then the Lissajous figure is a closed curve (i.e., $2\pi$-periodic with respect to $t$) that we can define by parameters $m$, $n$, and $d$.

$$x(t) = \sin(mt), \qquad y(t) = \sin(nt+d\pi).$$

For example, here are the cases $m=5$, $n=6$ with $d=0$ and $d=1/2$:

t = chebfun('t',[0 2*pi]);
m = 5; n = 6;
x = sin(m*t);
y = sin(n*t);
LW = 'Linewidth'; lw = 1.6; FS = 'fontsize';
subplot(1,2,1), plot(x,y,LW,lw)
axis([-1 1 -1 1]), axis square off
title(sprintf('m=%d  n=%d  d=%3.1f',m,n,0),FS,12)
y = sin(n*t+pi/2);
subplot(1,2,2), plot(x,y,LW,lw)
title(sprintf('m=%d  n=%d  d=%3.1f',m,n,0.5),FS,12)
axis([-1 1 -1 1]), axis square off As usual with 2D computations, it's convenient to use complex arithmetic, defining

$$z(t) = x(t) + iy(t).$$

Here's an anonymous function that returns a Chebfun corresponding to parameters $m$, $n$, $d$:

lissajous = @(m,n,d) sin(m*t) + 1i*cos(n*t+pi*d);

Here are six Lissajous curves drawn at random:

clf
rng(2);
colors = [1 0 0; 0 .8 0; 1 .75 0; 0 1 1; 1 0 1; 0 0 .75];
for np = 1:6
subplot(2,3,np)
m = ceil(10*rand);
n = ceil(10*rand);
d = rand;
plot(lissajous(m,n,d),LW,lw,'color',colors(np,:))
axis([-1 1 -1 1]), axis square off
title(sprintf('m=%d  n=%d  d=%5.3f',m,n,d),FS,10)
end Just for fun, let's draw a cube in which each face is a different Lissajous figure:

clf
f = lissajous(23,5,.5);
plot3(real(f),imag(f),1+0*t,'r'), hold on
f = lissajous(7,16,2/3);
plot3(-1+0*t,real(f),imag(f),'b')
f = lissajous(13,17,0);
plot3(real(f),-1+0*t,imag(f),'color',[0 .8 0])
axis equal off
{"ft_lang_label":"__label__en","ft_lang_prob":0.6414542,"math_prob":0.9999715,"size":1958,"snap":"2022-27-2022-33","text_gpt3_token_len":738,"char_repetition_ratio":0.093654044,"word_repetition_ratio":0.044368602,"special_character_ratio":0.39734423,"punctuation_ratio":0.2236842,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.9999696,"pos_list":[0,1,2,3,4,5,6],"im_url_duplicate_count":[null,1,null,1,null,1,null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2022-08-19T17:41:50Z\",\"WARC-Record-ID\":\"<urn:uuid:16e7bde5-fb2d-42ee-834d-84b605864485>\",\"Content-Length\":\"7220\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:1b5d70a6-5baa-4d40-99bd-69c0af43787c>\",\"WARC-Concurrent-To\":\"<urn:uuid:b4097d46-5d07-4d1d-bf46-7878f33b96a9>\",\"WARC-IP-Address\":\"185.199.110.153\",\"WARC-Target-URI\":\"http://www.chebfun.org/examples/geom/Lissajous.html\",\"WARC-Payload-Digest\":\"sha1:DWTA4TLTRI3KWNI5ACV5EFFBOFEPNCXL\",\"WARC-Block-Digest\":\"sha1:KWKWTBIUTIDM2EPNBXFM6JN3CCSOUXRY\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2022/CC-MAIN-2022-33/CC-MAIN-2022-33_segments_1659882573744.90_warc_CC-MAIN-20220819161440-20220819191440-00515.warc.gz\"}"}