memoscan
← all memos

Memo 0x7bad8a42…0fc109 on Ethereum

me-e/10;t+=e){let s=e/n;o&&i%2==0?r.push($(t+e/2,a,s)):r.push($(t,a,s))}i++}return r},doubleSquare:()=>{const r=me/2,e=me/2-r;return[j(e+5,e+5,r-5,he-2*e-10),j(r+e+5,e+5,r-10,he-2*e-10)]},threeCircles:()=>{const r=random()>.5?3:5,e=random(1.5,4);let n=[];const o=me,i=o*random(.05,.25);if(3===r){const r=o/e;n=[$(me/2,he/2-o/2-r/2+i,r),$(me/2,he/2,o),$(me/2,he/2+o/2+r/2-i,r)]}else if(5===r){const r=o/e,a=o/(2*e);n=[$(me/2,he/2-o/2-r-a/2+2*i,a),$(me/2,he/2-o/2-r/2+i,r),$(me/2,he/2,o),$(me/2,he/2+o/2+r/2-i,r),$(me/2,he/2+o/2+r+a/2-2*i,a)]}if(random()>.5)n=n.map((r=>s(r,random(-1,1),me/2,he/2)));else{let r=random(-1,1);n=n.map((e=>s(e,r,me/2,he/2)))}return n},diamond:()=>{const r=me/random(.5,.9);return[U(me/2,he/2,me-r,.85*me)]},geoPack:()=>zr(4),sixPack:()=>zr(6),megaPack:()=>zr(4,!0)},zr=(r,e=!1)=>{let n=random()>.85?-25:0;const o=random(50,100),i=(r,e,o)=>{if(!s.length)return!0;let i=0,a=!0;for(;i<s.length&&a;){const t=s[i];dist(t.x,t.y,r,e)-t.radius/2-o/2-n<0&&(a=!1),i++}return a},a=2*me;let t=a/random(1.5,10);e&&(t=a/1.1,r=4);const s=[];let l=me/100,h=0;for(;s.length<o&&h<1e3;){let r=random(2*PI),e=random(a/2),n=l;const o=me/2+sin(r)*e,m=he/2+cos(r)*e;for(;n<t&&i(o,m,n);)n+=l;n>l&&s.push({x:o,y:m,radius:n}),h++}return s.map((e=>$(e.x,e.y,e.radius,r)))};Or.flock=()=>{const r=[],e=me/6,n=he/6,o=random(2,3.5),i=me/o,a=random(2*PI),t=random(1,4);for(let o=0;o<me;o+=e)for(let l=0;l<he;l+=n){const n=i+random(me/t),h=o+n/2,m=l+n/2;let c=W(o+n/2,l+n/2,e-n/2);c=s(c,a,h,m),r.push(c)}return r},Or.cLevelExecutive=()=>{const r=[],e=round(random(5,8)),n=me/random(1,2),o=n/e-random(me/4/e);for(let i=1;i<e;i++){const a=n/e*i,t=a-o,s=random(2*PI);let l=s+random(2*PI-s);const h=J(me/2,he/2,a,t,s,l);r.push(h)}return r},Or.writer=()=>{const r=[];let e=100,n=-PI/random(6,9)*(random()>.5?1:-1),o=round(random(5,7)),i=random()>.8?random(-200,200):0,a=e/o/2;for(let t=0;t<o;t++){let l=me/2-a+e*t/1.5,h=he/2-a+i/o*t,m=e-abs((t-o/2)*e/o),c=4*m,d=random(2*PI),y=P([Q(l,h,m,c),5,j(l-m/2*.9,h-c/2,.9*m,c),5,J(l,h,2*m,.99*m,d,d+PI,48),2]);y=s(y,n+random(-.2,.2),l,h),r.push(y)}return r};const Ar=(r,e=10)=>r.map((r=>{const n=[];return r.forEach(((o,i)=>{if(n.push(o),i<r.length-1){const a=r[i+1],t=dist(o.x,o.y,a.x,a.y)/e;for(let r=0;r<t;r++){const e=r/t,i={x:lerp(o.x,a.x,e),y:lerp(o.y,a.y,e)};n.push(i)}}})),n}));const Rr=(r,e=1)=>{let n=q(random(6,12))*e,o=q(75);r=Ar([r],q(5))[0];for(let e=n;e>0;e-=.2)e===n-1&&noStroke(),beginShape(),r.forEach((r=>{let i=e/n,a=noise(r.x/o,r.y/o)*n*i,t=r.y+a;vertex(r.x,t)})),endShape()},Fr=(r,e)=>{const n=a(r);let o=y(width/2,height/2,n.x,n.y),i=q(random(3,12)),t=q(85),s="out"===e?1:-1;r=Ar([r],q(5))[0];for(let e=i;e>0;e-=.2){let n=cos(o)*e*s,a=sin(o)*e*s,l=e/i;e===i-1&&noStroke(),beginShape(),r.forEach((r=>{let e=noise(r.x/t,r.y/t)*i*l,o=r.x+n,s=r.y+a+e;vertex(o,s)})),endShape()}},Tr=(r,e,n,o,i)=>{e.forEach(((e,i)=>{if(o[i].d1)return;const a=A(n.p,5);fill(a),stroke(R(a,-10)),V(1.2),"down"===r?Rr(e):"center-in"===r?Fr(e,"in"):"center-out"===r?Fr(e,"out"):"minimal"===r?Rr(e,.65):"none"===r&&Rr(e,0)})),Gr(e,i,"solo")},Nr=.8,Br=(r,e,n)=>{fill(R(n,5)),noStroke(),circle(r,e,random(4,7)*M*Nr)},Dr=(r,e,n)=>{stroke(R(n,5)),noFill(),V(1);const o=random(3,7);rect(r-o/2,e-o/2,o*M*Nr)},Mr=(r,e,n)=>{stroke(R(n,5)),noFill(),V(1);const o=random(6,9)*Nr*M;beginShape(),vertex(r-o/2,e),vertex(r,e-o/2),vertex(r+o/2,e),vertex(r,e+o/2),vertex(r-o/2,e),endShape()},qr=(r,e,n)=>{fill(R(n,5)),noStroke(),V(1);const o=random(6,9)*Nr*M;beginShape(),vertex(r-o/2,e),vertex(r,e-o/2),vertex(r+o/2,e),vertex(r,e+o/2),vertex(r-o/2,e),endShape()},Vr=(r,e,n)=>{noFill(),V(1.5*Nr),circle(r,e,random(4,7)*M*Nr)},_r=(r,e,n)=>{const o=random(3,5)*M*Nr;stroke(R(n,5)),V(1.6),line(r-o/2,e-o/2,r+o/2,e+o/2),line(r+o/2,e-o/2,r-o/2,e+o/2)},$r=["solidCap",10,"xCap",10,"emptyCap",5,"squareCap",4,"filledDiamondCap",6,"diamondCap",3],jr=(r,e)=>{const n=[],o=[],i=q(4),a=q(1);let t=0;r.forEach((r=>{if(!r.length)return t++,!1;r.forEach((r=>{let s=r.x<a||r.x>width-a||r.y<a||r.y>height-a,l=0;for(;!s&&l<n.length;){const e=n[l];r.x-i<e.x&&r.x+i>e.x&&r.y-i<e.y&&r.y+i>e.y&&(s=!0),l++}s||(n.push(r),o.push(e[t]))})),t++})),n.forEach(((r,e)=>{const n=o[e].color;((r,e,n,o)=>{({solidCap:Br,xCap:_r,emptyCap:Vr,squareCap:Dr,filledDiamondCap:qr,diamondCap:Mr})[r](e,n,o)})(Wr(),r.x,r.y,n.a4)}))},Wr=()=>P($r);let Ur=-1,Jr=0;const Qr=(r,e,n,o,i,s)=>{const l=r.length,h=n.length;if(-1===Ur)n.forEach(((r,e)=>{noStroke();const n=o.d8[e];((r,e,n=!1)=>{r.forEach((r=>{e&&fill(e),beginShape(),r.forEach((r=>vertex(r.x,r.y))),endShape(),r.forEach(((r,e)=>{n&&(circle(r.x,r.y,10),fill(0),textSize(22),text(e,r.x,r.y))}))}))})(r,A(n.a4,0))}));else if(Ur<h){noStroke();const e=Ur,s=n[e],l=o.d8[e];if(s.length>0){const r=15;s.forEach(((n,o)=>{if(n.length>0){if("random"===Pr.backgroundLighting)fill(A(l.a4,6));else if("linear-from-top"===Pr.backgroundLighting){const e=a(n).y/height;fill(R(l.a4,r/2+e*-r))}else if("linear-from-bottom"===Pr.backgroundLighting){const e=a(n).y/height;fill(R(l.a4,-r/2+e*r))}stroke(l.stroke),V(.5),beginShape(),n.forEach((r=>vertex(r.x,r.y))),endShape();const i=ke[e][o];tr(n,l,random(2*PI),i,.1,1,.85)}}))}if(Ur===h-1){((r,e)=>{let n=width/30;fill(e.a4),drawingContext.filter=`blur(${n*pixelDensity()}px)`,r.forEach(((r,e)=>{beginShape(),(r=t(r,0,height/100)).forEach((r=>vertex(r.x,r.y))),endShape()})),drawingContext.filter="none"})(r.filter(((r,e)=>!o.a4Polygons[e].d1)),z("c3",0)),Tr(Pr.backfilled,r,z("c8",0),o.a4Polygons,o)}"bottom"===Pr.linesOnTop&&Ur===h-1&&Kr(i,o)}else if(Ur<h+1)((r,e,n)=>{let o=random()>.5?"overlay":"multiply";noStroke(),r.forEach(((r,i)=>{const a=e[i].type,t=n[i];if("pop"===a){drawingContext.globalCompositeOperation="source-over",drawingContext.globalAlpha=.9;const n=random(2*PI);nr(r,e[i],n),tr(r,e[i],n,t),drawingContext.globalAlpha=1}else"shade"===a&&(drawingContext.globalCompositeOperation=o,fill(0,0,0,random(.02,.05)),"overlay"===o&&fill(0,0,100,random(.02,.05)),beginShape(),r.forEach((r=>{vertex(r.x,r.y)})),endShape())})),drawingContext.globalCompositeOperation="overlay",r.forEach(((r,e)=>{stroke(0),"overlay"===o&&stroke(0,0,100),V(.25),noFill(),beginShape(),r.forEach((r=>{vertex(r.x,r.y)})),endShape()})),drawingContext.globalCompositeOperation="source-over"})(e,o.e0,ve);else if(Ur<l+h+1){let e=0;for(;e<te&&Ur-1<l+h;){noStroke();const n=Ur-h-1,i=r[n],t=o.a4Polygons[n],s=a(i),l=we[n];fill(A(t.a4,15)),stroke(t.stroke);let m=t.d9;if("centered"===Pr.fillDirection&&(m=atan2(height/2-s.y,width/2-s.x)),t.d1||("linear"===Pr.gradientType?nr(i,t,m):"radial"===Pr.gradientType&&or(i,t,m)),t.d1)switch(t.d1Type){case"leaf":gr(i,t,l);break;case"evenLines":sr(i,t,m,l);break;case"dots":ur(i,t,l);break;case"spacedLines":sr(i,t,m,l,.5);break;case"perspectiveLines":lr(i,t,l,m);break;case"perspectiveDots":hr(i,t,l,m)}else"leaf"===t.fillType?gr(i,t,l):"evenLines"===t.fillType?sr(i,t,m,l):"shattered"===t.fillType?yr(i,t,l):"perspective"===t.fillType&&lr(i,t,l,m);!t.d1&&l.area>2&&tr(i,t,m,l,1),er(i,t),Pr.visualVertices&&kr(i,t),e++,Ur++}Ur-=1}else"top"===Pr.linesOnTop&&Kr(i,o),s();Ur++},Kr=(r,e)=>{r.forEach(((r,n)=>{((r,e)=>{(0,{dashed:br,dotted:Sr}[e.style])(r,q(e.spacing),e.sz,e.color)})(r,e.b0s[n])})),jr(r,e.b0s)},Zr=(r,e,n,o,i)=>{if(0===Jr)((r,e,n)=>{r.forEach(((r,n)=>{const o=e.a4Polygons[n];if(o.d6){const e=we[n],i=ue[n];mr(r,25*M,o.a8.fill?o.a8.fill:o.a4.l),vr(i,e,o,.5,.5,.9),beginShape(),stroke(o.stroke),noFill(),r.forEach((r=>{vertex(r.x,r.y)})),vertex(r[0].x,r[0].y),endShape();const a=o.d9+PI/2;tr(r,o,a,e,.06)}})),n&&n()})(r,n);else if(1===Jr)Pr.hasBorder&&(Pr.hasCanvasSpray&&fr(o.x,o.y,n.c0.l,n.c0.h,n.c0.mode,.9),((r,e,n)=>{const o=width/ce;let i=[j(0,0,width,o),j(0,0,o,height),j(width-o,0,o,height),j(0,height-o,width,o)];drawingContext.fillStyle="white",fill(0,0,255),noStroke(),i.forEach((r=>{beginShape(),r.forEach((r=>vertex(r.x,r.y))),endShape()})),r&&i.forEach((r=>{xr(r),Kr(e,n),drawingContext.restore()}))})("NONE"!==Pr.linesOnTop,e,n));else if(2===Jr)Pr.hasCanvasSpray&&fr(o.x,o.y,n.c0.l,n.c0.h,n.c0.mode,.1);else if(3===Jr)"none"!==Pr.dripAmount&&Gr(r,n,Pr.dripAmount,Pr.a7);else if(4===Jr){Pr.b8;((r,e,n)=>{r.forEach(((r,n)=>{const o=e.a4Polygons[n];if(!o.d1){const r=we[n],e=ue[n];vr(e,r,o,.0075,1,1)}}))})(r,n)}else i();Jr++};const re=class{constructor(r){this.useA=!1;let e=function(r){let e=parseInt(r.substr(0,8),16),n=parseInt(r.substr(8,8),16),o=parseInt(r.substr(16,8),16),i=parseInt(r.substr(24,8),16);return function(){e|=0,n|=0,o|=0,i|=0;let r=(e+n|0)+i|0;return i=i+1|0,e=n^n>>>9,n=o+(o<<3)|0,o=o<<21|o>>>11,o=o+r|0,(r>>>0)/4294967296}};r?(this.prngA=new e(r.substr(2,32)),this.prngB=new e(r.substr(34,32))):(this.prngA=new e(tokenData.hash.substr(2,32)),this.prngB=new e(tokenData.hash.substr(34,32)));for(let r=0;r<1e6;r+=2)this.prngA(),this.prngB()}random_dec(){return this.useA=!this.useA,this.useA?this.prngA():this.prngB()}random_num(r,e){return r+(e-r)*this.random_dec()}random_int(r,e){return Math.floor(this.random_num(r,e+1))}random_bool(r){return this.random_dec()<r}random_choice(r){return r[this.random_int(0,r.length-1)]}b2(r){const e=this.random_dec();let n=!1,o=1;const i=r.reduce(((r,e,n)=>n%2==1?r+e:r),0),a=i*e;let t=0;for(;!n&&o<r.length;)a-r[o]<t&&(n=r[o-1]),t+=r[o],o+=2;return n}};let ee=[],ne=null,oe=1;let ie="normal",ae="normal"===ie?20:1,te=1===ae?100:2;let se=[];const le=.75,he=1200,me=he*le,ce=24;let de=[],ye=[],ge=[],pe=[],ue=[],xe={b0s:[],a4Polygons:[],e0:[],d8:[],shadow:[]},fe={x:0,y:0},we=[],ke=[],ve=[],Le="NEW",Se={};window.setup=()=>{colorMode(HSL);let r=1;const e=new re;var n;tokenData.hash&&(r=1e17*e.random_dec()),randomSeed(r),noiseSeed(r),window.seedValue=r,pixelDensity(2),createCanvas(window.innerHeight*le,window.innerHeight),n=height/1200,M=n,window.CONFIG=Se=Hr(e);o=Se.palette,i=Se.colorMod,X="exclusive"===i?F(I[o]):I[o];var o,i;const a=D(Se.c1).cb;se=a.slices,ye=((r,e)=>{const n=(0,Or[r])(),o=Ar(n);return e?o:n})(Se.b9,Se.b8),ge=(r=>{let e;return"circle"===r?e=[$(me/2,he/2,me,128)]:"diamond"===r&&(e=[U(me/2,he/2,me,me)]),e})(Se.secondaryGeometry),Re(),Se.oneLastSkewTho&&se.splice(se.length-1,0,{a9:random()>.5?.5:-.5,b0:B(7,2),a6:random()>.5?-1:1,b1:0})},window.draw=()=>{"NEW"===Le?(background(255),Ce(),Pe(),"DEBUG"!==Se.fillStrategy&&background(z("c2").a4),Le="RENDER