Lorenz Attractor

Lorenz Attractor is a deterministic chaotic system.
For the physical significance, The Lorenz attractor is an attractor that arises in a simplified system of equations describing the two-dimensional flow of fluid of uniform depth , with an imposed temperature difference , under gravity , with buoyancy , thermal diffusivity , and kinematic viscosity .
This particular plot is x and z coordinates of Lorenz Attractor.
The attractor is described by the following system of differential equations: $$\displaystyle\frac{{\left.{d}{x}\right.}}{{\left.{d}{t}\right.}}={a}{\left({y}-{x}\right)}$$ $$\displaystyle\frac{{\left.{d}{y}\right.}}{{\left.{d}{t}\right.}}={x}{\left({b}-{z}\right)}-{y}$$ $$\displaystyle\frac{{\left.{d}{z}\right.}}{{\left.{d}{t}\right.}}={x}{y}-{c}{z}$$

Code

            
    elem=document.querySelector(".example-container");
    setCanvas(elem);
    
    x=0.01;
    y=0.01;
    z=0.01
    a=10;
    b=28;
    c=8/3;
    px=x;
    py=y;
    pz=z;
    points=[];
    function draw() {
        clearCanvas();
        dt=0.01;
        dx= (a*(y-x))*dt;
        dy= (x*(b-z)-y)*dt;
        dz= (x*y - c*z)*dt;
        
        x=x+dx;
        y=y+dy;
        z=z+dz;
        points.push([WIDTH/2+8*x,3*HEIGHT/4-5*z]);
        
        new polygon(points,'#696969',0,'#695fe6',0.7,false);

        px=x;
        py=y;
        pz=z;

        requestAnimationFrame(draw);

        }

        
    draw();