constbgCol="#447abd";constgCol="#a2c2e8";constnGrid=20;letw;letgSpace;functionsetup(){w=max(400,min(windowWidth,windowHeight)*0.9);describe("a white circle on a blueprint has 8 holes that bounce around at different intervals based on where they are in the rotation (almost a spiral efeect).Pressing s will save a gif - this was added for weird web october's gif prompt.");createCanvas(w,w);rectMode(CENTER);angleMode(DEGREES);textSize(16);gSpace=(w/nGrid)*0.95;}functiondraw(){background(bgCol);translate(w/2,w/2);t=frameCount/3;stroke(255);strokeWeight(2);fill(255);circle(0,0,gSpace*16);fill(bgCol);n=8;for(leti=0;i<n;i++){push();rotate((i*360)/n+t);translate(gSpace*3+4*gSpace*abs(sin(t*i)),0);circle(0,0,40+20*abs(sin(t)));pop();}drawGrid();noStroke();fill(gCol);text("homologous",-w/2+10,w/2-5);}functiondrawGrid(){stroke(gCol);strokeWeight(0.3);for(leti=1;i<=nGrid;i++){for(letj=1;j<=nGrid;j++){line(-w/2+gSpace*i,-w/2+gSpace,-w/2+gSpace*i,w/2-gSpace);line(-w/2+gSpace,-w/2+gSpace*i,w/2-gSpace,-w/2+gSpace*i);}}noFill();strokeWeight(3);rect(0,0,w-2*gSpace);}functionmousePressed(){setup();draw();}functionwindowResized(){setup();draw();}functionkeyPressed(){if(key==="s"){saveGif("gif",5);}}