memoscan
← all memos

Memo 0x92e7a4db…90ff6a on Ethereum

function setup(){noCanvas(),noLoop();let e=parseInt(tokenData.hash.slice(0,16),16);randomSeed(e);let o=1100;for(function(){points=[],col=[],SHOWSIDE=[],STWdt=[],La=Lb=[3,5,7,11,13,17,19,23,27,39,51,59,69,77,101,81,89,95],Lc=Ld=[2].concat(La),M=1,a=b=c=d=0;for(;1==(a==b||a==c||a==d||b==c||b==d||c==d)||a+b+c+d<=29||a+b==5||a+b>39||abs(a-b)>17||a+b+c+d>=72;)a=random(La),b=random(Lb),c=random(Lc),d=random(Ld),colorMode(HSB,1);alph=a,beta=b,gamm=c}(),ThreeFaced=random([0,0,0,0,0,0,0,0,0,1]),DASHEDLINE=random([0,0,0,0,0,0,1,2]),INDECISIVE=random()>.8,TINTEDPAPER=random()>.5,BGBW=random()>.65,1==ThreeFaced?BWLines=random()>.6:BWLines=random()>.9,1==ThreeFaced&&1!=BWLines&&(BGBW=random()>.3,console.log(BGBW)),AltPalette=random()>.5,1==BWLines&&(AltPalette=0),SC=1.5,OVERLAPFACES=random()>0.9,OVERLAPFACES==1?(Over6=-1.03,TINTEDPAPER=0,ThreeFaced=0):Over6=1,t=0,dt=.001,1==INDECISIVE?(r=.01*M,r2=0*M):(r=0,r2=0),angleX=-(25+.5*random(-10,15))/180*PI,angleY=-(40+.5*random(-35,35))/180*PI,angleZ=0,distance=1.5*random(2,10),ScalFactor=100*random(.95,1.41)*distance*2,distance=6,ScalFactor=1300,abs(180*angleY/PI+45)<2&&(angleY=-.25*PI+(3+random(0,3))/180*PI),random()>.8&&(CuratedMode=random([0,1,2,3,4,5]),function(){switch(CuratedMode){case 0:angleX=-.25*PI,angleY=-30/180*PI,angleZ=0*PI;break;case 1:angleX=-30/180*PI,angleY=-.25*PI,angleZ=0*PI;break;case 2:angleX=-.25*PI,angleY=-.25*PI,angleZ=0*PI;break;case 3:angleX=-30/180*PI,angleY=-30/180*PI,angleZ=0*PI;break;case 4:angleX=-.125*PI,angleY=-.25*PI,angleZ=0*PI;break;case 5:angleX=-35/180*PI,angleY=-.25*PI,angleZ=0*PI}}()),i=0;i<6;i++)points[i]=[];for(t=0,it=0;t<TAU;t+=dt,it++)x=M*random(-r,r)+M*cos(t*alph),y=M*random(-r,r)+M*sin(t*beta),points[0][it]=createVector(x+random(-r2,r2),y+random(-r2,r2),-M*Over6),points[3][it]=createVector(M,y+random(-r2,r2),x+random(-r2,r2)),points[5][it]=createVector(x+random(-r2,r2),y+random(-r2,r2),M),points[1][it]=createVector(-M*Over6,y+random(-r2,r2),x+random(-r2,r2)),points[2][it]=createVector(y+random(-r2,r2),M*Over6,x+random(-r2,r2)),points[4][it]=createVector(y+random(-r2,r2),-M,x+random(-r2,r2));gr=color(.33,1,1),oran=color(32/360,1,1),pur=color(.8,.81,1),cyn=color(.49,.95,.95),Colours=[gr,"blue","red","yellow",cyn,"magenta"],colorNames=["Green","Blue","Red","Yellow","Cyan","Magenta"],1==AltPalette&&(Colours=[gr,oran,pur,"blue","yellow","red"],colorNames=["Green","Orange","Purple","Blue","Yellow","Red"]),TFM=random([1,2,3,4]),1==TFM&&1==ThreeFaced&&(Colours=[gr,"blue","red","blue",gr,"yellow"],colorNames=["Green","Blue","Red","Blue","Green","Yellow"]),2==TFM&&1==ThreeFaced&&(Colours=[gr,"blue","red",gr,cyn,"yellow"],colorNames=["Green","Blue","Red","Green","Cyan","Yellow"]),3==TFM&&1==ThreeFaced&&(Colours=[gr,"blue","red","blue",pur,"red"],colorNames=["Green","Blue","Red","Blue","Purple","Red"]),4==TFM&&1==ThreeFaced&&(Colours=[gr,"blue","red",color([.073,.91,1]),color([.9,.71,1]),color([1/6,.71,1])],colorNames=["Green","Blue","Red","Orange","Pink","Yellow"]),1==TINTEDPAPER?ConCol3=[random(),.05,1]:ConCol3=[.1,.025,1],1==ThreeFaced?SHOWSIDE=[1,1,1,0,0,0]:SHOWSIDE=[0,0,0,0,0,0],1==BGBW?1==TINTEDPAPER?ConCol3=[random([,.15,.4,.45,.5,.6,.7,.8,.9]),.81,.01]:ConCol3=[0,0,.05]:ConCol3=ConCol3,1==BGBW&&1==BWLines&&(Colours=["white","white","white","white","white","white"]),0==BGBW&&1==BWLines&&(Colours=["black","black","black","black","black","black"]), OVERLAPFACES==1?(Colours = ["yellow", "blue", "magenta", gr, cyn, "red"], colorNames = ["Yellow", "Blue", "Magenta", "Green", "Cyan", "Red"]):0, noFill();let n="http://www.w3.org/2000/svg",l=document.createElementNS(n,"svg");l.setAttribute("width","100vw"),l.setAttribute("height","100vh"),l.setAttribute("viewBox","0 0 850 "+o),l.setAttribute("style","background-color:white;");let s=document.createElementNS(n,"path");s.setAttribute("d","M 0 0 M 850 1100"),l.appendChild(s);let u=1/0,m=-1/0,g=[];for(let e=0;e<6;e++){let t=C(points[e],e,0);g.push(t.projected),u=min(u,t.minX),m=max(m,t.maxX)}let h=-((u+m)/2);for(let e=0;e<6;e++)for(let t=0;t<g[e].length;t++)g[e][t].x+=h;let I=function(e,t,r){let o=r*t,n=o*(1-Math.abs(6*e%2-1)),l=r-o,[a,d,c]=[0,0,0];0<=6*e&&6*e<1?[a,d,c]=[o,n,0]:1<=6*e&&6*e<2?[a,d,c]=[n,o,0]:2<=6*e&&6*e<3?[a,d,c]=[0,o,n]:3<=6*e&&6*e<4?[a,d,c]=[0,n,o]:4<=6*e&&6*e<5?[a,d,c]=[n,0,o]:5<=6*e&&6*e<6&&([a,d,c]=[o,0,n]);return a=Math.round(255*(a+l)),d=Math.round(255*(d+l)),c=Math.round(255*(c+l)),`rgb(${a}, ${d}, ${c})`}(ConCol3[0],ConCol3[1],ConCol3[2]);for(l.setAttribute("style",`background-color:${I};`),i=0;i<6;i++){let e=g[i],t=document.createElementNS(n,"g");t.setAttribute("id",colorNames[i]);let r=SC*M*1,o=1==SHOWSIDE[i]?"none":Colours[i];if(0===DASHEDLINE&&0==SHOWSIDE[i]){let l=document.createElementNS(n,"path");l.setAttribute("style",`fill:none;stroke-width:${r};stroke:${o}`);let a="M "+(e[0].x+425)+" "+(e[0].y+550);for(let t=1;t<e.length;t++){let r=e[t];a+=" L "+(r.x+425)+" "+(r.y+550)}l.setAttribute("d",a),t.appendChild(l)}if(2===DASHEDLINE&&0==SHOWSIDE[i])for(let l=0;l<e.length-1;l++){let a=e[l],d=e[l+1],c=document.createElementNS(n,"path");c.setAttribute("style",`fill:none;stroke-width:${r};stroke:${o}`),c.setAttribute("d",`M ${a.x+425} ${a.y+550} L ${d.x+425} ${d.y+550}`),t.appendChild(c)}if(1===DASHEDLINE&&0==SHOWSIDE[i])for(let l=0;l<e.length-1;l++){let a=e[l],d=e[l+1];if(l%2==0){let e=document.createElementNS(n,"path");e.setAttribute("style",`fill:none;stroke-width:${r};stroke:${o}`),e.setAttribute("d",`M ${a.x+425} ${a.y+550} L ${d.x+425} ${d.y+550}`),t.appendChild(e)}}l.appendChild(t)}function C(e,t,r){const o=[[cos(angleZ),-sin(angleZ),0],[sin(angleZ),cos(angleZ),0],[0,0,1]],n=[[1,0,0],[0,cos(angleX),-sin(angleX)],[0,sin(angleX),cos(angleX)]],l=[[cos(angleY),0,sin(angleY)],[0,1,0],[-sin(angleY),0,cos(angleY)]];let a=[];for(let t=0;t<e.length;t++){let r=P(l,e[t]);r=P(n,r),r=P(o,r);let d=1/(distance-r.z);let c=P([[d,0,0],[0,d,0]],r);c.mult(ScalFactor),a[t]=c}let d=1/0,c=-1/0;for(let e=0;e<a.length;e++)d=min(d,a[e].x),c=max(c,a[e].x);return{projected:a,minX:d,maxX:c}}function p(e,t){return function(e){return createVector(e[0][0],e[1][0],e.length>2?e[2][0]:0)}(P(e,function(e){let t=[];for(let e=0;e<3;e++)t[e]=[];return t[0][0]=e.x,t[1][0]=e.y,t[2][0]=e.z,t}(t)))}function P(e,t){if(t instanceof p5.Vector)return p(e,t);let r=e[0].length,o=e.length,n=t[0].length;if(r!==t.length)return null;result=[];for(let l=0;l<o;l++){result[l]=[];for(let o=0;o<n;o++){let n=0;for(let a=0;a<r;a++)n+=e[l][a]*t[a][o];result[l][o]=n}}return result}document.body.appendChild(l)}