lett=0;letn=25;letdomain;functionsetup(){domain=[-10*PI,10*PI];createCanvas(500,500);background(255);describe("a dancing mandala that is drawn with a single curve radially symmetric that changes periodically on radial graph paper");rectMode(CENTER);strokeWeight(0.5);strokeCap(SQUARE);t=random(-10,10);r1=random([1,2,3,5]);r2=r1+1;r3=random([-2,-3,-4]);r4=random([-1,-5,-6]);}functiondraw(){background(245,250,255,20);translate(width/2,height/2);stroke(100,110,120,10);drawGrid();t+=0.002;noFill();stroke(80,90,100);strokeWeight(3);r=(width/25)*8;for(letj=0;j<r2;j++){push();rotate(((2*PI)/r2)*j);beginShape();for(leti=domain[0];i<domain[1];i+=0.05){vertex(r*cos(i/r1+t)*sin(i/r2+t),r*cos(i/r3+t)*sin(i/r4+t));}endShape();pop();}if(frameCount%500==0){r1=random([1,2,4,5]);r2=random([3,3,6,7]);r3=random([-2,-3,-4]);r4=random([-1,-5,-6]);}strokeWeight(1);noFill();stroke(100,110,120,30);rect(0,0,width/1.02,width/1.02);rect(0,0,width/1.04,width/1.04);}functiondrawGrid(){for(leti=0;i<n;i++){rotate((2*PI)/n);line(-width/1.5,0,width/1.5,0);circle(0,0,(width/n)*2*i);}noStroke();for(leti=0;i<500;i++){x=random(-width/2,width/2);y=random(-width/2,width/2);fill(245,250,255,150);circle(x,y,2);}}functionmousePressed(){setup();draw();}