memoscan
← all memos

Memo 0x12e24355…a5a3d1 on Ethereum

[1,()=>{console.log("Artist 4. Fahad Karim -- platform 1");class t{constructor(){this.t=!1; let t=function(t){let n=parseInt(t.substr(0,8),16),e=parseInt(t.substr(8,8),16),i=parseInt(t.substr(16,8),16),h=parseInt(t.substr(24,8),16);return function(){n|=0,e|=0,i|=0,h|=0;let t=(n+e|0)+h|0;return h=h+1|0,n=e^e>>>9,e=i+(i<<3)|0,i=i<<21|i>>>11,i=i+t|0,(t>>>0)/4294967296}};this.i=new t(tokenData.hash.substr(2,32)),this.h=new t(tokenData.hash.substr(34,32));for(let t=0;t<1e6;t+=2)this.i(),this.h()}l(){return this.t=!this.t,this.t?this.i():this.h()}p(t=0,n=1){return Array.isArray(t)?this.o(t):t+(n-t)*this.l()}u(t,n){return Math.floor(this.p(t,n+1))}o(t){return t[this.u(0,t.length-1)]}_(t,n){let e=n.reduce(((t,n)=>t+n),0),i=n.slice().map((t=>t/e)),h=this.l(),r=0;for(let n=0;n<i.length;n++)if(r+=i[n],h<r)return t[n]}}console.log("'All The Places We Danced'\nFahad Karim, 2024\n\nBright Moments | Venice, Italy\n\nToken ID: %s\nToken seed: %s",tokenData.tokenId,tokenData.hash);let n=1,e=null,i=null,h=-1,r=0;new p5((function(p){let i=[],l=new t,c=4294967296*l.p();p.noiseSeed(c),p.marg=0,p.cw=1800,p.ch=3200;let _=null,w=null;function g(){_=Math.max(document.documentElement.clientWidth,window.innerWidth||0),w=Math.max(document.documentElement.clientHeight,window.innerHeight||0),function(){let t=_,e=w,i=(p.cw+2*p.marg)/(p.ch+2*p.marg)*e;p.cw,p.marg,p.ch,p.marg;n=i<t?e/(p.ch+2*p.marg):t/(p.cw+2*p.marg)}();let t=Math.round(p.cw*n),e=Math.round(p.ch*n);cnv=p.createCanvas(t,e)}function k(t){let n=l.p(.2,.3);for(let e=0;e<i.length;e++){let h=i[e];h.M||((t+e)%2==0?h.g(-n,0):h.g(0,n),null!=h.top&&(h.top.d.x=h.a.x,h.top.d.y=h.a.y,h.top.c.x=h.b.x,h.top.c.y=h.b.y))}}function v(t,n,e,i){t.beginPath(),t.arc(n,e,i,0,2*Math.PI,!1),t.stroke()}function b(t,n=1,e=1,i=1,h=!0,r=0){let s=t.canvas.getContext("2d");t.push(),t.translate(p.cw/2,p.ch/2);let o=p.cw,u=p.ch,a=12e3*e,f=p.color(0,0,r,.2*n);t.stroke(f),t.noFill(),t.strokeWeight(.16);let c=33*i;for(let e=0;e<2;e++)for(let i=0;i<a;i++){1==e&&i%1e3==0&&h&&(f=x(),f=p.color(p.hue(f),p.saturation(f),p.brightness(f),.2*n),t.stroke(f)),v(s,l.u(-.75*o,.75*o),l.u(-.75*u,.75*u),l.p(.75,2)*c)}t.pop()}function D(t){let n=l.p(.2,.9),e=p.cw*t,h=l.p(.008,.014)*p.cw*p.map(r,0,50,1,.3,!0),s=h*l.p(.25,.5),o=l.p(-3,3)*h,u=M(e-h/2,1.1*p.ch),a=M(e+h/2,1.1*p.ch),f=M(e-s/2+o,(1-n)*p.ch),c=M(e+s/2+o,(1-n)*p.ch),_=new L(f,c,a,u,G.k,!0);l.p()<.2&&_.g(-.01,.01),i.push(_)}function F(t,n,e){let h=(p.map(t,5,60,.3,.9,!0)+l.p(-.1,.1))/t/Math.pow(.968,t),r=h*l.p(2,3),s=l.p();s<.2?r*=l.p(1.2,1.7):s<.3&&(r*=l.p(.8,1));let o=function(t,n,e=.5,i=.5,h=!0){let r=f(e-.5*t,i-.5*n),l=f(e+.5*t,i-.5*n),p=f(e+.5*t,i+.5*n),s=f(e-.5*t,i+.5*n),o=new L(r,l,p,s);h&&(o.g(-.2,.3),o.a=d(o.a,o.b,.25),o.b=d(o.b,o.a,.25));return o}(r,h,n,e+.12,!1);o.content=l._([G.v,G.D,G.F,null,G.k,G.I,G.R],[.2,.15,.2,.3,.05,.1,.05]),i.push(o);let u=o;for(let n=0;n<t;n++){let e=Math.min(.05,n*l.p(0,.0027)-.29),h=Math.min(.4,.32+n*l.p(0,.0027));e*=p.map(n,0,.4*t,.58,1,!0),h*=p.map(n,0,.4*t,.58,1,!0);let r=p.map(u.m()/p.cw,.01,.3,-.07,.11),mult=l.p(.8,1),s=l._([G.v,G.D,G.F,G.S,G.I,G.k,G.R],[.3,.15,.2,.08,.18,.05,.15]);n==t-1?(e=-.45,h=-.25,mult=l.p(2,4),s=l._([G.T,G.V,G.A,G.H],[.5,.1,.3,.05])):n==t-2&&l.p()<.4?(e=-.1,h=.2):l.p()<.1&&(e=0,h=0),e+=r,h+=r;let o=u.K(mult,e,h);o.content=s,i.push(o),u=o}}p.hm=0,p.vm=0,p.setup=function(){p.colorMode(p.HSB),p.ink=p.color(0,0,100),s(p,l),r=l._([l.u(15,20),l.u(21,29),l.u(30,39),l.u(40,45)],[.2,.35,.25,.2]),o(),g(),p.pen=2.1,function(){i=[];let t=l.u(13,16)+p.map(r,0,50,0,10,!0),n=[];for(let e=0;e<t;e++){let i=l.p(-.07,.07);0==e?i=l.p(-.05,0):e==t-1&&(i=l.p(0,.05));let h=e*(1.1/(t-1))-.05+i;n.push(h)}u(n);let e=l.p(.6,.7)-p.map(r,0,50,0,.1,!0);for(let i=0;i<n.length;i++){let h=l.u(7,25);i<.3*t&&(h=l.u(30,60));let r=n[i]+l.p(-.1,.1);r>.05&&r<.95&&l.p()<e&&D(r),F(h,n[i],1)}}();for(let t=0;t<r;t++)k(t);p.noLoop()},p.draw=function(){p.scale(n,n),function(t){t.strokeJoin(p.MITER),t.strokeCap(p.SQUARE),a(t,1),t.push();let n=q(h,20,8,.3);t.noStroke();let e=l.p(1.1,1.85),i=p.cw*l.p(.28,.35)*e,r=l.p(.6*i,p.cw-.6*i),s=l.p(.75*i,.35*p.ch),o=(M(r,s),p.cw,0),u=10*p.ch,f=p.hue(n),c=.64*p.saturation(n),_=(11==h||10==h?.55:.45)*p.brightness(n),d=(Math.floor(p.ch/5),.57),w=.59,g=p.ch;for(;g>0;){c+=l._([1,-1],[d,.41]),_+=l._([1,-1],[w,.41]),f+=l.p([1,0,-1]);let n=l.p(5,15),e=p.color(f,Math.min(97,c),Math.min(97,_),1);t.fill(e),g-=n,t.rect(0,g,p.cw,n+3);let i=Math.abs(g-s);i<100&&i<u&&(o=f,u=i),c>84?d--:c<3&&d++,_>89?w--:_<13&&w++}!function(){p.push(),p.noStroke();let t=l.u(20,40);for(let n=0;n<t;n++){p.fill(p.color(0,0,100,l.p(.5,.75)));let t=l.p(),n=.25*p.cw*(.003+t*t*.01),e=l.p(3*n,p.cw-3*n),i=l.p(3*n,.9*p.ch);m(p,e,i,n/2,null,null,2)}p.pop()}();let k=.68;10==h||2==h?k=.73:11==h&&(k=.82);let v=p.color(o,4,100,k),b=p.color(o,Math.min(95,1.12*p.saturation(v)),Math.min(95,1.12*p.brightness(v)),.9*k);a(t,1),t.fill(v),t.stroke(b),m(t,r,s,i/2,null,null,.75/(1.2*e)),t.pop()}(p),function(){p.push(),a(p,1);for(let t=0;t<i.length;t++)i[t].draw(p);p.pop()}(),function(){p.push(),p.noStroke(),p.fill(p.color(0,0,0,.9));let t=l.u(50,100);for(let n=0;n<t;n++){let t=l.p(5,p.cw-5),n=l.p(5,p.ch-5);p.ellipse(t,n,l.p(2,2.4),l.p(2,2.4))}p.pop()}(),b(p,.3,10,.18,!1,10),b(p,.3,45,.2,!0,90)},p.keyPressed=function(){let t="VeniceFinale_"+("000"+parseInt(tokenData.tokenId)%1e6).substr(-3)+"_FahadKarim";80!==p.keyCode&&74!=p.keyCode||p.saveCanvas(t,80==p.keyCode?"png":"jpg")}}));let l=[350,80,32,1.5,0,0,18,60,28,1,0,0,18,85,75,2,0,1,22,60,93,1.6,0,1,22,26,0,1.1,0,0,36,25,99,1.8,0,3,40,40,91,1.5,0,1,42,93,96,1.1,0,0,115,35,67,.4,0,0,191,65,60,.6,0,2,195,85,30,.7,0,1.5,4,88,55,1,0,1];function s(t,n){p=t,r_=n}function o(){let t=l,n=t.length/6;i=[],e=[];let r=[];for(let h=0;h<n;h++){i.push(h),e.push(t[6*h+3]+r_.p(-.1,.1));let n=t[6*h+5];r.push(n)}h=r_._(i,r),e[h]*=.5}function u(t){for(let n=t.length-1;n>0;n--){const e=Math.floor(r_.p()*(n+1));[t[n],t[e]]=[t[e],t[n]]}}function a(t,n){t.strokeWeight(n*p.pen)}function f(t,n){return p.createVector(.1*p.cw+.8*p.cw*t,.1*p.ch+.8*p.ch*n)}function c(t,n,e){return.5*Math.abs((n.x-t.x)*(e.y-t.y)-(e.x-t.x)*(n.y-t.y))}function _(t,n,e=.01,i=!1){let h=[t.a,t.b,t.c,t.d],r=h[n],l=h[(n+1)%4],p=h[(n+3)%4],s=r.dist(l),o=r.dist(p),u=i&&o<e?.8*o:e,a=d(r,l,i&&s<e?.8*s:e,i),f=d(r,p,u,i).sub(r);return a.add(f)}function M(t,n){return p.createVector(t,n)}function d(t,n,e,i=!1){return i?function(t,n,e){let i=e/t.dist(n);return p5.Vector.lerp(t,n,i)}(t,n,e):p5.Vector.lerp(t,n,e)}function w(t,n){return p5.Vector.sub(t,n)}function g(t,n){t.vertex(n.x,n.y)}function k(t,n,e,i){t.bezierVertex(n.x,n.y,e.x,e.y,i.x,i.y)}function v(t,n,e){!function(t,n,e,i,h,r=8){t.push(),t.noFill(),t.beginShape(),R(t,n,e,i,h,r),t.endShape(),t.pop()}(t,n.x,n.y,e.x,e.y)}function b(t,n){return Math.abs(2*Math.abs(t-n/2)/n-1)}function D(t,n=5e-4){return t+p.cw*(p.noise(.01*t)-.5)*n}function F(t,n,e,i,h=1){t.push(),t.noStroke(),t.fill(n);let r=e.dist(i),l=r_.p(1.5,3)/r,p=0,s=2*h,o=3*h,u=r_.p(.8,2);for(;p<1&&1-p*u>0;){let n=d(e,i,p);t.ellipse(n.x,n.y,(1-p*u)*r_.p(s,o),(1-p*u)*r_.p(s,o)),p+=l}t.pop()}function I(t,n,e,i,h,r=8){let l=[];return t.beginShape(),l=l.concat(R(t,n.x,n.y,e.x,e.y,r)),l=l.concat(R(t,e.x,e.y,i.x,i.y,r)),l=l.concat(R(t,i.x,i.y,h.x,h.y,r)),l=l.concat(R(t,h.x,h.y,n.x,n.y,r)),t.endShape(),l}function R(t,n,e,i,h,r){r*=1.2;let l=M(n,e),s=M(i,h),o=r_.u(0,1e3),u=r_.u(0,1e3),a=[],f=Math.round(l.dist(s)/2);for(let n=0;n<f;n++){let e=d(l,s,n/f),i=S(e,l,s,(c=o+e.x,_=u+e.y,(p.noise(.01*c,.01*_)-.5)*b(n,f)*r));a.push(i),t.vertex(i.x,i.y)}var c,_;return a}function m(t,n,e,i,h=null,r=null,l=1){null==h&&(h=0),null==r&&(r=2*p.PI);let s=[],o=Math.floor(11*i),u=2*p.PI/o,a=p.map(i,0,.2*p.cw,1,500,!0);a=1/a,a*=l,t.beginShape();for(let l=0;l<=o;l++){let o=l*u+h;if(o>r)break;let f=D(n+i*Math.cos(o),.001),c=D(e+i*Math.sin(o),.001),_=p.map(p.noise(f*a,c*a),0,1,.8,1,!0);f=n+i*_*Math.cos(o),c=e+i*_*Math.sin(o),t.vertex(f,c),s.push(M(f,c))}return t.endShape(),s}function S(t,n,e,dist){let i=w(e,n).setMag(dist).copy();return i.rotate(-p.HALF_PI),p5.Vector.add(t,i)}function T(t,n,e,dist){let i=w(e,n).setMag(dist);return p5.Vector.add(t,i)}function V(t,n,e=1){return t.copy().rotate(n*p.PI/2).setMag(e)}function y(t,n,e,i){let h=p5.Vector.add(t,n),r=p5.Vector.add(e,i),l=E(t,h),s=E(e,r),o=-l,u=-s,a=A(l,h),f=A(s,r),c=(1*f-1*a)/(1*o-1*u),_=(a*u-f*o)/(1*o-1*u);return p.createVector(c,_)}function A(t,n){return n.x*t-n.y}function E(t,n){if(t.x==n.x)return 1e6;return(n.y-t.y)/(n.x-t.x)}function H(t,n){let e=M(10,0),i=w(n,t);return e.angleBetween(i)}function K(t,n,e,i,h=0,r=null){let l=[],s=H(n,e),o=i*p.PI/2,u=n.x,a=n.y,f=n.dist(e),c=0,_=null==r?2500:r,d=0;l.push(M(u,a));let w=0;r_.u(100,180);for(;d<_;){let t=N(u,a,s-o+w,s+o+w);w+=h,u+=t.x,a+=t.y;let n=M(u,a),i=n.dist(e),_=H(n,e);if(i>f?c++:c=0,null==r){if(_>s+p.PI/2&&_<s+1.5*p.PI)break;if(i>2*f||c>3)break}l.push(n),f=i,d++}return l}function U(t,n,e){let i=t.U;i.push(),i.fill(p.color(p.hue(t.j),p.saturation(t.j)+12,p.brightness(t.j)+8)),v(i,t.c,t.d);let h=t.a.dist(t.b),r=t.c.dist(t.d),l=p.cw*p.map(r/p.cw,0,.25,.005,.015,!0),s=Math.max(1,Math.floor(Math.min(h,r)/l));l=Math.min(h,r)/s;let o=e?.7:1,u=r_._([r_.p(.2,.7),0],[.9,.1]),a=r_._([r_.p(.5,.75),r_.p(.75,1)],[.4,.6]),f=r_.p([-1,1])*r_.p(0,.004);for(let e=0;e<s;e++){let h=(e+.5)/s,r=h-.5/s,c=h+.5/s,_=r_.p(o,1),M=d(t.d,t.a,_),v=d(t.c,t.b,_),b=t.c.copy(),D=t.d.copy(),F=(d(M,v,r+.5*(c-r)),d(D,b,c-.5*(c-r)),d(M,v,r+.5*(c-r)*a)),I=d(M,v,c-.5*(c-r)*a),R=d(D,b,c),m=d(D,b,r),A=(m.dist(F),R.dist(I),K(0,m,F,u,f)),E=K(0,R,I,u,f).reverse(),H=K(0,d(m,R,.5),d(F,I,.5),u,f);if(A.length<3||E.length<3)return;i.beginShape(),g(i,m);for(const t of A)g(i,t);let U=A[A.length-2],j=A[A.length-1],z=E[0].copy(),B=E[1];if(n==J.B&&j.dist(z)>.1*l){let t=w(j,U),n=w(z,B),e=V(t,1),h=(y(j,e,z,n),Math.PI,e.angleBetween(n),Math.PI,j.dist(z)),r=T(j,U,j,.7*h),l=T(z,B,z,.7*h),p=T(j,U,j,h),s=T(z,U,j,h),o=d(p,s,.5),u=d(p,s,.25),a=d(p,s,.75),f=S(u,j,z,h),c=S(o,j,z,h),_=S(a,j,z,h);k(i,r,f,c),k(i,_,l,z)}for(const t of E)g(i,t);g(i,R),i.endShape(),i.push(),i.noStroke(),i.fill(p.ink);for(let t=3;t<H.length;t+=2){let n=(H.length-.8*t)/H.length;r_.p()<.8&&i.ellipse(H[t].x,H[t].y,n*r_.p(2,3),n*r_.p(2,3))}i.pop()}i.pop()}function j(t,n=!1){U(t,J.C,n)}function z(t,n=!1){U(t,J.B,n)}function B(t){!function(t,n){let e=t.a.dist(t.b),i=t.c.dist(t.d),h=t.U,r=p.cw*r_.p(.01,.05),l=Math.max(2,Math.floor(Math.min(e,i)/r));h.push();for(let e=0;e<l;e++){let i=d(t.a,t.b,e/l),r=d(t.a,t.b,(e+1)/l),p=d(t.d,t.c,e/l),s=d(t.d,t.c,(e+1)/l);new L(i,r,s,p,n).draw(h)}h.pop()}(t,null)}function C(t,n,e,i){let h=e.U;h.push();let r=d(e.d,e.a,t),l=d(e.d,e.a,n),s=d(e.c,e.b,t),o=d(e.c,e.b,n),u=new L(l,o,s,r,i),a=w(u.b,u.a),f=w(u.c,u.d),c=a.copy(),_=f.copy();c.rotate(p.HALF_PI),_.rotate(-p.HALF_PI),a_to_b_rotated2=c.copy(),d_to_c_rotated2=_.copy();let M=y(u.a,c,u.d,f),g=y(u.d,_,u.a,a),k=y(u.b,c,u.d,f),v=y(u.c,_,u.a,a),b=u.a.dist(M),D=u.d.dist(g),F=u.b.dist(k),I=u.c.dist(v);c.setMag(b),_.setMag(D),a_to_b_rotated2.setMag(F),d_to_c_rotated2.setMag(I);let R=p5.Vector.add(u.a,c),m=p5.Vector.add(u.d,_),S=p5.Vector.add(u.c,d_to_c_rotated2),T=p5.Vector.add(u.b,a_to_b_rotated2),V=e.P(R),A=e.P(m),E=e.P(S),H=e.P(T);V?u.d=R:A&&(u.a=m),E?u.b=S:H&&(u.c=T),u.draw(h),h.pop()}function P(t,n,e,i=!1){let h=t.W(n),r=t.W(e),l=w(h[1],h[0]);return w(r[1],r[0]).angleBetween(l)}function Q(t,n,e=1){let i=p.brightness(n);return t?Math.max(28,i-7*e):Math.min(i,96,i+9*e)}function W(t,n,e=1){let i=p.saturation(n);return t?Math.min(90,i+13*e):Math.min(98,i+15*e)}function q(t,n=0,e=0,i=1){let h=l,r=0==t?0:1,s=(h[6*t]+r_.p(-12*i,12*i)+360)%360,o=h[6*t+1],u=h[6*t+2];o=.5*(50-o)+o,u=.4*(50-u)+u;let a=Math.min(100,Math.max(0,-25+n+(o+r*r_.p(-10*i,10*i)))),f=Math.min(100,Math.max(0,-6+e+(u+r*r_.p(-10*i,10*i))));return p.color(s,a,f,1)}function x(t=0,n=0){return q(r_._(i,e),t,n)}const G={H:1,A:2,V:3,T:4,v:14,F:5,q:6,S:7,I:8,D:9,k:10,R:11},J={C:12,B:13};class L{constructor(t,n,e,i,h,r=!1){this.a=t,this.b=n,this.c=e,this.d=i,this.content=h,this.M=r,this.G=!0,this.j=x(0,this.M?3:0),this.top=null,this.bottom=null,this.J=r_.p()<.75}L(t,n=!1,e=!0){let i=_(this,0,t,n),h=_(this,1,t,n),r=_(this,2,t,n),l=_(this,3,t,n);return e&&(this.a=i,this.b=h,this.c=r,this.d=l),[i,h,r,l]}draw(t){this.U=t,t.push();let n=null==this.top?1.25:1;p.ink=p.color(p.hue(this.j),W(this.J,this.j,n),Q(this.J,this.j,n)),t.stroke(p.ink),t.fill(this.j),a(t,r_.p(.9,1.2)),null==this.content||this.content==G.k?(this.N(),this.G&&function(t,n,e){let i=e.a.dist(e.d),h=(e.b.dist(e.c),Math.floor(i/r_.p(4,6)));for(let i=1;i<h;i++)F(t,n,d(e.a,e.d,i/h),d(e.b,e.c,i/h))}(t,p.ink,this)):this.content==G.H?j(this,!1):this.content==G.A?j(this,!0):this.content==G.V?z(this,!1):this.content==G.T?z(this,!0):this.content==G.v?function(t){let n=t.U;n.push();let e=r_.p(.005,.015)*p.ch,i=Math.max(1,Math.round(t.O()/e)),h=r_.p([[G.F,null],[null],[null,G.I]]),r=1/i;for(let n=0;n<i;n++)C(n*r,(n+1)*r,t,h[n%h.length]);n.pop()}(this):this.content==G.F?(this.N(),function(t){let n=t.a.dist(t.b),e=t.c.dist(t.d),i=t.U,h=p.cw*r_.p(.007,.01),r=Math.floor(Math.max(n,e)/h);i.push(),i.stroke(p.ink);for(let n=0;n<r;n++)v(i,d(t.a,t.b,n/r),d(t.d,t.c,n/r));i.pop()}(this)):this.content==G.q?(this.N(),function(t){let n=t.a.dist(t.d),e=t.b.dist(t.c),i=t.U,h=p.ch*r_.p(.008,.015),r=Math.max(1,Math.floor(Math.max(n,e)/h));i.push(),i.stroke(p.ink);for(let n=0;n<r;n++)v(i,d(t.a,t.d,n/r),d(t.b,t.c,n/r));i.pop()}(this)):this.content==G.S?(this.N(),function(t){let n=t.U,e=Math.PI/5,i=Math.PI-e,h=Math.abs(P(t,0,3)),r=Math.abs(P(t,0,1));if(h<e||r<e||h>i||r>i)return;P(t,0,1),t.a.dist(t.d),t.b.dist(t.c);let l,s,o,u=d(t.a,t.d,.5),a=d(t.b,t.c,.5),f=d(t.a,t.b,.5),c=d(t.c,t.d,.5),_=u.dist(a),M=f.dist(c),w=Math.min(.32*M,.32*_);_>M?(l=u,s=a,o=_):(l=f,s=c,o=M);let g=Math.min(6,Math.max(1,Math.floor(o/w)));w=o/g;for(let e=0;e<g;e++){let i=d(l,s,(e+.75)/(g+.5)),h=x(5,8),r=p.color(p.hue(h),W(t.J,h,1.1),Q(t.J,h,1.05));n.fill(h),n.stroke(r),m(n,i.x,i.y,r_.p(.2,.3)*w,null,null,1.3)}}(this)):this.content==G.I?(this.N(),function(t){let n=t.a.dist(t.b),e=t.a.dist(t.d),i=t.c.dist(t.d),h=t.c.dist(t.b),r=t.U,l=.0045*p.cw,s=.0055*p.cw,o=Math.floor(Math.min(n,i)/l),u=Math.floor(Math.min(e,h)/s);r.push(),r.fill(p.ink),r.noStroke();for(let n=0;n<o;n++){let e=d(t.a,t.b,(n+.5)/o),i=d(t.d,t.c,(n+.5)/o);for(let t=0;t<u;t++){let n=d(e,i,(t+.5)/u);r.ellipse(n.x+r_.p(-1,1),n.y+r_.p(-1,1),r_.p(2.5,3.5),r_.p(2.5,3.5))}}r.pop()}(this)):this.content==G.D?(this.N(),B(this)):this.content==G.R&&(this.N(),function(t){let n=t.a.copy(),e=t.b.copy(),i=t.c.copy(),h=t.d.copy(),r=[0,1,2,3],l=Math.PI/6,s=Math.PI-l,o=0;for(let n=0;n<4;n++){let e=P(t,r[n],r[(n+1)%4]),i=P(t,r[n],r[(n+3)%4]);(p.abs(e)<l||p.abs(e)>s)&&o++,(p.abs(i)<l||p.abs(i)>s)&&o++}let u=[];if(0==o){for(let t=0;t<30;t++){let t=r_.p(8,12),r=new L(n,e,i,h,G.k);if(r.G=!1,r.L(t,!0),!(r.O()>1.5*t&&r.m()>1.5*t))break;u.push(r),n=r.a.copy(),e=r.b.copy(),i=r.c.copy(),h=r.d.copy()}for(const n of u)n.draw(t.U)}}(this)),t.pop()}N(){this.U.push();let t=p.hue(this.j),n=p.saturation(this.j),e=p.brightness(this.j),i=Math.min(15,Math.floor(Math.min(this.O(),this.m())/3)),h=.4/i;for(let r=0;r<i;r++){this.U.fill(p.color(t,n,e)),r>0&&this.U.noStroke();let i=this.L(r*h,!1,!1);I(this.U,i[0],i[1],i[2],i[3]),n+=r_.p(1,2),e+=r_.p(1,2)}this.U.pop()}O(){return(this.a.dist(this.d)+this.b.dist(this.c))/2}m(){return(this.a.dist(this.b)+this.c.dist(this.d))/2}W(t){let n=[this.a,this.b,this.c,this.d];return[n[t],n[(t+1)%4]]}P(t,n=!1){return c(t,this.b,this.a)+c(t,this.c,this.b)+c(t,this.d,this.c)+c(t,this.d,this.a)-(c(this.a,this.c,this.b)+c(this.a,this.d,this.c))<=1e-5}K(t,n,e,i=0,h=1,r=null){let l=this.a.copy(),p=this.b.copy(),s=l.copy(),o=p.copy(),u=this.O()*t;l=S(l,this.a,this.b,u),p=S(p,this.a,this.b,u);let a=new L(l,p,o,s);return a.g(n,e),this.top=a,a.bottom=this,a}g(t,n){let e=w(d(this.a,this.d,r_.p(t,n)),this.a),i=w(d(this.b,this.c,r_.p(t,n)),this.b),h=w(d(this.a,this.b,r_.p(t,n)),this.a),r=w(d(this.b,this.a,r_.p(t,n)),this.b);this.a.add(h),this.b.add(r),this.a.add(e),this.b.add(i)}}function N(t,n,e,i){let h=t,r=n;h=1e3*h/p.cw,r=1e3*r/p.ch;let l=e+(i-e)*p.noise(.0075*h,.0075*r);return p5.Vector.fromAngle(l).mult(.5)} }],