0xf523…dbe9

All memos sent from and to 0xf523…dbe9.

let rngt,rngs,S=Uint32Array.from([0,1,rngs=rngt=2,3].map(i=>parseInt(tokenData.hash.substr(i*8+5,8),16)));R=(a=1)=>a*(rngt=S[3],S[3]=S[2],S[2]=S[1],S[1]=rngs=S[0],rngt^=rngt<<11,S[0]^=(rngt^rngt>>>8)^(rngs>>>19),S[0]/2**32);let mtN=parseInt(tokenData.tokenId)%1000000;RT=(a=1)=>R(a)-R(a);RV=(v)=>v[R(v.length)|0];C=(a)=>R()<a;M=(p,a,b)=>a+(b-a)*p;psn=(x)=>{let os=pPR,out=1;if(x<0||x>1)out=0;if(x<os)out=Math.sin(Math.PI/2*x/os)**2;if(x>(1-os))out=1-Math.sin(Math.PI/2*(x-(1-os))/os)**2;return out};rfa=(a,i)=>array.splice(a.indexOf(i),1);acv=(n,c)=>{for(let i=0;i<n;i++){cv.push(c)}};let cSH=[[6,50,52],[25,55,53],[45,48,54],[106,31,41],[220,37,47],[244,27,49]],cBG=[[44,14,81],[0,0,10]],cv=[],ocv=[10,[0,2,4],10,[0,2,3,4],7,[0,1,2,3,4,5],3,[0,1,2],1,[0,1,3],3,[0,1,4],3,[0,1,5],3,[0,3,4],3,[0,1],3,[0,2],1,[0,3],5,[0,4],2,[0,5],2,[1,2],2,[1,3],3,[1,4],1,[1,5],5,[2,3],7,[2,4],2,[2,5],5,[3,4],1,[3,5],1,[4,5]],cH=[0,1,2,3,4,5],cN=3+R(2)|0,ci=[];for(let i=0;i<cN;i++){let cn=RV(cH);ci.push(cn);cH.splice(cH.indexOf(cn),1);}ocv.push(25);ocv.push(ci);for(let i=0;i<ocv.length;i+=2)acv(ocv[i],ocv[i+1]);let gr,wc,hc,w,h,p,s3=3**.5,lv=mtN<15?0:mtN<45?1:mtN<225?2:3,pRC=C(.5),pSO=C(.5),pCT=.9+RT(.1)-.6*R()*R(),pCH=.66+RT(.5),pSM=1-R()*R()*R(),pSS=1-R()*R()*R(),pGM=R(),pOC=(lv==1)?1:(.3+RT(.3)),pBB=C(.05)?0:C(.05)?1:(R()*R(.5)),pCM=C(.5),psS=.25+R(1.5)*R(),psV=R(2)*R(),psT=R(.08),pL1=R(2)*R(),pL2=R(.05)*R(),pL3=RT(.3),pFC=(lv==1)?0:R(),pPR=.1+R()*R(.4),pSG=C(.5)?1:(1-R()*R()),pSG2=R()*R()*R(),pPS=R(),pKP=.03+Math.abs(RT()),pOL=3*R()*R(),pDS=C(.5),pCD=C(.03)?(1+R(3)|0):0,p1O=RT(.3),p1V=R(.3),pBL=R()*R(),p3S=C(.5),pCG=C(.2),pBK=C(.5)?(.0005+R()*R(.002)):0,pCGxy=RV(4)|0,pFM=C(.8)?0:C(.5)?1:2,pFMv=R(),bgCi=(lv==0)?((R(6)|0)+2):C(.5)?1:0,hn=pRC?.75:4/3,pxn=(.05)*(pRC?.75:1),Nm=(1+R(20)*R())|0,Nx=Nm*(pRC?48:36),twn=(1-2*pxn)/Nx,thn=2/s3*twn,Ny=Math.round((hn-2*pxn)/thn*2)+1,pyn=((pRC?3/4:4/3)-(Ny-1)/2*thn)/2,filled=[],item=[],itemo=[],colS=[];if(bgCi>=2){colB=cSH[bgCi-2];colF=RV(cBG);colS=cBG;if(bgCi==4)colF=cBG[1];}else{colB=cBG[bgCi];colF=cBG[(bgCi+1)%2];let cvp=RV(cv);if(lv==3)colS=[RV(cSH)];else for(let i=0;i<cvp.length;i++)colS[i]=cSH[cvp[i]];}for(let i=0;i<Nx*Ny;i++)filled[i]=0;let sMX=(Nx*(pRC?.65:1)*(pKP<=.1?.9:(.5+R(.5)*R())))|0,sMN=1+((sMX-1)*(R()*R(.2)))|0,Nk=2000+R(10000),sv=[sMX];for(let i=0;i<sMX-sMN;i++)sv.push(sMX-i-1);chsc=(x)=>{let cg=colS.length>=3;return C(pOC)?(C(pBB)?colB:colF):(C(pCG)&&cg)?colS[colS.length*x|0]:RV(colS)};let kflag=0;for(let k=0;k<Nk;k++){if(kflag==0)k=0;let sh=C(pCT)?0:(C(pCH)?1:2),ss=pDS?sh:(sh==0?(C(pCT)?0:1):(C(pCH)?1:2)),s=sv[((k/Nk)**pKP*sv.length)|0],strim=sh==0?0:(s/3)|0,i=R(Nx)|0,j=((C(.05)&&pCD==0)?(R(Ny)):(s+R(Ny-2*s)))|0,dir=((j+i+pSO)%2)*2-1,ind=[];if((i+(s-1)>=Nx&&dir==1)||(i-(s-1)<0&&dir==-1)||(j-(s-1)<=0&&(j>0&&j<Ny-1))||(j+(s-1)>=Ny-1&&(j>0&&j<Ny-1)))continue;for(let si=strim;si<s;si++){let sm=(si>s-strim-1)?(2*(si-(s-strim-1))-1):0;for(let sj=-si+sm;sj<=si-sm;sj++){let iN=(i+si*dir),jN=(j+sj);if(jN<0||jN>=Ny||iN<0||iN>=Nx)continue;ind.push(jN*Nx+iN);}}let flag=0;if(C(1-pBK)){for(let j=0;j<ind.length;j++)if(filled[ind[j]]>0)flag=1};if(flag)continue;for(let j=0;j<ind.length;j++)filled[ind[j]]=1;let xt=pxn+i*twn+(dir==-1?twn:0)+dir*s*thn*s3/3,yt=pyn+j*thn/2,tb=(j==0)?1:(j==Ny-1)?2:0,tL=!(tb==1&&dir==-1)&&!(tb==2&&dir==1),tR=!(tb==1&&dir==1)&&!(tb==2&&dir==-1),xm=(xt-pxn/2)/(1-pxn),ym=(yt-pxn/2)/((pRC?(3/4):(4/3))-pxn),xyv=[xm,1-xm,ym,1-ym],xg=xyv[pCGxy],cML=chsc(xg),cSL=chsc(xg),cMR=chsc(xg),cSR=chsc(xg);if(pCM){cSR=[...cML];cSL=[...cMR];}dM=[C(Math.min(psn(xm),psn(ym)))&&C(pSM),C(Math.min(psn(xm),psn(ym)))&&C(pSM)];cM=[cMR,cML];dS=[C(Math.min(psn(xm),psn(ym)))&&C(pSS),C(Math.min(psn(xm),psn(ym)))&&C(pSS)];cS=[cSR,cSL];let ang=(tL==0||tR==0)?0:pCD>0?(pCD*2*Math.PI/3):2*Math.PI/3*(R(3)|0);kflag=1;item.push([xt,yt,dir,s,sh,ss,[tR,tL],dM,cM,dS,cS,ang]);} setup=()=>{let wh=windowHeight,ww=windowWidth;wh>=ww/.75?(wc=ww):(wc=wh*.75);hc=wc/.75;p=wc/1000;pRC?(w=hc,h=wc):(w=wc,h=hc);createCanvas(wc,hc);gr=createGraphics(w,h);colorMode(HSL);gr.colorMode(HSL);strokeCap(SQUARE);gr.strokeCap(SQUARE);let pd=pixelDensity();if(hc<2048)pd=ceil(2048/hc);pixelDensity(pd);gr.pixelDensity(pd);} draw=()=>{let fc=frameCount,i=(fc-1)%item.length,l=(fc-1)/item.length|0;frameRate(round(fc/2)+1);let px=pxn*w,py=pyn*w,gw=twn*w,gh=thn*w;if(pRC){translate(wc,0);rotate(PI/2);}if (frameCount==1){background(colB);dtg(px,py,gw,gh,colF);}let v=item[i],xt=v[0]*w,yt=v[1]*w,dir=v[2],s=v[3],sh=v[4],ss=v[5],tM=v[6],dM=v[7],cM=v[8],dS=v[9],cS=v[10],aS=v[11]+((dir==-1)?PI:0);if(!(tM[0]==0&&tM[1]==0)){let th=s*gh,xsb=s3/3*th,xst=s3/6*th,yst=th/2,sc0=1,sc1=.45+p1O+RT(p1V),sc2=C(pSG)?sc1:.4+p1O+RT(p1V),sc3=0,scls=[],mFM=(pFM==0)?0:(pFM==1)?1:(C(pFMv)?0:1);if(mFM==0)scls=[[sc0,C(pSG2)?(th-10*p)/th:sc1],[sc2,sc3]];else scls=[[sc0,C(pSG2)?(th-10*p)/th:0]];if(l==0){push();translate(xt,yt);rotate(aS);noFill();for(let sci=0;sci<2;sci++){push();stroke(C(pFC)?RV(colS):colF);strokeWeight(R(pOL*p));let scl=(sci==0)?(1-R(.2)):((sc1+sc2)/2+RT(.2));if(tM[0]&&tM[1]){if(sh==0)triangle(-xsb*scl,0,xst*scl,yst*scl,xst*scl,-yst*scl,1);else if(sh==2)hexagon(scl*1/3*th);else circle(0,0,scl*xsb);}else if(tM[1]&&sh==0)triangle(-xsb*scl,0,xst*scl,0,xst*scl,yst*scl,1);else if(tM[1]&&sh==1)arc(0,0,scl*xsb,scl*xsb,0,PI,CHORD);else if(tM[0]&&sh==0)triangle(-xsb*scl,0,xst*scl,0,xst*scl,-yst*scl,1);else if(tM[0]&&sh==1)arc(0,0,scl*xsb,scl*xsb,PI,2*PI,CHORD);pop();}pop();gr.push();gr.translate(xt,yt);gr.rotate(aS);for(let shi=0;shi<scls.length;shi++){s1=scls[shi][0];s2=scls[shi][1];let shp=shi?ss:sh;for(si=0;si<2;si++){let tdir=si?1:-1,a1=tdir==1?0:PI,a2=tdir==1?PI:2*PI,col=(shi%2==0)?cM[si]:cS[si],gm1=R(pGM);if(tM[si]==0||(dM[si]==0&&shi==0)||(dS[si]==0&&shi==1))continue;gr.push();gr.translate(0,-tdir*.5);createGradient([0,-yst*(1+gm1),0,yst*(1+gm1)],RT(PI),col);gr.strokeWeight(0);if(shp==0)trish([-xsb,xst,xst],[0,tdir*yst,0],s1,s2);else if(shp==1)arcsh((sh==2&&shi==1)?(2/3*th):abs(xsb),a1,a2,s1,s2);else hexsh((1/3*th),a1,s1,s2);gr.pop();ps=C(pPS)&&shi>0;for(let ip=0;ip<1+ps;ip++){gr.push();gr.rotate((R(3)|0)*2*PI/3);gr.stroke(0);gr.erase();let dl=gw*(1+(Nx/50)|0);for(let xl=-xsb;xl<xst-.00001;){gr.stroke(0,ip==0?R(psT):1);gr.strokeWeight(p*(psS+R(psV)));gr.line(xl,-w,xl,w);xl+=ip==0?R(dl/10):dl;}gr.noErase();gr.pop();}image(gr,0,0);gr.clear();}}gr.pop();}if(l==1){push();translate(xt,yt);rotate(aS);for(let si=0;si<2;si++){if(tM[si]==0)continue;let tdir=si?1:-1,a1=tdir==1?0:PI,a2=tdir==1?PI:2*PI,at=abs(xsb);for(let j=0;j<5+R(10);j++){if(sh==0){outline([-xsb,xst,xst],[0,tdir*yst,0],th);}else if(sh==1){outlinec(xsb,a1,a2);}else{push();if(si==0)rotate(PI);let r=1/3*th,xp=[-r*s3/2],yp=[0];for(let a=0;a<3;a++){xp[a+1]=-r*cos(a*PI/3+PI/6);yp[a+1]=r*sin(a*PI/3+PI/6);}xp.push(r*s3/2);yp.push(0);outline(xp,yp,th);pop();}}}pop();}}if(fc==item.length*2){dtg(px,py,gw,gh,colB);noStroke();for(let i=0;i<10000;i++){push();translate(R(w),R(w*4/3));let col=RV(cBG);fill(...col,R(.02));circle(0,0,R(50*p));pop();push();translate(R(w),R(w*4/3));fill(...col,R(.02));let dp=R(50*p);if (C(.5))rotate(PI+pRC?PI/2:0);triangle(-dp/2,0,dp/2,dp/2,dp/2,-dp/2);pop();}loadPixels();for(let p=0;p<pixels.length;p+=4){dp=RT(12);pixels[p]=pixels[p]+dp;pixels[p+1]=pixels[p+1]+dp;pixels[p+2]=pixels[p+2]+dp;}updatePixels();noLoop();}} trish=(x,y,s1,s2)=>{gr.beginShape();for(let i=0;i<x.length;i++)gr.vertex(s1*x[i],s1*y[i]);if(s2>0)for(let i=x.length-1;i>=0;i--)gr.vertex(x[i]*s2,y[i]*s2);gr.endShape();};hexsh=(r,ao,s1,s2)=>{gr.push();gr.rotate(ao);gr.beginShape();gr.vertex(-s1*r*s3/2,0);for(let a=0;a<3;a++)gr.vertex(-s1*r*cos(a*PI/3+PI/6),s1*r*sin(a*PI/3+PI/6));gr.vertex(s1*r*s3/2,0);if(s2>0){gr.vertex(s2*r*s3/2,0);for(let a=2;a>=0;a--)gr.vertex(-s2*r*cos(a*PI/3+PI/6),s2*r*sin(a*PI/3+PI/6));gr.vertex(-s2*r*s3/2,0);}gr.endShape(CLOSE);gr.pop();};arcsh=(r,a1,a2,s1,s2)=>{gr.push();if(s2>0){gr.noFill();gr.strokeWeight(s1*r/2-s2*r/2);r=(r*s1+s2*r)/2;} else r=s1*r;gr.arc(0,0,r,r,a1,a2);gr.pop();};hexagon=(r)=>{beginShape();for(let a=0;a<6;a++)vertex(r*sin(a*PI/3),r*cos(a*PI/3));endShape(CLOSE);};dtg=(px,py,gw,gh,col)=>{noFill();for(let j=-5;j<Ny/Nm+5;j+=1){for(let i=-5;i<Nx/Nm+5;i+=1){let dir=((j+i+pSO)%2),xt=px+i*gw*Nm+gh*s3/(dir?3:6)*Nm,yt=py+j*gh/2*Nm,tb=(j==0)?1:(j==Ny-1)?2:0;push();translate(xt,yt);rotate(PI*(!dir));if(tb==0)rotate(2*PI/3*(R(3)|0));stroke(...col,R(.25));strokeWeight(.5*p);let th=gh*Nm;triangle(-s3/3*th,0,s3/6*th,-th/2,s3/6*th,th/2);pop();}}};createGradient=(p,ang,col)=>{let x1=cos(ang)*p[0]-sin(ang)*p[1],y1=sin(ang)*p[0]+cos(ang)*p[1],x2=cos(ang)*p[2]-sin(ang)*p[3],y2=sin(ang)*p[2]+cos(ang)*p[3],gd=gr.drawingContext.createLinearGradient(x1,y1,x2,y2);gd.addColorStop(0.0,color(0,0,0,1));gd.addColorStop(0.5,color(...col,1));gd.addColorStop(1.0,color(0,0,100,1));gr.drawingContext.fillStyle=gd;gr.drawingContext.strokeStyle=gd;};outline=(xp,yp,dd)=>{for(let i=0;i<xp.length;i++){xp[i]=xp[i]+RT(dd*pL2);yp[i]=yp[i]+RT(dd*pL2);}xp.push(xp[0]);yp.push(yp[0]);push();scale(1+RT(pL3));strokeWeight(R(.75*p));stroke(...RV([colF,colF]),R(.4));for(let i=0;i<xp.length;i++){let p1=-R(pL1)*R(),p2=1+R(pL1)*R();line(M(p1,xp[i],xp[i+1]),(M(p1,yp[i],yp[i+1])),M(p2,xp[i],xp[i+1]),(M(p2,yp[i],yp[i+1])));}pop();};outlinec=(r,a1,a2)=>{push();translate(RT(r*pL2),RT(r*pL2));scale(1-R(pL3));strokeWeight(R(.75*p));stroke(...RV([colF,colF]),R(.4));arc(0,0,r,r,a1+RT(.1),a2+RT(.1));pop();}
Embracing pure geometric abstraction, Giving Shape employs tangible formal elements to ‘give shape’ to intangible concepts. With a double entendre at play, Giving Shape refers to both the generative algorithm’s construction of striking abstract compositions and ‘giving’ back through a revenue share to support other artists.
let rngt,rngs,S=Uint32Array.from([0,1,rngs=rngt=2,3].map(i=>parseInt(tokenData.hash.substr(i*8+5,8),16)));R=(a=1)=>a*(rngt=S[3],S[3]=S[2],S[2]=S[1],S[1]=rngs=S[0],rngt^=rngt<<11,S[0]^=(rngt^rngt>>>8)^(rngs>>>19),S[0]/2**32); let mtN=parseInt(tokenData.tokenId)%1000000;RT=(a=1)=>R(a)-R(a);RV=(v)=>v[R(v.length)|0];C=(a)=>R()<a;M=(p,a,b)=>a+(b-a)*p;psn=(x)=>{let os=pPR,out=1;if(x<0||x>1)out=0;if(x<os)out=Math.sin(Math.PI/2*x/os)**2;if(x>(1-os))out=1-Math.sin(Math.PI/2*(x-(1-os))/os)**2;return out};rfa=(a,i)=>array.splice(a.indexOf(i),1);acv=(n,c)=>{for(let i=0;i<n;i++){cv.push(c)}}; let rngt,rngs,S=Uint32Array.from([0,1,rngs=rngt=2,3].map(i=>parseInt(tokenData.hash.substr(i*8+5,8),16)));R=(a=1)=>a*(rngt=S[3],S[3]=S[2],S[2]=S[1],S[1]=rngs=S[0],rngt^=rngt<<11,S[0]^=(rngt^rngt>>>8)^(rngs>>>19),S[0]/2**32); let mtN=parseInt(tokenData.tokenId)%1000000;RT=(a=1)=>R(a)-R(a);RV=(v)=>v[R(v.length)|0];C=(a)=>R()<a;M=(p,a,b)=>a+(b-a)*p;psn=(x)=>{let os=pPR,out=1;if(x<0||x>1)out=0;if(x<os)out=Math.sin(Math.PI/2*x/os)**2;if(x>(1-os))out=1-Math.sin(Math.PI/2*(x-(1-os))/os)**2;return out};rfa=(a,i)=>array.splice(a.indexOf(i),1);acv=(n,c)=>{for(let i=0;i<n;i++){cv.push(c)}}; let cSH=[[6,50,52],[25,55,53],[45,48,54],[106,31,41],[220,37,47],[244,27,49]],cBG=[[44,14,81],[0,0,10]],cv=[],ocv=[10,[0,2,4],10,[0,2,3,4],7,[0,1,2,3,4,5],3,[0,1,2],1,[0,1,3],3,[0,1,4],3,[0,1,5],3,[0,3,4],3,[0,1],3,[0,2],1,[0,3],5,[0,4],2,[0,5],2,[1,2],2,[1,3],3,[1,4],1,[1,5],5,[2,3],7,[2,4],2,[2,5],5,[3,4],1,[3,5],1,[4,5]],cH=[0,1,2,3,4,5],cN=3+R(2)|0,ci=[];for(let i=0;i<cN;i++){let cn=RV(cH);ci.push(cn);cH.splice(cH.indexOf(cn),1);}ocv.push(25);ocv.push(ci);for(let i=0;i<ocv.length;i+=2)acv(ocv[i],ocv[i+1]);let wc,hc,w,h,p,s3=3**.5,lv=mtN<15?0:mtN<45?1:mtN<225?2:3,pRC=C(.5),pSO=C(.5),pCT=.9+RT(.1)-.6*R()*R(),pCH=.66+RT(.5),pSM=1-R()*R()*R(),pSS=1-R()*R()*R(),pGM=R(),pOC=(lv==1)?1:(.3+RT(.3)),pBB=C(.05)?0:C(.05)?1:(R()*R(.5)),pCM=C(.5),psS=.25+R(1.5)*R(),psV=R(2)*R(),psT=R(.08),pL1=R(2)*R(),pL2=R(.05)*R(),pL3=RT(.3),pFC=(lv==1)?0:R(),pPR=.1+R()*R(.4),pSG=C(.5)?1:(1-R()*R()),pSG2=R()*R()*R(),pPS=R(),pKP=.03+Math.abs(RT()),pOL=3*R()*R(),pDS=C(.5),pCD=C(.03)?(1+R(3)|0):0,p1O=RT(.3),p1V=R(.3),pBL=R()*R(),p3S=C(.5),pCG=C(.2),pBK=C(.5)?(.0005+R()*R(.002)):0,pCGxy=RV(4)|0,pFM=C(.8)?0:C(.5)?1:2,pFMv=R(),bgCi=(lv==0)?((R(6)|0)+2):C(.5)?1:0,hn=pRC?.75:4/3,pxn=(.05)*(pRC?.75:1),Nm=(1+R(20)*R())|0,Nx=Nm*(pRC?48:36),twn=(1-2*pxn)/Nx,thn=2/s3*twn,Ny=Math.round((hn-2*pxn)/thn*2)+1,pyn=((pRC?3/4:4/3)-(Ny-1)/2*thn)/2,filled=[],item=[],itemo=[],colS=[]; if (bgCi>=2){colB=cSH[bgCi-2];colF=RV(cBG);colS=cBG;if(bgCi==4)colF=cBG[1];} else {colB=cBG[bgCi];colF=cBG[(bgCi+1)%2];let cvp=RV(cv);if(lv==3)colS=[RV(cSH)];else for(let i=0;i<cvp.length;i++)colS[i]=cSH[cvp[i]];}for(let i=0;i<Nx*Ny;i++)filled[i]=0;let sMX=(Nx*(pRC?.65:1)*(pKP<=.1?.9:(.5+R(.5)*R())))|0,sMN=1+((sMX-1)*(R()*R(.2)))|0,Nk=2000+R(10000),sv=[sMX];for(let i=0;i<sMX-sMN;i++)sv.push(sMX-i-1);chsc=(x)=>{let cg=colS.length>=3;return C(pOC)?(C(pBB)?colB:colF):(C(pCG)&&cg)?colS[colS.length*x|0]:RV(colS)};let kflag=0;for (let k=0;k<Nk;k++){if(kflag==0)k=0;let sh=C(pCT)?0:(C(pCH)?1:2),ss=pDS?sh:(sh==0?(C(pCT)?0:1):(C(pCH)?1:2)),s=sv[((k/Nk)**pKP*sv.length)|0],strim=sh==0?0:(s/3)|0,i=R(Nx)|0,j=((C(.05)&&pCD==0)?(R(Ny)):(s+R(Ny-2*s)))|0,dir=((j+i+pSO)%2)*2-1,ind=[];if((i+(s-1)>=Nx&&dir==1)||(i-(s-1)<0&&dir==-1)||(j-(s-1)<=0&&(j>0&&j<Ny-1))||(j+(s-1)>=Ny-1&&(j>0&&j<Ny-1)))continue;for(let si=strim;si<s;si++){let sm=(si>s-strim-1)?(2*(si-(s-strim-1))-1):0;for(let sj=-si+sm;sj<=si-sm;sj++){let iN=(i+si*dir),jN=(j+sj);if(jN<0||jN>=Ny||iN<0||iN>=Nx)continue;ind.push(jN*Nx+iN);} }let flag=0;if(C(1-pBK)){for(let j=0;j<ind.length;j++)if(filled[ind[j]]>0)flag=1};if(flag)continue;for(let j=0;j<ind.length;j++)filled[ind[j]]=1;let xt=pxn+i*twn+(dir==-1?twn:0)+dir*s*thn*s3/3,yt=pyn+j*thn/2,tb=(j==0)?1:(j==Ny-1)?2:0,tL=!(tb==1&&dir==-1)&&!(tb==2&&dir==1),tR=!(tb==1&&dir==1)&&!(tb==2&&dir==-1),xm=(xt-pxn/2)/(1-pxn),ym=(yt-pxn/2)/((pRC?(3/4):(4/3))-pxn),xyv=[xm,1-xm,ym,1-ym],xg=xyv[pCGxy],cML=chsc(xg),cSL=chsc(xg),cMR=chsc(xg),cSR=chsc(xg);if(pCM){cSR=[...cML];cSL=[...cMR];}dM=[C(Math.min(psn(xm),psn(ym)))&&C(pSM),C(Math.min(psn(xm),psn(ym)))&&C(pSM)];cM=[cMR,cML];dS=[C(Math.min(psn(xm),psn(ym)))&&C(pSS),C(Math.min(psn(xm),psn(ym)))&&C(pSS)];cS=[cSR,cSL];let ang=(tL==0||tR==0)?0:pCD>0?(pCD*2*Math.PI/3):2*Math.PI/3*(R(3)|0);kflag=1;item.push([xt,yt,dir,s,sh,ss,[tR,tL],dM,cM,dS,cS,ang]);}let gr; setup=()=>{let wh=windowHeight,ww=windowWidth;wh>=ww/.75?(wc=ww):(wc=wh*.75);hc=wc/.75;p=wc/1000;pRC?(w=hc,h=wc):(w=wc,h=hc);createCanvas(wc,hc);gr=createGraphics(w,h);colorMode(HSL);gr.colorMode(HSL);strokeCap(SQUARE);gr.strokeCap(SQUARE);let pd=pixelDensity();if(hc<2048)pd=ceil(2048/hc);pixelDensity(pd);gr.pixelDensity(pd);} draw=()=>{let fc=frameCount,i=(fc-1)%item.length,l=(fc-1)/item.length|0;frameRate(round(fc/2)+1);let px=pxn*w,py=pyn*w,gw=twn*w,gh=thn*w;if(pRC){translate(wc,0);rotate(PI/2);}if (frameCount==1){background(colB);dtg(px,py,gw,gh,colF);}let v=item[i],xt=v[0]*w,yt=v[1]*w,dir=v[2],s=v[3],sh=v[4],ss=v[5],tM=v[6],dM=v[7],cM=v[8],dS=v[9],cS=v[10],aS=v[11]+((dir==-1)?PI:0);if(!(tM[0]==0&&tM[1]==0)){let th=s*gh,xsb=s3/3*th,xst=s3/6*th,yst=th/2,sc0=1,sc1=.45+p1O+RT(p1V),sc2=C(pSG)?sc1:.4+p1O+RT(p1V),sc3=0,scls=[],mFM=(pFM==0)?0:(pFM==1)?1:(C(pFMv)?0:1);if(mFM==0)scls=[[sc0,C(pSG2)?(th-10*p)/th:sc1],[sc2,sc3]];else scls=[[sc0,C(pSG2)?(th-10*p)/th:0]];if(l==0){push();translate(xt,yt);rotate(aS);noFill();for(let sci=0;sci<2;sci++){push();stroke(C(pFC)?RV(colS):colF);strokeWeight(R(pOL*p));let scl=(sci==0)?(1-R(.2)):((sc1+sc2)/2+RT(.2));if(tM[0]&&tM[1]){if(sh==0)triangle(-xsb*scl,0,xst*scl,yst*scl,xst*scl,-yst*scl,1);else if(sh==2)hexagon(scl*1/3*th);else circle(0,0,scl*xsb);}else if(tM[1]&&sh==0)triangle(-xsb*scl,0,xst*scl,0,xst*scl,yst*scl,1);else if(tM[1]&&sh==1)arc(0,0,scl*xsb,scl*xsb,0,PI,CHORD);else if(tM[0]&&sh==0)triangle(-xsb*scl,0,xst*scl,0,xst*scl,-yst*scl,1);else if(tM[0]&&sh==1)arc(0,0,scl*xsb,scl*xsb,PI,2*PI,CHORD);pop();}pop();gr.push();gr.translate(xt,yt);gr.rotate(aS);for(let shi=0;shi<scls.length;shi++){s1=scls[shi][0];s2=scls[shi][1];let shp=shi?ss:sh;for(si=0;si<2;si++){let tdir=si?1:-1,a1=tdir==1?0:PI,a2=tdir==1?PI:2*PI,col=(shi%2==0)?cM[si]:cS[si],gm1=R(pGM);if(tM[si]==0||(dM[si]==0&&shi==0)||(dS[si]==0&&shi==1))continue;gr.push();gr.translate(0,-tdir*.5);createGradient([0,-yst*(1+gm1),0,yst*(1+gm1)],RT(PI),col);gr.strokeWeight(0);if(shp==0)trish([-xsb,xst,xst],[0,tdir*yst,0],s1,s2);else if(shp==1)arcsh((sh==2&&shi==1)?(2/3*th):abs(xsb),a1,a2,s1,s2);else hexsh((1/3*th),a1,s1,s2);gr.pop();ps=C(pPS)&&shi>0;for(let i=0;i<1+ps;i++){gr.push();gr.rotate((R(3)|0)*2*PI/3);gr.stroke(0);gr.erase();let dl=gw*(1+(Nx/50)|0);for(let x=-xsb;x<xst;){gr.stroke(0,i==0?R(psT):1);gr.strokeWeight(p*(psS+R(psV)));gr.line(x,-w,x,w);x+=i==0?R(dl/10):dl;}gr.noErase();gr.pop();}image(gr,0,0);gr.clear();}}gr.pop();} if(l==1){push();translate(xt,yt);rotate(aS);for (let si=0;si<2;si++){if(tM[si]==0)continue;let tdir=si?1:-1,a1=tdir==1?0:PI,a2=tdir==1?PI:2*PI,at=abs(xsb);for(let j=0;j<5+R(10);j++){if(sh==0){outline([-xsb,xst,xst],[0,tdir*yst,0],th);}else if(sh==1){outlinec(xsb,a1,a2);}else{push();if(si==0)rotate(PI);let r=1/3*th,xp=[-r*s3/2],yp=[0];for(let a=0;a<3;a++){xp[a+1]=-r*cos(a*PI/3+PI/6);yp[a+1]=r*sin(a*PI/3+PI/6);}xp.push(r*s3/2);yp.push(0);outline(xp,yp,th);pop();}}}pop();}}if(fc==item.length*2){dtg(px,py,gw,gh,colB);noStroke();for (let i=0;i<10000;i++){push();translate(R(w),R(w*4/3));let col=RV(cBG);fill(...col,R(.02));circle(0,0,R(50*p));pop();push();translate(R(w),R(w*4/3));fill(...col,R(.02));let dp=R(50*p);if (C(.5))rotate(PI+pRC?PI/2:0);triangle(-dp/2,0,dp/2,dp/2,dp/2,-dp/2);pop();}loadPixels();for (let p=0; p<pixels.length; p+=4){dp=RT(12);pixels[p]=pixels[p]+dp;pixels[p+1]=pixels[p+1]+dp;pixels[p+2]=pixels[p+2]+dp;}updatePixels();noLoop();}} trish=(x,y,s1,s2)=>{gr.beginShape();for (let i=0;i<x.length;i++)gr.vertex(s1*x[i],s1*y[i]);if(s2>0)for(let i=x.length-1;i>=0;i--)gr.vertex(x[i]*s2,y[i]*s2);gr.endShape();} hexsh=(r,ao,s1,s2)=>{gr.push();gr.rotate(ao);gr.beginShape();gr.vertex(-s1*r*s3/2,0);for(let a=0;a<3;a++)gr.vertex(-s1*r*cos(a*PI/3+PI/6),s1*r*sin(a*PI/3+PI/6));gr.vertex(s1*r*s3/2,0);if(s2>0){gr.vertex(s2*r*s3/2,0);for(let a=2;a>=0;a--)gr.vertex(-s2*r*cos(a*PI/3+PI/6),s2*r*sin(a*PI/3+PI/6));gr.vertex(-s2*r*s3/2,0);}gr.endShape(CLOSE);gr.pop();} arcsh=(r,a1,a2,s1,s2)=>{gr.push();if(s2>0){gr.noFill();gr.strokeWeight(s1*r/2-s2*r/2);r=(r*s1+s2*r)/2;} else r=s1*r;gr.arc(0,0,r,r,a1,a2);gr.pop();} hexagon=(r)=>{beginShape();for(let a=0;a<6;a++)vertex(r*sin(a*PI/3),r*cos(a*PI/3));endShape(CLOSE);} dtg=(px,py,gw,gh,col)=>{noFill();for(let j=-5;j<Ny/Nm+5;j+=1){for(let i=-5;i<Nx/Nm+5;i+=1){let dir=((j+i+pSO)%2),xt=px+i*gw*Nm+gh*s3/(dir?3:6)*Nm,yt=py+j*gh/2*Nm,tb=(j==0)?1:(j==Ny-1)?2:0;push();translate(xt,yt);rotate(PI*(!dir));if(tb==0)rotate(2*PI/3*(R(3)|0));stroke(...col,R(.25));strokeWeight(.5*p);let th=gh*Nm;triangle(-s3/3*th,0,s3/6*th,-th/2,s3/6*th,th/2);pop();}}} createGradient=(p,ang,col)=>{let x1=cos(ang)*p[0]-sin(ang)*p[1],y1=sin(ang)*p[0]+cos(ang)*p[1],x2=cos(ang)*p[2]-sin(ang)*p[3],y2=sin(ang)*p[2]+cos(ang)*p[3],gd=gr.drawingContext.createLinearGradient(x1,y1,x2,y2);gd.addColorStop(0.0,color(0,0,0,1));gd.addColorStop(0.5,color(...col,1));gd.addColorStop(1.0,color(0,0,100,1));gr.drawingContext.fillStyle=gd;gr.drawingContext.strokeStyle=gd;} outline=(xp,yp,dd)=>{for(let i=0;i<xp.length;i++){xp[i]=xp[i]+RT(dd*pL2);yp[i]=yp[i]+RT(dd*pL2);}xp.push(xp[0]);yp.push(yp[0]);push();scale(1+RT(pL3));strokeWeight(R(.75*p));stroke(...RV([colF,colF]),R(.4));for (let i=0;i<xp.length;i++){let p1=-R(pL1)*R(),p2=1+R(pL1)*R();line(M(p1,xp[i],xp[i+1]),(M(p1,yp[i],yp[i+1])),M(p2,xp[i],xp[i+1]),(M(p2,yp[i],yp[i+1])));}pop();} outlinec=(r,a1,a2)=>{push();translate(RT(r*pL2),RT(r*pL2));scale(1-R(pL3));strokeWeight(R(.75*p));stroke(...RV([colF,colF]),R(.4));arc(0,0,r,r,a1+RT(.1),a2+RT(.1));pop();}
let rngt,rngs,S=Uint32Array.from([0,1,rngs=rngt=2,3].map(i=>parseInt(tokenData.hash.substr(i*8+5,8),16)));R=(a=1)=>a*(rngt=S[3],S[3]=S[2],S[2]=S[1],S[1]=rngs=S[0],rngt^=rngt<<11,S[0]^=(rngt^rngt>>>8)^(rngs>>>19),S[0]/2**32);RT=(a=1)=>a*(R()-R());RV=(v)=>v[R(v.length)|0];C=(a)=>R()<a?1:0;acv=(n,c)=>{for(let i=0;i<n;i++){cv.push(c)}};mn=(...a)=>Math.min(...a);mx=(...a)=>Math.max(...a); let cols=[[44,14,85],[0,0,25],[6,55,52],[25,57,53],[50,53,54],[106,36,41],[220,42,47],[244,32,49]],ww,wh,w,h,p,pd,ar=3/4,gs,gr,rc=C(.5),bw=C(.1),cai=rc?C(.66):(2+R(6)|0),cbi=rc?bw?((cai+1)%2):(2+R(6)|0):(R(2)|0),cci=(C(.9)||bw)?cai:rc?(R(2)|0):(2+R(6)|0),cola=cols[cai],colb=cols[cbi],colc=cols[cci],gds=20,gdh=1+R(2)*0,pxn=.1+R(.2)+R()*R(.15),pyn0=.1+R(.2)+R()*R(.3),hv=(1-2*pxn)>(1/ar-2*pyn0),pSA=Math.PI*(C(.02)?(C(.5)?0:1):(((C(.5)?-1:1)-R(.7))/4+(C(.5)?1:0))+(hv?.5:0)),qdrt=((4+pSA/(Math.PI/2))|0)%4,Nx=5+(R()*R(200))|0,dxn=(1-2*pxn)/Nx,dyn=dxn,Ny=Math.round((1/ar-2*pyn0)/dyn),pyn=(1/ar-Ny*dyn)/2,pdn=C(.1)?0:(.05+R()*R(.35)),wp=2*pxn-.05,hp=2*pyn-.05,hs=Math.abs(Math.sin(pSA)),ws=Math.abs(Math.cos(pSA)),pSS=1000*mn(wp/ws,hp/hs)*(1-.9*R()),pRM=C(.75)?3:R(2)|0,pRMB=R()*R(.75),pOXY=C(.3),pSD1=C(.75)?0:((R(2)|0)+1),pSD2=C(.5),pBZ=C(.8)?0:(R(.3)),pCS=10+R(40)*R(),pSP=R(10),pSO=R(),pBD=C(.75)?0:(1+R(3)|0),pBD2=R(4)|0,pBB=R(),pSH=.05+R(.1),pMA=C(.5),pNS=(mn(Nx,Ny)*.25+RT(mn(Nx,Ny)*(Nx<50?.25:.1))+R()*R()*R(.5))|0,pTR=.05+R(),bhmMX=.005+R(.3)*R()*R(),lniw=mx((Nx*.15+R()*R(Nx*.45))|0,1),lni=(Nx/2+RT(Nx/3)-lniw/2)|0,lnjw=mx((Ny*.15+R()*R(Ny*.45))|0,1),lnj=(Ny/2+RT(Ny/3)-lnjw/2)|0,bvo=[],filled=[];for(let i=0;i<Nx*Ny;i++)filled[i]=0;if(lni<=0)lni=1;if(lni>=Nx-1)lni=Nx-2;if(lnj<=0)lnj=1;if(lnj>=Ny-1)lni=Ny-2;let pLY=1,pLX=0;if((C(.05))){pLX=1;pLY=1;}else if((C(.5))){pLX=1;pLY=0;}let dLX=(pLX)?1:0,dLY=(pLY)?1:0;if(dLX&&dLY){if(C(.5)){dLX=1;dLY=0}else{dLY=1;dLX=0}} findGrid=()=>{for(let i=0;i<Nx;i++){for(let j=0;j<Ny;j++){let ind=j*Nx+i;if(pLX&&i>=lni&&i<(lni+lniw))filled[ind]=1;if(pLY&&j>=lnj&&j<(lnj+lnjw))filled[ind]=1;}}Ntr=Nx*Ny*10;for(let tr=0;tr<Ntr;tr++){let ptr=tr/Ntr,nshort=1+(pNS*(1-ptr**pTR))|0,nlong=nshort+R(nshort*pSP)|0,nx=nshort,ny=nlong;if(C(pSO)){nx=nlong;ny=nshort;}let i=R(Nx-nx)|0,j=R(Ny-ny)|0;if(pSD1==1&&C(.95)){if(pSD2=1)i=(ptr*Nx)|0;else if(pSD2==2)i=((1-ptr)*Nx)|0}if(pSD1==2&&C(.95)){if(pSD2=1)j=(ptr*Ny)|0;else if(pSD2==2)i=((1-ptr)*Ny)|0}i=constrain(i,0,Nx-nx),j=constrain(j,0,Ny-ny);let flag=1;for(let it=i;it<i+nx;it++)for(let jt=j;jt<j+ny;jt++)if(filled[jt*Nx+it])flag=0;if(flag==0||nx>Nx||ny>Ny)continue;let bh=.1+R(.9),im=(i+nx/2)/Nx,jm=(j+ny/2)/Ny,ijm=.5;if(pBD==1)bh=1-R()*R(pBB);if(pBD==2)ijm=im;if(pBD==3)ijm=jm;if(pBD==2||pBD==3){if(pBD2==0)bh=ijm;if(pBD2==1)bh=1-ijm;if(pBD2==2)bh=sq(sin(PI*ijm));if(pBD2==3)bh=1-sq(sin(PI*ijm));}if(pBD>=2)bh+=RT(.1);if(bh<.005)bh=.005;bhm=C(pBZ)?-.5:(.005+R(bhmMX));if(pRM==0&&hv&&C(1-sin(PI*im)))bh=bhm;if(pRM==1&&hv&&C(sin(PI*im)))bh=bhm;if(pRM==0&&!hv&&C(1-sin(PI*jm)))bh=bhm;if(pRM==1&&!hv&&C(sin(PI*jm)))bh=bhm;if(pRM=3&&C(pRMB))bh=bhm;if(bh>1)bh=1;if(flag){for(let it=i;it<i+nx;it++)for(let jt=j;jt<j+ny;jt++)filled[jt*Nx+it]=1;bvo.push([i,j,nx,ny,bh,cola])}}} setup=()=>{findGrid();wh=windowHeight,ww=windowWidth;wh>=ww/ar?(w=ww,h=ww/ar):(w=wh*ar,h=wh);p=w/1000;createCanvas(ww,wh);gs=createGraphics(ww,wh); gr=createGraphics(ww,wh);pd=pixelDensity();let pdw=pd,pdh=pd;if(pd*wh<2000)pdh=Math.ceil(2000/wh);if(pd*ww<2000)pdw=Math.ceil(2000/ww);pd=mx(pdw,pdh);pixelDensity(pd);colorMode(HSL);noStroke();gs.pixelDensity(pd);gs.colorMode(HSL);gs.noStroke();gr.pixelDensity(pd);gr.colorMode(HSL);gr.noStroke();noLoop();} draw=()=>{let px=pxn*w,py=pyn*w,dx=dxn*w,dy=dyn*w,bpd=pdn*dx,xmin=ww,xmax=0,ymin=wh,ymax=0,bv=[];for(let b=0;b<bvo.length;b++){let bvoh=bvo[b],i=bvoh[0],j=bvoh[1],nx=bvoh[2],ny=bvoh[3],bh=bvoh[4],col=bvoh[5],bx=nx*dx-2*bpd,by=ny*dy-2*bpd,x=px+i*dx+bpd,y=py+j*dy+bpd,sx=bh*pSS*p*cos(pSA),sy=-bh*pSS*p*sin(pSA);bv.push([i,j,nx,ny,bh,col,bx,by,x,y,sx,sy]);if(bh==0)continue;xmin=mn(xmin,(qdrt==0||qdrt==3)?x:(x+sx));xmax=mx(xmax,(qdrt==0||qdrt==3)?(x+bx+sx):(x+bx));ymin=mn(ymin,(qdrt==2||qdrt==3)?y:(y+sy));ymax=mx(ymax,(qdrt==2||qdrt==3)?(y+by+sy):(y+by));}if(dLX&&abs(pSH*pSS*p*cos(pSA))>(lniw*dx-2*bpd)/3)pSH=(lniw*dx-2*bpd)/3/pSS/p/abs(cos(pSA));if(dLY&&abs(pSH*pSS*p*sin(pSA))>(lnjw*dx-2*bpd)/3)pSH=(lnjw*dx-2*bpd)/3/pSS/p/abs(sin(pSA));let xavg=(xmin+xmax)/2,yavg=(ymin+ymax)/2,tx=(ww-w)/2+(w/2-xavg),ty=(wh-h)/2+(h/2-yavg),offx=RT((w-(xmax-xmin))/2)*.9*pOXY,offy=RT((h-(ymax-ymin))/2)*.9*pOXY,sxd=pSH*pSS*p*cos(pSA),syd=-pSH*pSS*p*sin(pSA);cgrd(0,0,colb,0,1);rect(0,0,ww,wh);gs.fill(0);gs.rect(-ww,-wh,3*ww,3*wh);gs.erase();if(dLX)gs.rect(tx+px+lni*dx+bpd+sxd,0,lniw*dx-2*bpd,wh);if(dLY)gs.rect(0,ty+py+lnj*dy+bpd+syd,ww,lnjw*dy-2*bpd);for(let ib=0;ib<bv.length;ib++){let i=bv[ib][0],j=bv[ib][1];bv[ib][8]+=tx;bv[ib][9]+=ty;if(dLX&&pMA){if(i>lni)bv[ib][9]+=offy;else bv[ib][9]+=-offy;} if(dLY&&pMA){if(j>lnj)bv[ib][8]+=offx;else bv[ib][8]+=-offx;}}for(let ib=0;ib<bv.length;ib++){let b=bv[ib];let bh=b[4],bx=b[6],by=b[7],x=b[8],y=b[9];if(bh<0)gs.rect(x+sxd,y+syd,bx,by);}gs.noErase();for(let ib=0;ib<bv.length;ib++){let b=bv[ib];let bh=b[4],bx=b[6],by=b[7],x=b[8],y=b[9],sx=b[10],sy=b[11],xp=[x,x,x+bx,x+bx],yp=[y,y+by,y+by,y];if(bh>0){gs.beginShape();for(let i=0;i<3;i+=2)gs.vertex(xp[(i+qdrt)%4],yp[(i+qdrt)%4]);for(let i=0;i<3;i++)gs.vertex(sxd+sx+xp[(i+qdrt+2)%4],syd+sy+yp[(i+qdrt+2)%4]);gs.endShape();}}push();tint(100,.85);image(gs,0,0);pop();gs.clear();cgrd(0,0,cola,gr,1);gr.rect(0,0,ww,wh);cgrd(0,0,colc,gr,1);if(dLX)gr.rect(tx+px+lni*dx+bpd+lniw*dx-2*bpd,0,ww,wh);if(dLY)gr.rect(0,ty+py+lnj*dy+bpd+lnjw*dy-2*bpd,ww,wh);gs.fill(0);for(let ib=0;ib<bv.length;ib++){let b=bv[ib];let bh=b[4],bx=b[6],by=b[7],x=b[8],y=b[9],sx=b[10],sy=b[11],xp=[x,x,x+bx,x+bx],yp=[y,y+by,y+by,y];if(bh>0){gs.beginShape();for(let i=0;i<3;i+=2)gs.vertex(xp[(i+qdrt)%4],yp[(i+qdrt)%4]);for(let i=0;i<3;i++)gs.vertex(sx+xp[(i+qdrt+2)%4],sy+yp[(i+qdrt+2)%4]);gs.endShape()}}gr.push();gr.tint(100,.85);gr.image(gs,0,0);gr.pop();gr.erase();if(dLX)gr.rect(tx+px+lni*dx+bpd,0,lniw*dx-2*bpd,wh);if(dLY)gr.rect(0,ty+py+lnj*dy+bpd,ww,lnjw*dy-2*bpd);gr.noErase();gr.erase();for(let ib=0;ib<bv.length;ib++){let b=bv[ib],bh=b[4],bx=b[6],by=b[7],x=b[8],y=b[9];if(bh<0)gr.rect(x,y,bx,by);}gr.noErase();image(gr,0,0);gr.remove();for(let ib=0;ib<bv.length;ib++){let b=bv[ib];let i=b[0],j=b[1],bh=b[4],col=b[5],bx=b[6],by=b[7],x=b[8],y=b[9];gr1=createGraphics(bx,by);gr1.colorMode(HSL);gr1.noStroke();gr1.pixelDensity(pd);if((j>lnj&&dLY)||(i>lni&&dLX))col=colc;if(bh<=0)continue;cgrd(x,y,[col[0],col[1],col[2]+10*bh],gr1,-1);gr1.rect(0,0,bx,by);gr2=createGraphics(bx,by);gr2.colorMode(HSL);gr2.noStroke();gr2.pixelDensity(pd);gr2.fill(0);for(let ob=0;ob<bv.length;ob++){bo=bv[ob];let io=bo[0],jo=bo[1],bho=bo[4],bxo=bo[6],byo=bo[7],xo=bo[8]-x,yo=bo[9]-y;if(qdrt<=1 && jo<j)continue;if(qdrt>1&&jo>j)continue;if((qdrt==0||qdrt==3)&&io>i)continue;if((qdrt==1||qdrt==2)&&io<i)continue;let xp=[xo,xo,xo+bxo,xo+bxo],yp=[yo,yo+byo,yo+byo,yo],sxo=(bho-bh)*pSS*p*cos(pSA),syo=-(bho-bh)*pSS*p*sin(pSA);if(bho-bh>0){gr2.beginShape();for(let i=0;i<3;i+=2)gr2.vertex(xp[(i+qdrt)%4],yp[(i+qdrt)%4]);for(let i=0;i<3;i++)gr2.vertex(sxo+xp[(i+qdrt+2)%4],syo+yp[(i+qdrt+2)%4]);gr2.endShape();}}gr1.tint(100,.85);gr1.image(gr2,0,0);image(gr1,x,y);gr1.remove();}loadPixels();for(let p=0;p<pixels.length;p+=4){dp=RT(6);pixels[p]=pixels[p]+dp;pixels[p+1]=pixels[p+1]+dp;pixels[p+2]=pixels[p+2]+dp;}updatePixels();} cgrd=(x,y,c,gcg,d)=>{let gd;if(gcg==0)gd=drawingContext.createLinearGradient(ww/2-gdh*h*cos(pSA)+d*x,wh/2+gdh*h*sin(pSA)+d*y,ww/2+gdh*h*cos(pSA)+d*x,wh/2-gdh*h*sin(pSA)+d*y);else gd=gcg.drawingContext.createLinearGradient(ww/2-gdh*h*cos(pSA)+d*x,wh/2+gdh*h*sin(pSA)+d*y,ww/2+gdh*h*cos(pSA)+d*x,wh/2-gdh*h*sin(pSA)+d*y);gd.addColorStop(0.0,color(c[0],c[1],c[2]+gds));gd.addColorStop(0.5,color(c[0],c[1],c[2]));gd.addColorStop(1.0,color(c[0],c[1],c[2]-gds));if(gcg==0)drawingContext.fillStyle=gd;else gcg.drawingContext.fillStyle=gd;}
let rngt,rngs,S=Uint32Array.from([0,1,rngs=rngt=2,3].map(i=>parseInt(tokenData.hash.substr(i*8+5,8),16)));R=(a=1)=>a*(rngt=S[3],S[3]=S[2],S[2]=S[1],S[1]=rngs=S[0],rngt^=rngt<<11,S[0]^=(rngt^rngt>>>8)^(rngs>>>19),S[0]/2**32);RT=(a=1)=>a*(R()-R());RV=(v)=>v[R(v.length)|0];C=(a)=>R()<a?1:0;acv=(n,c)=>{for(let i=0;i<n;i++){cv.push(c)}};mn=(...a)=>Math.min(...a);mx=(...a)=>Math.max(...a); let cols=[[44,14,85],[0,0,25],[6,55,52],[25,57,53],[50,53,54],[106,36,41],[220,42,47],[244,32,49]],ww,wh,w,h,p,pd,ar=3/4,gs,gr,rc=C(.5),bw=C(.1),cai=rc?C(.66):(2+R(6)|0),cbi=rc?bw?((cai+1)%2):(2+R(6)|0):(R(2)|0),cci=(C(.9)||bw)?cai:rc?(R(2)|0):(2+R(6)|0),cola=cols[cai],colb=cols[cbi],colc=cols[cci],gds=20,gdh=1+R(2)*0,pxn=.1+R(.2)+R()*R(.15),pyn0=.1+R(.2)+R()*R(.3),hv=(1-2*pxn)>(1/ar-2*pyn0),pSA=Math.PI*(C(.02)?(C(.5)?0:1):(((C(.5)?-1:1)-R(.7))/4+(C(.5)?1:0))+(hv?.5:0)),qdrt=((4+pSA/(Math.PI/2))|0)%4,Nx=5+(R()*R(200))|0,dxn=(1-2*pxn)/Nx,dyn=dxn,Ny=Math.round((1/ar-2*pyn0)/dyn),pyn=(1/ar-Ny*dyn)/2,pdn=C(.1)?0:(.05+R()*R(.35)),wp=2*pxn-.05,hp=2*pyn-.05,hs=Math.abs(Math.sin(pSA)),ws=Math.abs(Math.cos(pSA)),pSS=1000*mn(wp/ws,hp/hs)*(1-.9*R()),pRM=C(.75)?3:R(2)|0,pRMB=R()*R(.75),pOXY=C(.3),pSD1=C(.75)?0:((R(2)|0)+1),pSD2=C(.5),pBZ=C(.8)?0:(R(.3)),pCS=10+R(40)*R(),pSP=R(10),pSO=R(),pBD=C(.75)?0:(1+R(3)|0),pBD2=R(4)|0,pBB=R(),pSH=.05+R(.1),pMA=C(.5),pNS=(mn(Nx,Ny)*.25+RT(mn(Nx,Ny)*(Nx<50?.25:.1))+R()*R()*R(.5))|0,pTR=.005+R(),bhmMX=.005+R(.3)*R()*R(),lniw=mx((Nx*.15+R()*R(Nx*.45))|0,1),lni=(Nx/2+RT(Nx/3)-lniw/2)|0,lnjw=mx((Ny*.15+R()*R(Ny*.45))|0,1),lnj=(Ny/2+RT(Ny/3)-lnjw/2)|0,bvo=[],filled=[];for(let i=0;i<Nx*Ny;i++)filled[i]=0;if(lni<=0)lni=1;if(lni>=Nx-1)lni=Nx-2;if(lnj<=0)lnj=1;if(lnj>=Ny-1)lni=Ny-2;let pLY=1,pLX=0;if((C(.05))){pLX=1;pLY=1;}else if((C(.5))){pLX=1;pLY=0;}let dLX=(pLX)?1:0,dLY=(pLY)?1:0;if(dLX&&dLY){if(C(.5)){dLX=1;dLY=0}else{dLY=1;dLX=0}} findGrid=()=>{for(let i=0;i<Nx;i++){for(let j=0;j<Ny;j++){let ind=j*Nx+i;if(pLX&&i>=lni&&i<(lni+lniw))filled[ind]=1;if(pLY&&j>=lnj&&j<(lnj+lnjw))filled[ind]=1;}}Ntr=Nx*Ny*10;for(let tr=0;tr<Ntr;tr++){let ptr=tr/Ntr,nshort=1+(pNS*(1-ptr**pTR))|0,nlong=nshort+R(nshort*pSP)|0,nx=nshort,ny=nlong;if(C(pSO)){nx=nlong;ny=nshort;}let i=R(Nx-nx)|0,j=R(Ny-ny)|0;if(pSD1==1&&C(.95)){if(pSD2=1)i=(ptr*Nx)|0;else if(pSD2==2)i=((1-ptr)*Nx)|0}if(pSD1==2&&C(.95)){if(pSD2=1)j=(ptr*Ny)|0;else if(pSD2==2)i=((1-ptr)*Ny)|0}i=constrain(i,0,Nx-nx),j=constrain(j,0,Ny-ny);let flag=1;for(let it=i;it<i+nx;it++)for(let jt=j;jt<j+ny;jt++)if(filled[jt*Nx+it])flag=0;if(flag==0||nx>Nx||ny>Ny)continue;let bh=.1+R(.9),im=(i+nx/2)/Nx,jm=(j+ny/2)/Ny,ijm=.5;if(pBD==1)bh=1-R()*R(pBB);if(pBD==2)ijm=im;if(pBD==3)ijm=jm;if(pBD==2||pBD==3){if(pBD2==0)bh=ijm;if(pBD2==1)bh=1-ijm;if(pBD2==2)bh=sq(sin(PI*ijm));if(pBD2==3)bh=1-sq(sin(PI*ijm));}if(pBD>=2)bh+=RT(.1);if(bh<.005)bh=.005;bhm=C(pBZ)?-.5:(.005+R(bhmMX));if(pRM==0&&hv&&C(1-sin(PI*im)))bh=bhm;if(pRM==1&&hv&&C(sin(PI*im)))bh=bhm;if(pRM==0&&!hv&&C(1-sin(PI*jm)))bh=bhm;if(pRM==1&&!hv&&C(sin(PI*jm)))bh=bhm;if(pRM=3&&C(pRMB))bh=bhm;if(bh>1)bh=1;if(flag){for(let it=i;it<i+nx;it++)for(let jt=j;jt<j+ny;jt++)filled[jt*Nx+it]=1;bvo.push([i,j,nx,ny,bh,cola])}}} setup=()=>{findGrid();wh=windowHeight,ww=windowWidth;wh>=ww/ar?(w=ww,h=ww/ar):(w=wh*ar,h=wh);p=w/1000;createCanvas(ww,wh);gs=createGraphics(ww,wh); gr=createGraphics(ww,wh);pd=pixelDensity();let pdw=pd,pdh=pd;if(pd*wh<2000)pdh=Math.ceil(2000/wh);if(pd*ww<2000)pdw=Math.ceil(2000/ww);pd=mx(pdw,pdh);pixelDensity(pd);colorMode(HSL);noStroke();gs.pixelDensity(pd);gs.colorMode(HSL);gs.noStroke();gr.pixelDensity(pd);gr.colorMode(HSL);gr.noStroke();noLoop();} draw=()=>{let px=pxn*w,py=pyn*w,dx=dxn*w,dy=dyn*w,bpd=pdn*dx,xmin=ww,xmax=0,ymin=wh,ymax=0,bv=[];for(let b=0;b<bvo.length;b++){let bvoh=bvo[b],i=bvoh[0],j=bvoh[1],nx=bvoh[2],ny=bvoh[3],bh=bvoh[4],col=bvoh[5],bx=nx*dx-2*bpd,by=ny*dy-2*bpd,x=px+i*dx+bpd,y=py+j*dy+bpd,sx=bh*pSS*p*cos(pSA),sy=-bh*pSS*p*sin(pSA);bv.push([i,j,nx,ny,bh,col,bx,by,x,y,sx,sy]);if(bh==0)continue;xmin=mn(xmin,(qdrt==0||qdrt==3)?x:(x+sx));xmax=mx(xmax,(qdrt==0||qdrt==3)?(x+bx+sx):(x+bx));ymin=mn(ymin,(qdrt==2||qdrt==3)?y:(y+sy));ymax=mx(ymax,(qdrt==2||qdrt==3)?(y+by+sy):(y+by));}if(dLX&&abs(pSH*pSS*p*cos(pSA))>(lniw*dx-2*bpd)/3)pSH=(lniw*dx-2*bpd)/3/pSS/p/abs(cos(pSA));if(dLY&&abs(pSH*pSS*p*sin(pSA))>(lnjw*dx-2*bpd)/3)pSH=(lnjw*dx-2*bpd)/3/pSS/p/abs(sin(pSA));let xavg=(xmin+xmax)/2,yavg=(ymin+ymax)/2,tx=(ww-w)/2+(w/2-xavg),ty=(wh-h)/2+(h/2-yavg),offx=RT((w-(xmax-xmin))/2)*.9*pOXY,offy=RT((h-(ymax-ymin))/2)*.9*pOXY,sxd=pSH*pSS*p*cos(pSA),syd=-pSH*pSS*p*sin(pSA);cgrd(0,0,colb,0,1);rect(0,0,ww,wh);gs.fill(0);gs.rect(-ww,-wh,3*ww,3*wh);gs.erase();if(dLX)gs.rect(tx+px+lni*dx+bpd+sxd,0,lniw*dx-2*bpd,wh);if(dLY)gs.rect(0,ty+py+lnj*dy+bpd+syd,ww,lnjw*dy-2*bpd);for(let ib=0;ib<bv.length;ib++){let i=bv[ib][0],j=bv[ib][1];bv[ib][8]+=tx;bv[ib][9]+=ty;if(dLX&&pMA){if(i>lni)bv[ib][9]+=offy;else bv[ib][9]+=-offy;} if(dLY&&pMA){if(j>lnj)bv[ib][8]+=offx;else bv[ib][8]+=-offx;}}for(let ib=0;ib<bv.length;ib++){let b=bv[ib];let bh=b[4],bx=b[6],by=b[7],x=b[8],y=b[9];if(bh<0)gs.rect(x+sxd,y+syd,bx,by);}gs.noErase();for(let ib=0;ib<bv.length;ib++){let b=bv[ib];let bh=b[4],bx=b[6],by=b[7],x=b[8],y=b[9],sx=b[10],sy=b[11],xp=[x,x,x+bx,x+bx],yp=[y,y+by,y+by,y];if(bh>0){gs.beginShape();for(let i=0;i<3;i+=2)gs.vertex(xp[(i+qdrt)%4],yp[(i+qdrt)%4]);for(let i=0;i<3;i++)gs.vertex(sxd+sx+xp[(i+qdrt+2)%4],syd+sy+yp[(i+qdrt+2)%4]);gs.endShape();}}push();tint(100,.85);image(gs,0,0);pop();gs.clear();cgrd(0,0,cola,gr,1);gr.rect(0,0,ww,wh);cgrd(0,0,colc,gr,1);if(dLX)gr.rect(tx+px+lni*dx+bpd+lniw*dx-2*bpd,0,ww,wh);if(dLY)gr.rect(0,ty+py+lnj*dy+bpd+lnjw*dy-2*bpd,ww,wh);gs.fill(0);for(let ib=0;ib<bv.length;ib++){let b=bv[ib];let bh=b[4],bx=b[6],by=b[7],x=b[8],y=b[9],sx=b[10],sy=b[11],xp=[x,x,x+bx,x+bx],yp=[y,y+by,y+by,y];if(bh>0){gs.beginShape();for(let i=0;i<3;i+=2)gs.vertex(xp[(i+qdrt)%4],yp[(i+qdrt)%4]);for(let i=0;i<3;i++)gs.vertex(sx+xp[(i+qdrt+2)%4],sy+yp[(i+qdrt+2)%4]);gs.endShape()}}gr.push();gr.tint(100,.85);gr.image(gs,0,0);gr.pop();gr.erase();if(dLX)gr.rect(tx+px+lni*dx+bpd,0,lniw*dx-2*bpd,wh);if(dLY)gr.rect(0,ty+py+lnj*dy+bpd,ww,lnjw*dy-2*bpd);gr.noErase();gr.erase();for(let ib=0;ib<bv.length;ib++){let b=bv[ib],bh=b[4],bx=b[6],by=b[7],x=b[8],y=b[9];if(bh<0)gr.rect(x,y,bx,by);}gr.noErase();image(gr,0,0);gr.remove();for(let ib=0;ib<bv.length;ib++){let b=bv[ib];let i=b[0],j=b[1],bh=b[4],col=b[5],bx=b[6],by=b[7],x=b[8],y=b[9];gr1=createGraphics(bx,by);gr1.colorMode(HSL);gr1.noStroke();gr1.pixelDensity(pd);if((j>lnj&&dLY)||(i>lni&&dLX))col=colc;if(bh<=0)continue;cgrd(x,y,[col[0],col[1],col[2]+10*bh],gr1,-1);gr1.rect(0,0,bx,by);gr2=createGraphics(bx,by);gr2.colorMode(HSL);gr2.noStroke();gr2.pixelDensity(pd);gr2.fill(0);for(let ob=0;ob<bv.length;ob++){bo=bv[ob];let io=bo[0],jo=bo[1],bho=bo[4],bxo=bo[6],byo=bo[7],xo=bo[8]-x,yo=bo[9]-y;if(qdrt<=1 && jo<j)continue;if(qdrt>1&&jo>j)continue;if((qdrt==0||qdrt==3)&&io>i)continue;if((qdrt==1||qdrt==2)&&io<i)continue;let xp=[xo,xo,xo+bxo,xo+bxo],yp=[yo,yo+byo,yo+byo,yo],sxo=(bho-bh)*pSS*p*cos(pSA),syo=-(bho-bh)*pSS*p*sin(pSA);if(bho-bh>0){gr2.beginShape();for(let i=0;i<3;i+=2)gr2.vertex(xp[(i+qdrt)%4],yp[(i+qdrt)%4]);for(let i=0;i<3;i++)gr2.vertex(sxo+xp[(i+qdrt+2)%4],syo+yp[(i+qdrt+2)%4]);gr2.endShape();}}gr1.tint(100,.85);gr1.image(gr2,0,0);image(gr1,x,y);gr1.remove();}loadPixels();for(let p=0;p<pixels.length;p+=4){dp=RT(6);pixels[p]=pixels[p]+dp;pixels[p+1]=pixels[p+1]+dp;pixels[p+2]=pixels[p+2]+dp;}updatePixels();} cgrd=(x,y,c,gcg,d)=>{let gd;if(gcg==0)gd=drawingContext.createLinearGradient(ww/2-gdh*h*cos(pSA)+d*x,wh/2+gdh*h*sin(pSA)+d*y,ww/2+gdh*h*cos(pSA)+d*x,wh/2-gdh*h*sin(pSA)+d*y);else gd=gcg.drawingContext.createLinearGradient(ww/2-gdh*h*cos(pSA)+d*x,wh/2+gdh*h*sin(pSA)+d*y,ww/2+gdh*h*cos(pSA)+d*x,wh/2-gdh*h*sin(pSA)+d*y);gd.addColorStop(0.0,color(c[0],c[1],c[2]+gds));gd.addColorStop(0.5,color(c[0],c[1],c[2]));gd.addColorStop(1.0,color(c[0],c[1],c[2]-gds));if(gcg==0)drawingContext.fillStyle=gd;else gcg.drawingContext.fillStyle=gd;}
A structure, once whole, has split. Shadows reach from one side to the other in a futile attempt to bridge the gap. The impossible distance from here to there is too far to judge. The light indicates a moment in time, as if the sides could still be moving. But are they drifting apart or will they come back together?
I feel like an imposter. Pseudo-anonymous as *ippsketch* while maintaining an engineering career and family life. I live on the edge of two worlds, immersed in self-doubt. Leaning into each space, I bring a part of each world with me, but wonder if what I bring is enough. I question my identity while learning to embrace it. Art, after all, is made by ordinary people. And I wonder, does anyone really know what they're doing? *Imposter Syndrome* is an expression of my seeming dual existence and my feelings of not being enough in many aspects of life. But I do not mean for this to be entirely prescriptive to the work and often see other interpretations and meanings myself, such as anytime I straddle the edge of something new, when I'm on the fence and making a decision between two directions of my life, or if I consider the shadow or light I cast in the spaces and people around me. These pieces move me differently from day-to-day. This work leans into minimalism. As trends in generative art push toward the visually complex and highly technical, I find my current focus on simple composition and compelling structure. I'm also drawn to broken symmetry, which echos my dual artist/engineer life and is also what I consider to be a visual representation of generative art - design and order on the one hand, random variation within constraint on the other. Color palettes echo those used in *Bent*. Simple and bold colors with stark black and white support. Pieces are rendered in a default poster size (3:4), but are also adaptive to screen size so that they can fit any display. The work can be interacted with by pressing the number keys 1, 2, 3, 4 to see the steps of construction.
let t,s,S=Uint32Array.from([0,1,s=t=2,3].map(i=>parseInt(tokenData.hash.substr(i*8+5,8),16)));R=(a=1)=>a*(t=S[3],S[3]=S[2],S[2]=S[1],S[1]=s=S[0],t^=t<<11,S[0]^=(t^t>>>8)^(s>>>19),S[0]/2**32);RT=(a=1)=>R(a)-R(a);RV=(v)=>v[R(v.length)|0];C=(a)=>R()<a;({max:mx,min:mn,abs:ab,sin:sn,cos:cn,PI}=Math);let W,H,U,V,UV,P,x,y,w=.1+R(.4)+R(.3)*R(),h,a,b,d,e,o,l,r,k,z,c=[],p=[],q=[],u=[],v=[],ar=3/4,f=.05,g=1,n=R(3)|0,m=3,ca=['#be574b','#c27d4c','#bea455','#59864b','#4f6aa1','#635f9b'],nc=R(6)|0,cj=['#dedbd3','#262626',ca[nc]],sf=R(3)|0,cv=[cj[(sf)%3],cj[(sf+1)%3],cj[(sf+2)%3]];while(g){g=0;x=.2+R(.6);y=(.2+R(.6))/ar;h=C(.25)?n==2?1.1547*w:w:n==2?w*(.5+R()):.1+R(.4)+R(.3)*R();b=PI/2*(R(4)|0)+(C(.5)?R(2*PI):0);a=(C(.5)&&n<2)?0:R(2*PI);d=.05+R(.1);e=R(PI);o=RT(.5)*R();c=[d*cn(e),-d*cn(e),0,d*sn(e),-d*sn(e),0];u.length=0;v.length=0;r=h/w;uu=[[-1,-.71,0,.71,1,.71,0,-.71],[-1,-1,1,1],[-1,1,1]];vv=[[0,.7,1,.7,0,-.7,-1,-.7],[-r,r,r,-r],[0,r,-r]];u=uu[n];v=vv[n];l=u.length;p.length=0;q.length=0;for(let i=0;i<l;i++){for(let j=0;j<3;j++){let xh=x+w/2*(u[i]*cn(b+a)-v[i]*sn(b+a))+(c[j])*cn(b)-(c[j+3]+o)*sn(b);let yh=y+w/2*(u[i]*sn(b+a)+v[i]*cn(b+a))+(c[j])*sn(b)+(c[j+3]+o)*cn(b);if(xh<f||xh>1-f||yh<f||yh>1/ar-f)g=1;p[i+j*l]=xh;q[i+j*l]=yh;}}if(n>0){for(let i=0;i<l;i++){let j=(i+1)%l,sl=(q[j]-q[i])/(p[j]-p[i]),ds=ab(q[i]-sl*p[i]-q[i+l]+sl*p[i+l])/(1+sl**2)**.5;if(ab(p[i]-p[j])<.001)ds=q[i]-q[i+l];if(ab(q[i]-q[j])<.001)ds=p[i]-p[i+l];if(ds<.05)g=1;if(n==1&&((i==0&&ab(2*w-ds)<.05)||(i==1&&ab(2*h-ds)<.05)))g=1;}let x1=x,y1=y,x2=x1+cn(b),y2=y1+sn(b);for(let i=0;i<p.length;i++){if(ab((x2-x1)*(y1-q[i])-(x1-p[i])*(y2-y1))/((x2-x1)**2+(y2-y1)**2)**.5<.025)g=1;}}else{for(let i=3;i<6;i++){if(mn(ab(w/2+o+c[i]),ab(-w/2+o+c[i]))<.01)g=1;}}}sz=()=>{U=windowWidth,V=windowHeight;UV=mx(U,V);UM=mn(U,V);W=U;H=V;W>=ar*H?(W=ar*H):(H=W/ar);P=W/1000;z=createGraphics(U,V);let pd=devicePixelRatio;if(pd*UV<2048)pd=round(2048/UV);pixelDensity(pd);z.pixelDensity(pd);z.rectMode(CENTER);z.noStroke();};setup=()=>{sz();createCanvas(U,V);};draw=()=>{if(frameCount>=100)noLoop();let tm=sq(sin(PI/2*constrain(frameCount/100,0,1)));z.background(cv[0]);z.push();z.translate((U-W)/2+x*W,(V-H)/2+y*W);z.rotate(b);z.fill(cv[1]);z.rect(0,UV,2*UV,2*UV);image(z,0,0);for(let i=0;i<3;i++){if(m==0||(m==1&&i<2)||(m==2&&i==2))continue;z.clear();z.push();z.fill(cv[i]);z.translate(c[i]*W*tm,c[i+3]*W*tm+o*W);z.rotate(a);z.scale(W);if(n==0)z.circle(0,0,w);if(n==1)z.rect(0,0,w,h);if(n==2)z.triangle(-w/2,0,w/2,h/2,w/2,-h/2);z.pop();if(i==1){z.erase();z.rect(0,UV+1,2*UV,2*UV);z.noErase();}image(z,0,0);}z.pop();};keyPressed=()=>{if((keyCode>=49 && keyCode<=52)||(keyCode>=97 && keyCode<=100)){m=keyCode-(keyCode>52?97:49);frameCount=0;loop();redraw();}};windowResized=()=>{z.remove();sz();resizeCanvas(U,V);}
Artist and engineer. Pseudo-anonymous as *ippsketch* while maintaining an engineering career and family life. I live on the edge of two worlds. Not fully emerged in either; an imposter in both. Leaning into each space, sometimes one more than the other, I bring a part of each world with me. I question my identity while learning to embrace it. Art is for ordinary people. And I wonder, does anyone really know what they're doing? *Imposter Syndrome* is an expression of my seeming dual existence and my feelings of not being enough in many aspects of life. But I do not mean for this to be entirely prescriptive to the work and often see other interpretations and meanings myself, such as anytime I straddle the edge of something new, when I'm on the fence and making a decision between two directions of my life, or if I consider the shadow or light I cast in the spaces and people around me. These pieces move me differently from day-to-day. This work leans into minimalism. As trends in generative art push toward the visually complex and highly technical, I find my current focus on simple composition and compelling structure. I'm also drawn to broken symmetry, which echos my dual artist/engineer life and is also what I consider to be a visual representation of generative art - design and order on the one hand, random variation within constraint on the other. Color palettes echo those used in *Bent*. Simple and bold colors with stark black and white support. Pieces are rendered in a default poster size (3:4), but are also adaptive to screen size so that they can fit any display. The work can be interacted with by pressing the number keys 1, 2, 3, 4 to see the steps of construction.
Artist and engineer. Pseudo-anonymous as *ippsketch* while maintaining an engineering career and family life. I live on the edge of two worlds. Not fully emerged in either; an imposter in both. Leaning into each space, sometimes one more than the other, I bring a part of each world with me. I question my identity while learning to embrace it. And I wonder, does anyone really know what they're doing? *Imposter Syndrome* is an expression of my seeming dual existence and my feelings of not being enough in many aspects of life. But I do not mean for this to be entirely prescriptive to the work and often see other interpretations and meanings myself, such as anytime I straddle the edge of something new, when I'm on the fence and making a decision between two directions of my life, or if I consider the shadow or light I cast in the spaces and people around me. These pieces move me differently from day-to-day. This work leans into minimalism. As trends in generative art push toward the visually complex and highly technical, I find my current focus on simple composition and compelling structure. I'm also drawn to broken symmetry, which echos my dual artist/engineer life and is also what I consider to be a visual representation of generative art - design and order on the one hand, random variation within constraint on the other. Color palettes echo those used in *Bent*. Simple and bold colors with stark black and white support. Pieces are rendered in a default poster size (3:4), but are also adaptive to screen size so that they can fit any display. The work can be interacted with by pressing the number keys 1, 2, 3, 4 to see the steps of construction.
let t,s,S=Uint32Array.from([0,1,s=t=2,3].map(i=>parseInt(tokenData.hash.substr(i*8+5,8),16)));R=(a=1)=>a*(t=S[3],S[3]=S[2],S[2]=S[1],S[1]=s=S[0],t^=t<<11,S[0]^=(t^t>>>8)^(s>>>19),S[0]/2**32);RT=(a=1)=>R(a)-R(a);RV=(v)=>v[R(v.length)|0];C=(a)=>R()<a;({max:mx,min:mn,abs:ab,sin:sn,cos:cn,PI}=Math);let W,H,U,V,UV,P,x,y,w=.1+R(.4)+R(.3)*R(),h,a,b,d,e,o,l,r,k,z,c=[],p=[],q=[],u=[],v=[],ar=3/4,f=.05,g=1,n=R(3)|0,m=3,ca=['#be574b','#c27d4c','#bea455','#59864b','#4f6aa1','#635f9b'],nc=R(6)|0,cj=['#dedbd3','#262626',ca[nc]],sf=R(3)|0,cv=[cj[(sf)%3],cj[(sf+1)%3],cj[(sf+2)%3]];while(g){g=0;x=.2+R(.6);y=(.2+R(.6))/ar;h=C(.25)?n==2?1.1547*w:w:n==2?w*(.5+R()):.1+R(.4)+R(.3)*R();b=PI/2*(R(4)|0)+(C(.5)?R(2*PI):0);a=(C(.5)&&n<2)?0:R(2*PI);d=.05+R(.1);e=R(PI);o=RT(.5)*R();c=[d*cn(e),-d*cn(e),0,d*sn(e),-d*sn(e),0];u.length=0;v.length=0;r=h/w;uu=[[-1,-.71,0,.71,1,.71,0,-.71],[-1,-1,1,1],[-1,1,1]];vv=[[0,.7,1,.7,0,-.7,-1,-.7],[-r,r,r,-r],[0,r,-r]];u=uu[n];v=vv[n];l=u.length;p.length=0;q.length=0;for(let i=0;i<l;i++){for(let j=0;j<3;j++){let xh=x+w/2*(u[i]*cn(b+a)-v[i]*sn(b+a))+(c[j])*cn(b)-(c[j+3]+o)*sn(b);let yh=y+w/2*(u[i]*sn(b+a)+v[i]*cn(b+a))+(c[j])*sn(b)+(c[j+3]+o)*cn(b);if(xh<f||xh>1-f||yh<f||yh>1/ar-f)g=1;p[i+j*l]=xh;q[i+j*l]=yh;}}if(n>0){for(let i=0;i<l;i++){let j=(i+1)%l,sl=(q[j]-q[i])/(p[j]-p[i]),ds=ab(q[i]-sl*p[i]-q[i+l]+sl*p[i+l])/(1+sl**2)**.5;if(ab(p[i]-p[j])<.001)ds=q[i]-q[i+l];if(ab(q[i]-q[j])<.001)ds=p[i]-p[i+l];if(ds<.05)g=1;if(n==1&&((i==0&&ab(2*w-ds)<.05)||(i==1&&ab(2*h-ds)<.05)))g=1;}let x1=x,y1=y,x2=x1+cn(b),y2=y1+sn(b);for(let i=0;i<p.length;i++){if(ab((x2-x1)*(y1-q[i])-(x1-p[i])*(y2-y1))/((x2-x1)**2+(y2-y1)**2)**.5<.025)g=1;}}else{for(let i=3;i<6;i++){if(mn(ab(w/2+o+c[i]),ab(-w/2+o+c[i]))<.01)g=1;}}}sz=()=>{U=windowWidth,V=windowHeight;UV=mx(U,V);UM=mn(U,V);W=U;H=V;W>=ar*H?(W=ar*H):(H=W/ar);P=W/1000;z=createGraphics(U,V);let pd=devicePixelRatio;if(pd*UM<2048)pd=ceil(2048/UM);pixelDensity(pd);z.pixelDensity(pd);z.rectMode(CENTER);z.noStroke();};setup=()=>{sz();createCanvas(U,V);};draw=()=>{if(frameCount>=100)noLoop();let tm=sq(sin(PI/2*constrain(frameCount/100,0,1)));z.background(cv[0]);z.push();z.translate((U-W)/2+x*W,(V-H)/2+y*W);z.rotate(b);z.fill(cv[1]);z.rect(0,UV,2*UV,2*UV);image(z,0,0);for(let i=0;i<3;i++){if(m==0||(m==1&&i<2)||(m==2&&i==2))continue;z.clear();z.push();z.fill(cv[i]);z.translate(c[i]*W*tm,c[i+3]*W*tm+o*W);z.rotate(a);z.scale(W);if(n==0)z.circle(0,0,w);if(n==1)z.rect(0,0,w,h);if(n==2)z.triangle(-w/2,0,w/2,h/2,w/2,-h/2);z.pop();if(i==1){z.erase();z.rect(0,UV+1,2*UV,2*UV);z.noErase();}image(z,0,0);}z.pop();};keyPressed=()=>{if((keyCode>=49 && keyCode<=52)||(keyCode>=97 && keyCode<=100)){m=keyCode-(keyCode>52?97:49);frameCount=0;loop();redraw();}};windowResized=()=>{z.remove();sz();resizeCanvas(U,V);}
Artist and engineer. Pseudo-anonymous as *ippsketch* while maintaining a separate engineering career and family life. I live on the edge of two worlds. Not fully emerged in either, an imposter in both. Leaning into each space, sometimes one more than the other, I bring a part of each world with me. I question my identity while learning to embrace it. And I wonder, does anyone really know what they're doing? *Imposter Syndrome* is an expression of my seemingly dual existence and my feelings of not being enough in many aspects of life. But I do not mean for this to be entirely prescriptive to the work and often see other interpretations and meanings myself, such as anytime I straddle the edge of something new, when I'm on the fence and making a decision between two directions of my life, or if I consider the shadow or light I cast in the spaces and people around me. These pieces move me differently from day-to-day. This work leans into minimalism. As trends in generative art push toward the visually complex and highly technical, I find my current focus on simple composition and compelling structure. I'm also drawn to broken symmetry, which echos my dual artist/engineer life and is also what I consider to be a visual representation of generative art - design and order on the one hand, random variation within constraint on the other. Color palettes echo those used in *Bent*. Simple and bold colors with stark black and white support. Pieces are rendered in a default poster size (3:4), but are also responsive to screen size so that they can fit any display. The work can be interacted with by pressing the number keys 1, 2, 3, 4 to see the steps of construction.
Artist and engineer. Pseudo-anonymous as *ippsketch* while maintaining a separate engineering career and family life. I live on the edge of two worlds. Not fully emerged in either, an imposter in both. Leaning into each space, sometimes one more than the other, I bring a part of each world with me. I question my identity while learning to embrace it. And I wonder, does anyone really know what they're doing? *Imposter Syndrome* is an expression of my seemingly dual existence and my feelings of not being enough in many aspects of life. But I do not mean for this to be entirely prescriptive to the work and often see other interpretations and meanings myself, such as anytime I straddle the edge of something new, when I'm on the fence and making a decision between two directions of my life, or if I consider the shadow or light I cast in the spaces and people around me. These pieces move me differently from day-to-day. This work leans into minimalism. As trends in generative art push toward the visually complex and highly technical, I find my current focus on simple composition and compelling structure. I'm also drawn to broken symmetry, which echos my dual artist/engineer life and is also what I consider to be a visual representation of generative art - design and order on the one hand, random variation within constraint on the other. Color palettes echo those used in *Bent*. Simple and bold colors with stark black and white support. Pieces are rendered in a default poster size (3:4), but are also adaptive to screen size so that they can fit any display. The work can be interacted with by pressing the number keys 1, 2, 3, 4 to see the steps of construction.
Lines are bent and shaded. There are no wrong turns. [Interaction in live view: press 1-7 or left/right arrow keys to see the stages of sketch construction: 1-grid, 2-divide, 3-tile, 4-bend, 5-shade, 6-color, 7-texture].
Lines are bent and shaded. There are no wrong turns. [Interaction in live view: press 1-7 or left/right arrow keys to see the stages of sketch construction: 1-grid, 2-divide, 3-tile, 4-bend, 5-shade, 6-color, 7-texture].
Lines are bent and shaded. There are no wrong turns. [Interaction in live view: press 1-7 or left/right arrow keys to see the stages of sketch construction: 1-grid, 2-divide, 3-tile, 4-bend, 5-shade, 6-color, 7-texture]. Dutch auction from 6E to 0.1E, dropping in price every five minutes: 6 | 4 | 3 | 2.7 | 2.4 | 2.1 | 1.8 | 1.5 | 1.2 | 0.9 | 0.7 | 0.5 | 0.3 | 0.1
S=Uint32Array.from([0,1,s=t=2,3].map(i=>parseInt(tokenData.hash.substr(i*8+5,8),16)));R=(a=1)=>a*(t=S[3],S[3]=S[2],S[2]=S[1],S[1]=s=S[0],t^=t<<11,S[0]^=(t^t>>>8)^(s>>>19),S[0]/2**32);RT=()=>R()-R();RD=()=>Math.abs(R()-R());RN=(a,b)=>a+(b-a)*R();RI=(a,b)=>~~RN(a,b+1);RV=(v)=>v[R(v.length)|0];C=(a)=>R()<a/100;M=(i,s,e)=>s+(e-s)*i;pw=(a)=>Math.pow(a/255,2.4);wp=(a)=>Math.pow(a,1/2.4)*255;lc=(p1,p2,p)=>{p1=p1.map(a=>pw(a));p2=p2.map(a=>pw(a));return [wp(M(p,p1[0],p2[0])),wp(M(p,p1[1],p2[1])),wp(M(p,p1[2],p2[2]))];};tr=[];tp=[];tx=[];ty=[];gx=[];gy=[];ps=[0,0,0];let gr,gl;sk=7;ar=4/3;nx=RI(2,9)+~~(21*R()*R());so=C(10)?4:C(75)?8:16;sz=nx*so/4;ss=15+R(15);hd=C(20)?1:C(50)?2:0;mx=C(10)?2:C(25)?8:4;mn=C(97)||sz>40?2:4;cr=C(50);lr=.5+((C(75)||nx<5)?1:-1)*(.1+R(.3));lw=((.625+(.5+R())*(C(20)?R():1))/.25|0)*.25;pd=C(85)?.05:0;H=(1-2*pd)/nx;ny=(1+(ar-2*pd)*Math.sqrt(3)/H)|0;A=(ar-2*pd)*2/ny;xt=.065+.02*RT();xr=2000+700*RT();xl=.15+R(.1);xw=RN(.75,2.5)*(sz>20?(1-(sz-20)/30):1);xw=xw<.75?.75:xw;ca=[[6,45,52],[25,47,53],[45,43,54],[106,26,41],[199,35,42],[220,32,47],[244,22,49]];cm=ca.map(a=>a.slice());for(let i=0;i<ca.length;i++){ca[i][0]+=6*RT();ca[i][1]+=RN(-8,12);ca[i][2]+=5*RT();};co=[[4,5,5],[4,5,6],[3,4,5,6],[4,5,6],[0,1,2,3],[0,1,2,3],[0,1,2]];ic=C(3)?2:C(60)?RV([0,3,5]):C(25)?4:RV([1,6]);ni=[0,1,2,3,4,5,6];ni.splice(ic,1);rb=C(1);mo=C(2);bw=C(2);gd=C(30);sc=C(20)&&sz<50&&(lr<.3||lr>.7);db=C(35);ci=[...ca[ic]];cj=gd?[...ca[C(50)?RV(co[ic]):RV(ni)]]:[...ci];cb=[ci[0],ci[1]*((gd||sc)?.2:db?.2+RD()/2:.2+.3*RD()),db?7+(gd?8:10)*RD():93-(gd?3:10)*RD()];i2=RV(co[ic]);c2=!rb&&!gd&&sc?[...ca[i2]]:[0,0,15+R(10)+50*db];ci[2]+=7*db+10*!gd;cj[2]+=7*db-10*!gd;ci[1]+=7*gd-5*db;cj[1]+=7*gd-5*db;c2[2]+=10*db;cl=(C(2.5)&&lr>.3)||((mo||bw)&&(lw==2||C(75)));fc=lr<.5;al=C(5);fs=C(35);if(bw){ci=cj=c2=db?[0,0,93]:[0,0,10];}if(bw&&!db){ss=-20}if(rb||bw)cb=db?[0,0,10]:[0,0,93];if(mo&&!bw&&!rb){cb=[...cm[ic]];fp=C(50);ci=cj=c2=[cb[0],cb[1],fp?10:93];if(fp)ss=-12;}ss=al?5:ss;sm=(C(2)&&!(sz>16&&(mx==2||so==4)))?5:C(3)?RI(12,13):C(sz>40?10:15)?RI(6,11):C(25)?1:RI(0,4);if(sm==7&&nx%2&&ny%2)sm=0;sn=R()-.5;pr=RI(1,2)*C(50);[sx,sy]=nx%2?[1,0]:ny%2?[0,1]:RV([[0,1],[1,0],[0,0]]);na=RN(.25,3)*nx*so/40;na2=1.5+R(6);sd=R();sa=C(50);rm=sm==7?7:C(45)?RV([0,5]):C(90)?RI(1,4):6;rd=R();vr=R();ra=RI(0,1);rs=R();sv=R();xo=R()-.5;yo=R()-.5;am=RI(1,6);xo2=R()-.5;yo2=R()-.5;am2=RI(1,6);rv=[-1,-1,1,1];tv=[0,1,1,0];function setup(){windowHeight>=ar*windowWidth?(ww=windowWidth,wh=ar*windowWidth):(ww=windowHeight/ar,wh=windowHeight);ww=ww|0;wh=wh|0;pt=wh/1000;createCanvas(ww,wh);gl=createGraphics(ww,wh);gr=createGraphics(ww,wh,WEBGL);colorMode(HSL);gr.colorMode(HSL);gl.colorMode(HSL);gr.noStroke();gr.smooth();noLoop();noiseSeed(R(100)|0);if(pixelDensity()*wh<2048){px=round(2048/wh);pixelDensity(px);gr.pixelDensity(px);gl.pixelDensity(px)}pd*=ww;A*=ww;H*=ww;for(let i=0;i<nx;i++)for(let j=0;j<ny+1;j++)mT(pd+i*H,pd+j*A/2,A,H,(i+j+cr)%2,2,i,j,(i+j+cr)%2);tl=tp.length;fl=0;for(let i=0;i<tl;i++)fl+=(2*!tp[i]-1)/tl;fs=(fl>=0); if(!ps[0]+!ps[1]+!ps[2]==2){while(1){fi=R(tl)|0;if(pd==0&&(ty[fi][0]<.2*wh||ty[fi][0]>.8*wh))continue;tp[fi]=RI(1,2)*!tp[fi];break;}}if(sm==10)fs=1;if(lr<.5&&so/Math.min(...tr)==2)fc=0;gr.background(...cb);for(let i=0;i<tl;i++){let u=tx[i],v=ty[i],s=so/tr[i],p=tp[i];for(let n=1;n<s;n+=cl+1){let sw=(n%2?lr:1-lr)*lw/s,mag=al?1:(p==0)^fs?1:0;gr.beginShape();for(let i=0;i<4;i++){let xv=M(n/s+rv[i]*sw/2,u[p],u[(p+1+tv[i])%3]),yv=M(n/s+rv[i]*sw/2,v[p],v[(p+1+tv[i])%3]),xn=(xv-pd)/(ww-2*pd),yn=(yv-pd)/(wh-2*pd),mod=hd==1?xn:hd==2?yn:(xn+yn)/2;gr.colorMode(RGB);if(n%2==fc)gr.fill(color(c2[0],c2[1],c2[2]-ss*mag));else if(rb){gr.colorMode(HSL);gr.fill(240*mod,30,45-ss*mag);}else gr.fill(lc(color(ci[0],ci[1],ci[2]-ss*mag).levels,color(cj[0],cj[1],cj[2]-ss*mag).levels,mod));gr.vertex(xv-ww/2,yv-wh/2)}gr.endShape(CLOSE)}}noFill();for(let i=0;i<tl;i++){let u=tx[i],v=ty[i],s=so/tr[i],p=tp[i];for(let n=1;n<s;n+=cl+1){let sw=n%2?lr*lw/s:(1-lr)*lw/s;for(let j=0;j<xr*n*sw*s/sz;j++){let im=n/s+RN(-1,1)*sw/2,xi=M(im,u[p],u[(p+1)%3]),yi=M(im,v[p],v[(p+1)%3]),xf=M(im,u[p],u[(p+2)%3]),yf=M(im,v[p],v[(p+2)%3]),rr=R(),r=R(xl),r1=rr-r/n<0?0:rr-r/n,r2=rr+r/n>1?1:rr+r/n;gl.stroke(...cb,R(xt));gl.strokeWeight(R(xw*pt));gl.line(M(r1,xi,xf),M(r1,yi,yf),M(r2,xi,xf),M(r2,yi,yf))}}}}function draw(){background([0,0,cb[2]>50?100:10]);noFill();strokeWeight(.5*pt);stroke(0,0,cb[2]>50?10:90,.2);if(sk==1)stroke(0,0,cb[2]>50?10:90,.8);if(sk<=2)dT(gx,gy);if(sk==2)stroke(0,0,cb[2]>50?10:90,.8);if(sk>=2&&sk<=5)dT(tx,ty);if(sk>=3&&sk<=5){for(let i=0;i<tl;i++){let u=tx[i],v=ty[i],s=so/tr[i],p=tp[i];fill(0,0,65*((sk==3||sk==4||al)?1:(p==0)^fs?.6:1));for(let n=1;n<s;n+=cl+1){let d=u[0]<u[1]?0:1,sw=(n%2?lr:1-lr)*lw/s;if(sk==3){p=(ps[2]>=ps[0]&&ps[2]>=ps[1])?!d?2:1:(ps[1]>=ps[0]&&ps[1]>=ps[2])?d?2:1:0}stroke(0,0,cb[2]>50?10:90);beginShape();for(let i=0;i<4;i++){let xv=M(n/s+rv[i]*sw/2,u[p],u[(p+1+tv[i])%3]),yv=M(n/s+rv[i]*sw/2,v[p],v[(p+1+tv[i])%3]);vertex(xv,yv)}endShape(CLOSE)}}}if(sk==7||sk==6)image(gr,0,0,ww,wh);if(sk==7)image(gl,0,0,ww,wh);dT=(dx,dy)=>{for(let i=0;i<dx.length;i++){u=dx[i],v=dy[i];triangle(u[0],v[0],u[1],v[1],u[2],v[2])}}}function mT(x,y,a,h,d,r,i,j,di){let s=so/r,u=[x+h*d,x+h-h*d,x+h-h*d],v=[y,y+a/2,y-a/2],xm=(x+h*d/3+!d*h*2/3-pd)/(ww-2*pd),ym=(y-pd)/(wh-2*pd),xn=(xm-.5)*2,yn=(ym-.5)*2,rn=sqrt(sq(yn)+sq(xn)),mod=vr<.5?abs(rd*xn+(1-rd)*yn):(rd*xm+(1-rd)*ym),ob=(v[0]<pd+.1)||(v[0]>pd+A/2*ny-.1);if(r==2){gx.push(u),gy.push(v)}if(ra)mod=1-mod;rfv=[R()<.5+sn,R()<rn,R()>rn,mod<R(),mod>R(),.5<noise(na2*xm*2,na2*ym*2),.5<((am2/3*(atan2(yn+yo2,xn+xo2)/PI+1)+sv)*3)%1,.5<noise(na2*xn,na2*yn)];if(s>mx||(s>mn&&(rfv[rm]||ob))){for(let k=0;k<4;k++)mT(x+(k==1?h/2-!d*h/2:!d*h/2),y+(k==2?a/4:k==3?-a/4:0),a/2,h/2,!k?!d:d,r*2,i,j,di)}else if(pd==0||!ob){let p=RI(0,1)*RI(1,2);if(sm==1)p=round(map(noise(na*xm*2,na*ym*2),.2,.8,0,6,1))%3;if(sm==2){mod=sv<.5?abs(sd*xn+(1-sd)*yn):(sd*xm+(1-sd)*ym);if((sa?1-mod:mod)>R()*R())p=pr}if(sm==3&&rn>R())p=pr;if(sm==4&&rn<R()+.2)p=pr;if(sm==5)p=(pr+constrain(s/mn-1,0,2))%3;if(sm==6)p=~~((am/2*(atan2(yn+yo,xn+xo)/PI+1)+sv)*3)%3;if(sm==7){p=round(map(noise(na*(xn+sx),na*(yn+sy)),.2,.8,0,6,!0))%3;p=(!sy&&abs(yn)<.01)?0:(xn<0&&!sx)^(yn<0&&!sy)?p==1?2:p==2?1:0:p}let si=(ra?(i+j+!di):(nx-i+j+di))/4;if(sm==8)p=(ra+1)*(si%1>=.5&&noise(~~si)>(nx>6?.5:.25));if(sm==9)p=RI(1,2)*((ra?-1:1)*(.2+noise(xm*10)/2)>yn?ra:!ra);if(sm==10)p=(nx*!ra+(ra?1:-1)*i+j+(ra?!di:di)>ny*.7)?ra?2:1:0;ys=~~(ny*(.5+vr)/4)*2+!cr;if(sm==11) p=(j==ys||j==ys+1)?i%2+1:0;let pv=[0,1+d,2-d];if(sm==12){dr=~~(1+ny*rd/3);pvi=[...Array(dr).fill(0),2-di,1+di];ir=(j+1)%(2+dr);p=pvi[ir]}if(sm==13){pvi=[0,2-di,1+di];ir=(j+1)%3;p=pvi[ir]}p=C(15*rs-5)&&sm>=6&&sm!=7?RI(0,2):p;tr.push(r);tx.push(u);ty.push(v);tp.push(pv[p]);ps[p]+=1;}}function keyPressed(){kc=keyCode;sk=kc==39?sk+1:kc==37?sk-1:(kc>=49&&kc<=56)?kc-48:(kc>=97&&kc<=103)?kc-96:7;sk=sk<1?1:sk>7?7:sk;redraw();}
Lines are bent and shaded. There are no wrong turns. [Interaction in live view: press 1-7 or left/right arrow keys to see the stages of sketch construction: 1-grid, 2-divide, 3-tile, 4-bend, 5-shade, 6-color, 7-texture]
S=Uint32Array.from([0,1,s=t=2,3].map(i=>parseInt(tokenData.hash.substr(i*8+5,8),16)));R=(a=1)=>a*(t=S[3],S[3]=S[2],S[2]=S[1],S[1]=s=S[0],t^=t<<11,S[0]^=(t^t>>>8)^(s>>>19),S[0]/2**32);RT=()=>R()-R();RD=()=>Math.abs(R()-R());RN=(a,b)=>a+(b-a)*R();RI=(a,b)=>~~RN(a,b+1);RV=(v)=>v[R(v.length)|0];C=(a)=>R()<a/100;M=(i,s,e)=>s+(e-s)*i;pw=(a)=>Math.pow(a/255,2.4);wp=(a)=>Math.pow(a,1/2.4)*255;lc=(p1,p2,p)=>{p1=p1.map(a=>pw(a));p2=p2.map(a=>pw(a));return [wp(M(p,p1[0],p2[0])),wp(M(p,p1[1],p2[1])),wp(M(p,p1[2],p2[2]))];};tr=[];tp=[];tx=[];ty=[];gx=[];gy=[];ps=[0,0,0];let gr,gl;sk=7;ar=4/3;nx=RI(2,9)+~~(21*R()*R());so=C(10)?4:C(75)?8:16;sz=nx*so/4;ss=15+R(15);hd=C(20)?1:C(50)?2:0;mx=C(10)?2:C(25)?8:4;mn=C(97)||sz>40?2:4;cr=C(50);lr=.5+((C(75)||nx<5)?1:-1)*(.1+R(.3));lw=((.625+(.5+R())*(C(20)?R():1))/.25|0)*.25;pd=C(90)?.05:0;H=(1-2*pd)/nx;ny=(1+(ar-2*pd)*Math.sqrt(3)/H)|0;A=(ar-2*pd)*2/ny;xt=.065+.02*RT();xr=2000+700*RT();xl=.15+R(.1);xw=RN(.75,2.5)*(sz>20?(1-(sz-20)/30):1);xw=xw<.75?.75:xw;ca=[[6,45,52],[25,47,53],[45,43,54],[106,26,41],[199,35,42],[220,32,47],[244,22,49]];cm=ca.map(a=>a.slice());for(let i=0;i<ca.length;i++){ca[i][0]+=6*RT();ca[i][1]+=RN(-8,12);ca[i][2]+=5*RT();};co=[[4,5,5],[4,5,6],[3,4,5,6],[4,5,6],[0,1,2,3],[0,1,2,3],[0,1,2]];ic=C(3)?2:C(60)?RV([0,3,5]):C(25)?4:RV([1,6]);ni=[0,1,2,3,4,5,6];ni.splice(ic,1);rb=C(1);mo=C(4);bw=C(2);gd=C(30);sc=C(20)&&sz<50&&(lr<.3||lr>.7);db=C(30);ci=[...ca[ic]];cj=gd?[...ca[C(50)?RV(co[ic]):RV(ni)]]:[...ci];cb=[ci[0],ci[1]*((gd||sc)?.2:db?.2+RD()/2:.2+.3*RD()),db?7+(gd?8:10)*RD():93-(gd?3:10)*RD()];i2=RV(co[ic]);c2=!rb&&!gd&&sc?[...ca[i2]]:[0,0,15+R(10)+50*db];ci[2]+=7*db+10*!gd;cj[2]+=7*db-10*!gd;ci[1]+=7*gd-5*db;cj[1]+=7*gd-5*db;c2[2]+=10*db;cl=(C(2.5)&&lr>.3)||((mo||bw)&&(lw==2||C(75)));fc=lr<.5;al=C(5);fs=C(35);if(bw){ci=cj=c2=db?[0,0,93]:[0,0,10];}if(bw&&!db){ss=-20}if(rb||bw)cb=db?[0,0,10]:[0,0,93];if(mo&&!bw&&!rb){cb=[...cm[ic]];fp=C(75);ci=cj=c2=[cb[0],cb[1],fp?10:93];if(fp)ss=-12;}ss=al?5:ss;sm=(C(2)&&!(sz>16&&(mx==2||so==4)))?5:C(3)?RI(12,13):C(sz>40?10:15)?RI(6,11):C(25)?1:RI(0,4);if(sm==7&&nx%2&&ny%2)sm=0;sn=R()-.5;pr=RI(1,2)*C(50);[sx,sy]=nx%2?[1,0]:ny%2?[0,1]:RV([[0,1],[1,0],[0,0]]);na=RN(.25,3)*nx*so/40;na2=1.5+R(6);sd=R();sa=C(50);rm=sm==7?7:C(45)?RV([0,5]):C(90)?RI(1,4):6;rd=R();vr=R();ra=RI(0,1);rs=R();sv=R();xo=R()-.5;yo=R()-.5;am=RI(1,6);xo2=R()-.5;yo2=R()-.5;am2=RI(1,6);rv=[-1,-1,1,1];tv=[0,1,1,0];function setup(){windowHeight>=ar*windowWidth?(ww=windowWidth,wh=ar*windowWidth):(ww=windowHeight/ar,wh=windowHeight);ww=ww|0;wh=wh|0;pt=wh/1000;createCanvas(ww,wh);gl=createGraphics(ww,wh);gr=createGraphics(ww,wh,WEBGL);colorMode(HSL);gr.colorMode(HSL);gl.colorMode(HSL);gr.noStroke();gr.smooth();noLoop();noiseSeed(R(100)|0);if(pixelDensity()*wh<2048){px=round(2048/wh);pixelDensity(px);gr.pixelDensity(px);gl.pixelDensity(px)}pd*=ww;A*=ww;H*=ww;for(let i=0;i<nx;i++)for(let j=0;j<ny+1;j++)mT(pd+i*H,pd+j*A/2,A,H,(i+j+cr)%2,2,i,j,(i+j+cr)%2);tl=tp.length;fl=0;for(let i=0;i<tl;i++)fl+=(2*!tp[i]-1)/tl;fs=(fl>=0); if(!ps[0]+!ps[1]+!ps[2]==2){while(1){fi=R(tl)|0;if(pd==0&&(ty[fi][0]<.2*wh||ty[fi][0]>.8*wh))continue;tp[fi]=RI(1,2)*!tp[fi];break;}}if(sm==10)fs=1;if(lr<.5&&so/Math.min(...tr)==2)fc=0;gr.background(...cb);for(let i=0;i<tl;i++){let u=tx[i],v=ty[i],s=so/tr[i],p=tp[i];for(let n=1;n<s;n+=cl+1){let sw=(n%2?lr:1-lr)*lw/s,mag=al?1:(p==0)^fs?1:0;gr.beginShape();for(let i=0;i<4;i++){let xv=M(n/s+rv[i]*sw/2,u[p],u[(p+1+tv[i])%3]),yv=M(n/s+rv[i]*sw/2,v[p],v[(p+1+tv[i])%3]),xn=(xv-pd)/(ww-2*pd),yn=(yv-pd)/(wh-2*pd),mod=hd==1?xn:hd==2?yn:(xn+yn)/2;gr.colorMode(RGB);if(n%2==fc)gr.fill(color(c2[0],c2[1],c2[2]-ss*mag));else if(rb){gr.colorMode(HSL);gr.fill(240*mod,30,45-ss*mag);}else gr.fill(lc(color(ci[0],ci[1],ci[2]-ss*mag).levels,color(cj[0],cj[1],cj[2]-ss*mag).levels,mod));gr.vertex(xv-ww/2,yv-wh/2)}gr.endShape(CLOSE)}}noFill();for(let i=0;i<tl;i++){let u=tx[i],v=ty[i],s=so/tr[i],p=tp[i];for(let n=1;n<s;n+=cl+1){let sw=n%2?lr*lw/s:(1-lr)*lw/s;for(let j=0;j<xr*n*sw*s/sz;j++){let im=n/s+RN(-1,1)*sw/2,xi=M(im,u[p],u[(p+1)%3]),yi=M(im,v[p],v[(p+1)%3]),xf=M(im,u[p],u[(p+2)%3]),yf=M(im,v[p],v[(p+2)%3]),rr=R(),r=R(xl),r1=rr-r/n<0?0:rr-r/n,r2=rr+r/n>1?1:rr+r/n;gl.stroke(...cb,R(xt));gl.strokeWeight(R(xw*pt));gl.line(M(r1,xi,xf),M(r1,yi,yf),M(r2,xi,xf),M(r2,yi,yf))}}}}function draw(){background([0,0,cb[2]>50?100:10]);noFill();strokeWeight(.5*pt);stroke(0,0,cb[2]>50?10:90,.2);if(sk==1)stroke(0,0,cb[2]>50?10:90,.8);if(sk<=2)dT(gx,gy);if(sk==2)stroke(0,0,cb[2]>50?10:90,.8);if(sk>=2&&sk<=5)dT(tx,ty);if(sk>=3&&sk<=5){for(let i=0;i<tl;i++){let u=tx[i],v=ty[i],s=so/tr[i],p=tp[i];fill(0,0,65*((sk==3||sk==4||al)?1:(p==0)^fs?.6:1));for(let n=1;n<s;n+=cl+1){let d=u[0]<u[1]?0:1,sw=(n%2?lr:1-lr)*lw/s;if(sk==3){p=(ps[2]>=ps[0]&&ps[2]>=ps[1])?!d?2:1:(ps[1]>=ps[0]&&ps[1]>=ps[2])?d?2:1:0}stroke(0,0,cb[2]>50?10:90);beginShape();for(let i=0;i<4;i++){let xv=M(n/s+rv[i]*sw/2,u[p],u[(p+1+tv[i])%3]),yv=M(n/s+rv[i]*sw/2,v[p],v[(p+1+tv[i])%3]);vertex(xv,yv)}endShape(CLOSE)}}}if(sk==7||sk==6)image(gr,0,0,ww,wh);if(sk==7)image(gl,0,0,ww,wh);dT=(dx,dy)=>{for(let i=0;i<dx.length;i++){u=dx[i],v=dy[i];triangle(u[0],v[0],u[1],v[1],u[2],v[2])}}}function mT(x,y,a,h,d,r,i,j,di){let s=so/r,u=[x+h*d,x+h-h*d,x+h-h*d],v=[y,y+a/2,y-a/2],xm=(x+h*d/3+!d*h*2/3-pd)/(ww-2*pd),ym=(y-pd)/(wh-2*pd),xn=(xm-.5)*2,yn=(ym-.5)*2,rn=sqrt(sq(yn)+sq(xn)),mod=vr<.5?abs(rd*xn+(1-rd)*yn):(rd*xm+(1-rd)*ym),ob=(v[0]<pd+.1)||(v[0]>pd+A/2*ny-.1);if(r==2){gx.push(u),gy.push(v)}if(ra)mod=1-mod;rfv=[R()<.5+sn,R()<rn,R()>rn,mod<R(),mod>R(),.5<noise(na2*xm*2,na2*ym*2),.5<((am2/3*(atan2(yn+yo2,xn+xo2)/PI+1)+sv)*3)%1,.5<noise(na2*xn,na2*yn)];if(s>mx||(s>mn&&(rfv[rm]||ob))){for(let k=0;k<4;k++)mT(x+(k==1?h/2-!d*h/2:!d*h/2),y+(k==2?a/4:k==3?-a/4:0),a/2,h/2,!k?!d:d,r*2,i,j,di)}else if(pd==0||!ob){let p=RI(0,1)*RI(1,2);if(sm==1)p=round(map(noise(na*xm*2,na*ym*2),.2,.8,0,6,1))%3;if(sm==2){mod=sv<.5?abs(sd*xn+(1-sd)*yn):(sd*xm+(1-sd)*ym);if((sa?1-mod:mod)>R()*R())p=pr}if(sm==3&&rn>R())p=pr;if(sm==4&&rn<R()+.2)p=pr;if(sm==5)p=(pr+constrain(s/mn-1,0,2))%3;if(sm==6)p=~~((am/2*(atan2(yn+yo,xn+xo)/PI+1)+sv)*3)%3;if(sm==7){p=round(map(noise(na*(xn+sx),na*(yn+sy)),.2,.8,0,6,!0))%3;p=(!sy&&abs(yn)<.01)?0:(xn<0&&!sx)^(yn<0&&!sy)?p==1?2:p==2?1:0:p}let si=(ra?(i+j+!di):(nx-i+j+di))/4;if(sm==8)p=(ra+1)*(si%1>=.5&&noise(~~si)>(nx>6?.5:.25));if(sm==9)p=RI(1,2)*((ra?-1:1)*(.2+noise(xm*10)/2)>yn?ra:!ra);if(sm==10)p=(nx*!ra+(ra?1:-1)*i+j+(ra?!di:di)>ny*.7)?ra?2:1:0;ys=~~(ny*(.5+vr)/4)*2+!cr;if(sm==11) p=(j==ys||j==ys+1)?i%2+1:0;let pv=[0,1+d,2-d];if(sm==12){dr=~~(1+ny*rd/3);pvi=[...Array(dr).fill(0),2-di,1+di];ir=(j+1)%(2+dr);p=pvi[ir]}if(sm==13){pvi=[0,2-di,1+di];ir=(j+1)%3;p=pvi[ir]}p=C(15*rs-5)&&sm>=6&&sm!=7?RI(0,2):p;tr.push(r);tx.push(u);ty.push(v);tp.push(pv[p]);ps[p]+=1;}}function keyPressed(){kc=keyCode;sk=kc==39?sk+1:kc==37?sk-1:(kc>=49&&kc<=56)?kc-48:(kc>=97&&kc<=103)?kc-96:7;sk=sk<1?1:sk>7?7:sk;redraw();}
S=Uint32Array.from([0,1,s=t=2,3].map(i=>parseInt(tokenData.hash.substr(i*8+5,8),16)));R=(a=1)=>a*(t=S[3],S[3]=S[2],S[2]=S[1],S[1]=s=S[0],t^=t<<11,S[0]^=(t^t>>>8)^(s>>>19),S[0]/2**32);RT=()=>R()-R();RD=()=>Math.abs(R()-R());RN=(a,b)=>a+(b-a)*R();RI=(a,b)=>~~RN(a,b+1);RV=(v)=>v[R(v.length)|0];C=(a)=>R()<a/100;M=(i,s,e)=>s+(e-s)*i;pw=(a)=>Math.pow(a/255,2.4);wp=(a)=>Math.pow(a,1/2.4)*255;lc=(p1,p2,p)=>{p1=p1.map(a=>pw(a));p2=p2.map(a=>pw(a));return [wp(M(p,p1[0],p2[0])),wp(M(p,p1[1],p2[1])),wp(M(p,p1[2],p2[2]))];};tr=[];tp=[];tx=[];ty=[];gx=[];gy=[];ps=[0,0,0];let gr,gl;sk=7;ar=4/3;nx=RI(2,9)+~~(21*R()*R());so=C(10)?4:C(75)?8:16;sz=nx*so/4;ss=15+R(15);hd=C(20)?1:C(50)?2:0;mx=C(10)?2:C(25)?8:4;mn=C(97)||sz>40?2:4;cr=C(50);lr=.5+((C(75)||nx<5)?1:-1)*(.1+R(.3));lw=((.625+(.5+R())*(C(20)?R():1))/.25|0)*.25;pd=C(90)?.05:.125*C(10);H=(1-2*pd)/nx;ny=(1+(ar-2*pd)*Math.sqrt(3)/H)|0;A=(ar-2*pd)*2/ny;xt=.05+.02*RT();xr=2000+700*RT();xl=.15+R(.1);xw=RN(.75,2.5)*(sz>20?(1-(sz-20)/30):1);xw=xw<.75?.75:xw;ca=[[6,45,52],[25,47,53],[45,43,54],[106,26,41],[199,35,42],[220,32,47],[244,22,49]];cm=ca.map(a=>a.slice());for(let i=0;i<ca.length;i++){ca[i][0]+=6*RT();ca[i][1]+=RN(-8,12);ca[i][2]+=5*RT();};co=[[4,5,5],[4,5,6],[3,4,5,6],[4,5,6],[0,1,2,3],[0,1,2,3],[0,1,2]];ic=C(3)?2:C(60)?RV([0,3,5]):C(25)?4:RV([1,6]);ni=[0,1,2,3,4,5,6];ni.splice(ic,1);rb=C(1);mo=C(4);bw=C(2);gd=C(35);sc=C(20)&&sz<50&&(lr<.3||lr>.7);db=C(30);ci=[...ca[ic]];cj=gd?[...ca[C(50)?RV(co[ic]):RI(ni)]]:[...ci];cb=[ci[0],ci[1]*((gd||sc)?.2:db?.2+RD()/2:.2+.3*RD()),db?7+(gd?8:10)*RD():93-(gd?3:10)*RD()];i2=RV(co[ic]);c2=!rb&&!gd&&sc?[...ca[i2]]:[0,0,15+R(10)+50*db];rg=(cj[0]<50&&ci[0]<50);ci[2]+=7*db+10*!gd;cj[2]+=7*db-10*!gd;ci[1]+=7*gd-5*db;cj[1]+=7*gd-5*db;c2[2]+=10*db;cl=(C(2.5)&&lr>.3)||((mo||bw)&&(lw==2||C(75)));fc=lr<.5;al=C(5);fs=C(35);if(bw){ci=cj=c2=db?[0,0,93]:[0,0,10];}if(bw&&!db){ss=-20}if(rb||bw)cb=db?[0,0,10]:[0,0,93];if((rg&&cj[0]>ci[0])||(!rg&&ci[0]>cj[0])){ch=ci;ci=[...cj];cj=[...ch]}if(mo&&!bw&&!rb){cb=[...cm[ic]];fp=C(75);ci=cj=c2=[cb[0],cb[1],fp?10:93];if(fp)ss=-12;}ss=al?5:ss;sm=(C(2)&&!(sz>16&&(mx==2||so==4)))?5:C(3)?RI(12,13):C(sz>40?10:15)?RI(6,11):C(25)?1:RI(0,4);if(sm==7&&nx%2&&ny%2)sm=0;sn=R()-.5;pr=RI(1,2)*C(50);[sx,sy]=nx%2?[1,0]:ny%2?[0,1]:RV([[0,1],[1,0],[0,0]]);na=RN(.25,3)*nx*so/40;na2=1.5+R(6);sd=R();sa=C(50);rm=sm==7?7:C(45)?RV([0,5]):C(90)?RI(1,4):6;rd=R();vr=R();ra=RI(0,1);rs=R();sv=R();xo=R()-.5;yo=R()-.5;am=RI(1,6);xo2=R()-.5;yo2=R()-.5;am2=RI(1,6);rv=[-1,-1,1,1];tv=[0,1,1,0];function setup(){windowHeight>=ar*windowWidth?(ww=windowWidth,wh=ar*windowWidth):(ww=windowHeight/ar,wh=windowHeight);ww=ww|0;wh=wh|0;pt=wh/1000;createCanvas(ww,wh);gl=createGraphics(ww,wh);gr=createGraphics(ww,wh,WEBGL);colorMode(HSL);gr.colorMode(HSL);gl.colorMode(HSL);gr.noStroke();gr.smooth();noLoop();noiseSeed(R(100)|0);if(pixelDensity()*wh<2048){px=round(2048/wh);pixelDensity(px);gr.pixelDensity(px);gl.pixelDensity(px)}pd*=ww;A*=ww;H*=ww;for(let i=0;i<nx;i++)for(let j=0;j<ny+1;j++)mT(pd+i*H,pd+j*A/2,A,H,(i+j+cr)%2,2,i,j,(i+j+cr)%2);tl=tp.length;fl=0;for(let i=0;i<tl;i++)fl+=(2*!tp[i]-1)/tl;fs=(fl>=0); if(!ps[0]+!ps[1]+!ps[2]==2){while(1){fi=R(tl)|0;if(pd==0&&(ty[fi][0]<.2*wh||ty[fi][0]>.8*wh))continue;tp[fi]=RI(1,2)*!tp[fi];break;}}if(sm==10)fs=1;if(lr<.5&&so/Math.min(...tr)==2)fc=0;gr.background(...cb);for(let i=0;i<tl;i++){let u=tx[i],v=ty[i],s=so/tr[i],p=tp[i];for(let n=1;n<s;n+=cl+1){let sw=(n%2?lr:1-lr)*lw/s,mag=al?1:(p==0)^fs?1:0;gr.beginShape();for(let i=0;i<4;i++){let xv=M(n/s+rv[i]*sw/2,u[p],u[(p+1+tv[i])%3]),yv=M(n/s+rv[i]*sw/2,v[p],v[(p+1+tv[i])%3]),xn=(xv-pd)/(ww-2*pd),yn=(yv-pd)/(wh-2*pd),mod=hd==1?xn:hd==2?yn:(xn+yn)/2;gr.colorMode(RGB);if(n%2==fc)gr.fill(color(c2[0],c2[1],c2[2]-ss*mag));else if(rb){gr.colorMode(HSL);gr.fill(240*mod,30,45-ss*mag);}else gr.fill(lc(color(ci[0],ci[1],ci[2]-ss*mag).levels,color(cj[0],cj[1],cj[2]-ss*mag).levels,mod));gr.vertex(xv-ww/2,yv-wh/2)}gr.endShape(CLOSE)}}noFill();for(let i=0;i<tl;i++){let u=tx[i],v=ty[i],s=so/tr[i],p=tp[i];for(let n=1;n<s;n+=cl+1){let sw=n%2?lr*lw/s:(1-lr)*lw/s;for(let j=0;j<xr*n*sw*s/sz;j++){let im=n/s+RN(-1,1)*sw/2,xi=M(im,u[p],u[(p+1)%3]),yi=M(im,v[p],v[(p+1)%3]),xf=M(im,u[p],u[(p+2)%3]),yf=M(im,v[p],v[(p+2)%3]),rr=R(),r=R(xl),r1=rr-r/n<0?0:rr-r/n,r2=rr+r/n>1?1:rr+r/n;gl.stroke(...cb,R(xt));gl.strokeWeight(R(xw*pt));gl.line(M(r1,xi,xf),M(r1,yi,yf),M(r2,xi,xf),M(r2,yi,yf))}}}}function draw(){background([0,0,cb[2]>50?100:10]);noFill();strokeWeight(.5*pt);stroke(0,0,cb[2]>50?10:90,.2);if(sk==1)stroke(0,0,cb[2]>50?10:90,.8);if(sk<=2)dT(gx,gy);if(sk==2)stroke(0,0,cb[2]>50?10:90,.8);if(sk>=2&&sk<=5)dT(tx,ty);if(sk>=3&&sk<=5){for(let i=0;i<tl;i++){let u=tx[i],v=ty[i],s=so/tr[i],p=tp[i];fill(0,0,65*((sk==3||sk==4||al)?1:(p==0)^fs?.6:1));for(let n=1;n<s;n+=cl+1){let d=u[0]<u[1]?0:1,sw=(n%2?lr:1-lr)*lw/s;if(sk==3){p=(ps[2]>=ps[0]&&ps[2]>=ps[1])?!d?2:1:(ps[1]>=ps[0]&&ps[1]>=ps[2])?d?2:1:0}stroke(0,0,cb[2]>50?10:90);beginShape();for(let i=0;i<4;i++){let xv=M(n/s+rv[i]*sw/2,u[p],u[(p+1+tv[i])%3]),yv=M(n/s+rv[i]*sw/2,v[p],v[(p+1+tv[i])%3]);vertex(xv,yv)}endShape(CLOSE)}}}if(sk==7||sk==6)image(gr,0,0,ww,wh);if(sk==7)image(gl,0,0,ww,wh);dT=(dx,dy)=>{for(let i=0;i<dx.length;i++){u=dx[i],v=dy[i];triangle(u[0],v[0],u[1],v[1],u[2],v[2])}}}function mT(x,y,a,h,d,r,i,j,di){let s=so/r,u=[x+h*d,x+h-h*d,x+h-h*d],v=[y,y+a/2,y-a/2],xm=(x+h*d/3+!d*h*2/3-pd)/(ww-2*pd),ym=(y-pd)/(wh-2*pd),xn=(xm-.5)*2,yn=(ym-.5)*2,rn=sqrt(sq(yn)+sq(xn)),mod=vr<.5?abs(rd*xn+(1-rd)*yn):(rd*xm+(1-rd)*ym),ob=(v[0]<pd+.1)||(v[0]>pd+A/2*ny-.1);if(r==2){gx.push(u),gy.push(v)}if(ra)mod=1-mod;rfv=[R()<.5+sn,R()<rn,R()>rn,mod<R(),mod>R(),.5<noise(na2*xm*2,na2*ym*2),.5<((am2/3*(atan2(yn+yo2,xn+xo2)/PI+1)+sv)*3)%1,.5<noise(na2*xn,na2*yn)];if(s>mx||(s>mn&&(rfv[rm]||ob))){for(let k=0;k<4;k++)mT(x+(k==1?h/2-!d*h/2:!d*h/2),y+(k==2?a/4:k==3?-a/4:0),a/2,h/2,!k?!d:d,r*2,i,j,di)}else if(pd==0||!ob){let p=RI(0,1)*RI(1,2);if(sm==1)p=round(map(noise(na*xm*2,na*ym*2),.2,.8,0,6,1))%3;if(sm==2){mod=sv<.5?abs(sd*xn+(1-sd)*yn):(sd*xm+(1-sd)*ym);if((sa?1-mod:mod)>R()*R())p=pr}if(sm==3&&rn>R())p=pr;if(sm==4&&rn<R()+.2)p=pr;if(sm==5)p=(pr+constrain(s/mn-1,0,2))%3;if(sm==6)p=~~((am/2*(atan2(yn+yo,xn+xo)/PI+1)+sv)*3)%3;if(sm==7){p=round(map(noise(na*(xn+sx),na*(yn+sy)),.2,.8,0,6,!0))%3;p=(!sy&&abs(yn)<.01)?0:(xn<0&&!sx)^(yn<0&&!sy)?p==1?2:p==2?1:0:p}let si=(ra?(i+j+!di):(nx-i+j+di))/4;if(sm==8)p=(ra+1)*(si%1>=.5&&noise(~~si)>(nx>6?.5:.25));if(sm==9)p=RI(1,2)*((ra?-1:1)*(.2+noise(xm*10)/2)>yn?ra:!ra);if(sm==10)p=(nx*!ra+(ra?1:-1)*i+j+(ra?!di:di)>ny*.7)?ra?2:1:0;ys=~~(ny*(.5+vr)/4)*2+!cr;if(sm==11) p=(j==ys||j==ys+1)?i%2+1:0;let pv=[0,1+d,2-d];if(sm==12){dr=~~(1+ny*rd/3);pvi=[...Array(dr).fill(0),2-di,1+di];ir=(j+1)%(2+dr);p=pvi[ir]}if(sm==13){pvi=[0,2-di,1+di];ir=(j+1)%3;p=pvi[ir]}p=C(15*rs-5)&&sm>=6&&sm!=7?RI(0,2):p;tr.push(r);tx.push(u);ty.push(v);tp.push(pv[p]);ps[p]+=1;}}function keyPressed(){kc=keyCode;sk=kc==39?sk+1:kc==37?sk-1:(kc>=49&&kc<=56)?kc-48:(kc>=97&&kc<=103)?kc-96:7;sk=sk<1?1:sk>7?7:sk;redraw();}
Lines are bent and shaded. There are no wrong turns. [Interaction: press 1-7 or left/right arrow keys to see the stages of sketch construction: 1-grid, 2-divide, 3-tile, 4-bend, 5-shade, 6-color, 7-texture]