Harmonograph

Harmonographs are actually mechanical apparatus used to create geometric imagery using pendulums.
But instead of a actual pendulums, we use equations to simulate the motion of pendulums to create harmonographs.

Code

            
    elem=document.querySelector(".example-container");
    setCanvas(elem);
    a=2;
    points=[];
    t=0;
    function draw(){
        clearCanvas();
        
        x=100*cos(degToRad(t))*cos(a)-100*sin(degToRad(t))*sin(a);
        y=150*cos(degToRad(t))*sin(a)+500*sin(degToRad(t))*cos(a);
        
        points.push([WIDTH/2+x,HEIGHT/2-y]);

        new polygon(points,'#695fe6',0,'#695fe6',0.3,false);
        
            t+=0.005;
            a+=0.01;  
        requestAnimationFrame(draw);
    }
    
    draw();