Parametric equations of a lissajous curve is:
var posX = sX + w*Math.cos(i*(Math.PI/180)*xm);
var posY = sY + h*Math.sin(i*(Math.PI/180)*ym);
Where i is a number that increments from 0 to 360.

sX — center of shape, X position 
sY — center of shape, Y position
w — width of the shape
h — height of the shape
xm — offset affecting x position, numerator of a frequency ratio of a sinusoidal movement
ym — offset affecting y position, denominator of a frequency ratio of a sinusoidal movement
cons — constant
c2 — stroke color
Back to Top