0xf7d96d2d…484dsent to0xbbfb6e46…4231·#13,193,231·0x953f987e…d4248e
<html> <head> <meta name="viewport" content="width=device-width"> <title>Caesium</title> <style>body{background-color: black;}body{margin:0}</style> <script language="javascript" type="text/javascript" src="https://cdn.jsdelivr.net/npm/p5@1.3.1/lib/p5.js"></script> </head> <body> <div id="c"></div><script lang="javascript">var scr=0,targ_scr=0,inv=!1,w=Math.min(innerHeight,innerWidth),k=w/200;const hashCode=r=>r.split("").reduce((r,e)=>(r=(r<<5)-r+e.charCodeAt(0))&r,0);function rnd_between(e,t){return r()*(t-e)+e}function hslToRgb(r,e,t){var a,n,i;if(0==e)a=n=i=t;else{var h=function(r,e,t){return t<0&&(t+=1),t>1&&(t-=1),t<1/6?r+6*(e-r)*t:t<.5?e:t<2/3?r+(e-r)*(2/3-t)*6:r},l=t<.5?t*(1+e):t+e-t*e,k=2*t-l;a=h(k,l,r+1/3),n=h(k,l,r),i=h(k,l,r-1/3)}return[Math.round(255*a),Math.round(255*n),Math.round(255*i)]}function rgbToHsl(r,e,t){r/=255,e/=255,t/=255;var a,n,i=Math.max(r,e,t),h=Math.min(r,e,t),l=(i+h)/2;if(i==h)a=n=0;else{var k=i-h;switch(n=l>.5?k/(2-i-h):k/(i+h),i){case r:a=(e-t)/k+(e<t?6:0);break;case e:a=(t-r)/k+2;break;case t:a=(r-e)/k+4}a/=6}return[a,n,l]}function invertRGB(r,e,t){return[255-r,255-e,255-t]}class RectSpiral{constructor(e,t,a,n,i,h,l,k,s,c,M,o,I,w,P,u,d,g,p,y){this.rend=e,this.center={x:t,y:a},this.rectangleMode=i,this.rectCount=n,this.start={rev:h,rot:l,w:k,h:s,radius:c,hue:0},this.end={rev:o,rot:I,w:w,h:P,radius:u,hue:1},this.inc=g,this.c=0,this.spinDir=r()<.5?-1:1,this.spinDir*=.005*(r()+1),this.greyscale=p,this.wire=y}draw(r,e,t,a){this.c+=this.inc,this.rend.push(),this.rend.colorMode(this.rend.HSL,1),this.rend.rectMode(this.rectangleMode),this.rend.noStroke(),this.rend.translate(this.center.x*this.rend.width,this.center.y*this.rend.height);var n=(this.end.rev-this.start.rev)/this.rectCount*r,i=(Math.abs(this.start.w)+Math.abs(this.end.w))/2,h=(Math.abs(this.start.h)+Math.abs(this.end.h))/2,l=(i-h)/(i+h),k=Math.sign(l),s=l>.6,c=s?0:-1;this.rend.rotate(this.start.rev+this.c*this.spinDir/3);for(var M=0;M<=1;M+=1/this.rectCount){var o=this.rend.lerp(this.start.radius,this.end.radius,M)*this.rend.width,I=this.rend.map(M*e,0,1,this.start.rot,this.end.rot,!1),w=this.rend.lerp(this.start.w,this.end.w,M)*t*(1+.5*scr*(c+(s?k<0?3:-1:0))),P=this.rend.lerp(this.start.h,this.end.h,M)*a*(1+.5*scr*(c+(s?k>0?3:-1:0))),u=(this.rend.lerp(this.start.hue,this.end.hue,M)+this.c/300)%1;this.rend.push(),this.rend.translate(0,o),this.rend.rotate(I),this.wire?(this.rend.noFill(),this.greyscale?this.rend.stroke(0,0,inv?1-u:u):this.rend.stroke(inv?rgbToHsl(...invertRGB(...hslToRgb(...[u,1,.5]))):[u,1,.5])):this.greyscale?this.rend.fill(0,0,inv?1-u:u):this.rend.fill(inv?rgbToHsl(...invertRGB(...hslToRgb(...[u,1,.5]))):[u,1,.5]),this.rend.rect(0,0,w,P),this.rend.pop(),this.rend.rotate(n)}this.rend.pop()}}function toNum(r){return parseInt(r,16).toString().split("").map(r=>parseInt(isNaN(r)?0:r)).reduce((r,e)=>r+e)}function getID(){for(var r=Array(theme_rarities.length).fill(theme_rarities).map((r,e)=>r.slice(0,e+1)).map(r=>r.reduce((r,e)=>r+e)),e=0;e<r.length;e++){var t=null!=r[e-1]?r[e-1]:0,a=null!=r[e]?r[e]:1;if(mod1>t&&mod1<a)return e}}const LCG=r=>()=>(2**31-1&(r=Math.imul(48271,r)))/2**31,r=LCG(hashCode(hash)),grey=r()<.01,wireF=r()<.01,mod1=r(),mod2=r(),mod3=r(),mod4=.6+.3*r(),mod5=.6+.3*r(),themes=[[new RectSpiral(null,.5,.5,130,"center",0,Math.PI/2,25*k,.25*k,.1,.86,-Math.PI,Math.PI/2,-100*k,.25*k,1/3,r(),r(),grey,wireF),new RectSpiral(null,.5,.5,75,"center",Math.PI/4,0,1*k,1*k,.1*.7,.86,-1.3*Math.PI*.75*.75,1*Math.PI,50*k,42*k,.4,r(),r(),grey,wireF),new RectSpiral(null,.5,.5,60,"corner",Math.PI/2,0,20*k,.25*k,1/7,.86,1.75*Math.PI,1*Math.PI,100*k,2*k,1/3,r(),r(),grey,wireF)],[new RectSpiral(null,.5,.5,17,"center",0,Math.PI/2,20*k,15*k,1/14,.93,-2.3*Math.PI*.75,2*Math.PI,40*k,30*k,.5,r()-.5,r(),grey,!0),new RectSpiral(null,.5,.5,60,"center",0,0,1*k,1*k,1/15,.93+.5,-1.3*Math.PI*.75*1.5,-1.1*Math.PI,44*k,38*k,1/2.4,r(),r(),grey,wireF),new RectSpiral(null,.5,.5,130,"center",0,0,4*k,4*k,1/7,.93+.5,-1.3*Math.PI*.75,2*Math.PI,4*k,4*k,.4,r(),r(),grey,wireF),new RectSpiral(null,.5,.5,130,"center",0,0,150*k,.5*k,1/3,.86,-Math.PI/2,-Math.PI/2,-150*k,.5*k,.4,r(),r(),grey,wireF),new RectSpiral(null,.5,.5,130,"corner",0,0,150*k,.5*k,1/30,.86,Math.PI/2,0,0*k,.5*k,1/30,r(),r(),grey,wireF)],[new RectSpiral(null,.5,.5,130,"center",0,0,25*k,25*k,.25,.86,2*-Math.PI,-Math.PI/2,-25*k,1*k,1/15,.93+1,r(),grey,wireF),new RectSpiral(null,.5,.5,100,"center",-Math.PI,Math.PI/2,1*k,1*k,.1,.93+.5,1*Math.PI*.75,1*Math.PI,70*k,.5*k,.4,.93+1,r(),grey,wireF),new RectSpiral(null,.5,.5,20,"center",0,0,1*k,1*k,0,.93+.5,-1.3*Math.PI*.75,1.25*Math.PI,50*k,40*k,.4,.93+1,r(),grey,wireF),new RectSpiral(null,.5,.5,130,"center",0,0,50*k,1*k,1/3,.86,-Math.PI/2,-Math.PI/2,-50*k,1*k,.4,.93+1,r(),grey,wireF),new RectSpiral(null,.5,.5,45,"center",0,0,50*k,1*k,0,.86,-Math.PI/2,-Math.PI/2,25*k,1*k,0,.93+1,r(),grey,wireF)],[new RectSpiral(null,.5,.5,80,"center",0,0,100*k,100*k,.2,.93,-Math.PI,-Math.PI/2,100*k,1*k,.1,1.03,r(),grey,!0),new RectSpiral(null,.5,.5,130,"corner",-Math.PI,0,60*k,35*k,1/14,.93+.5,1*Math.PI*.75,1*Math.PI,1*k,1*k,.5,.93+1,r(),grey,wireF),new RectSpiral(null,.5,.5,80,"center",0,0,100*k,1*k,1/3,.93,-Math.PI,-Math.PI/2,100*k,.25*k,1/8,1.03,r(),grey,wireF)],[new RectSpiral(null,.5,.5,140,"corner",Math.PI/2,0,1*k,1*k,.04,.86,1.75*Math.PI,1*Math.PI,80*k,40*k,.2,r(),r(),grey,wireF),new RectSpiral(null,.5,.5,80,"center",0,0,100*k,1*k,1/3,.93,-Math.PI,-Math.PI/2,100*k,1*k,1/8,1.03,r(),grey,wireF),new RectSpiral(null,.5,.5,130,"center",0,0,20*k,18*k,.1,.86,-1.3*Math.PI*.75,1*Math.PI,40*k,.25*k,.4,r(),r(),grey,!0)],[new RectSpiral(null,.5,.5,90,"center",0,0,2*k,1*k,0,.93-.5,-1.3*Math.PI*.75*2,1*Math.PI,30*k,25*k,.2,.93,r(),grey,wireF),new RectSpiral(null,.5,.5,35,"center",-Math.PI,0,2*k,1.5*k,0,.93-.5,1*Math.PI*.75,1*Math.PI,60*k,5*k,.4,.93,r(),grey,!0),new RectSpiral(null,.5,.5,130,"center",Math.PI,0,200*k,.25*k,.25,.86,Math.PI/2,-Math.PI/2,-200*k,.25*k,1/3,r(),r(),grey,wireF),new RectSpiral(null,.5,.5,35,"center",0,0,150*k,2*k,.25,.86,Math.PI/2,Math.PI/2,-150*k,2*k,1/3,r(),r(),grey,wireF)],[new RectSpiral(null,.5,.5,70,"center",0,0,200*k,.35*k,.05,.93+.5,-1.3*Math.PI*.75*Math.PI/2,Math.PI/2,-200*k,.35*k,.04,r(),r(),grey,wireF),new RectSpiral(null,.5,.5,70,"center",0,Math.PI/2,100*k,2*k,1/3,.86,2*-Math.PI,Math.PI/2,-100*k,2*k,.4,r(),r(),grey,wireF),new RectSpiral(null,.5,.5,10,"center",0,0,5*k,5*k,.2,.86,-Math.PI/2,-Math.PI/2,5*k,5*k,.2,.93+1,r()),new RectSpiral(null,.5,.5,90,"center",Math.PI/2,0,2*k,2*k,1/15,.86,3*Math.PI,0,25*k,20*k,1/3,.93+1,r()),new RectSpiral(null,.5,.5,130,"center",0,0,50*k,1*k,1/3,.86,-Math.PI/2,-Math.PI/2,-50*k,1*k,.4,.93+1,r())],[new RectSpiral(null,.5,.5,18,"center",0,0,50*k,50*k,.3,.86,2,0,10*k,10*k,.3,r(),r(),grey,wireF),new RectSpiral(null,.5,.5,50,"center",0,0,150*k,.5*k,.17,.86,Math.PI/2,0,250*k,.5*k,.17,r(),r(),grey,wireF),new RectSpiral(null,.5,.5,22,"center",Math.PI/2,0,50*k,50*k,1/3,.86,2+Math.PI/2,0,10*k,10*k,1/3,r(),r(),grey,!0),new RectSpiral(null,.5,.5,200,"corner",Math.PI/2,-Math.PI/2,80*k,10*k,0,.86,1.75*Math.PI*2,3*Math.PI/2,1*k,1*k,.4,r(),r(),grey,wireF),new RectSpiral(null,.5,.5,98,"corner",Math.PI/2,-Math.PI/2,90*k,.25*k,0,.86,1.75*Math.PI*2,3*Math.PI/2,0*k,.25*k,0,r(),r(),grey,wireF)],[new RectSpiral(null,.5,.5,60,"center",0,0,10*k,10*k,1/3,.86,2*-Math.PI,-Math.PI/2,20*k,20*k,1/15,r(),r(),grey,wireF),new RectSpiral(null,.5,.5,80,"center",0,Math.PI/2,250*k,.25*k,.04,.86,-Math.PI/3,Math.PI/2,-35*k,.25*k,1/15,r(),r(),grey,wireF),new RectSpiral(null,.5,.5,60,"center",0,0,100*k,1*k,1/3,.86,-Math.PI,-Math.PI/2,50*k,1*k,.2,r(),r(),grey,wireF)],[new RectSpiral(null,.5,.5,130,"center",0,Math.PI/2,100*k,2*k,1/3*.8,.86,-Math.PI,2*Math.PI,-100*k,6*k,1/2.2*.8,r(),r(),grey,wireF),new RectSpiral(null,.5,.5,130,"center",0,0,2*k,1*k,.1,.86,-1.3*Math.PI*.75,3*Math.PI,50*k,.25*k,.4,r(),r(),grey,wireF),new RectSpiral(null,.5,.5,160,"center",0,Math.PI/2,170*k,.25*k,.2,.86,-Math.PI/3,-Math.PI/2,-70*k,.25*k,.04,r(),r(),grey,wireF)],[new RectSpiral(null,.5,.5,160,"corner",0,0,10*k,10*k,.04,.86,1.6*-Math.PI,0,150*k,150*k,.04,r(),r(),grey,!0)],[new RectSpiral(null,.5,.5,80,"center",0,Math.PI/2,250*k,.25*k,.04,.86,-Math.PI/3,Math.PI/2,-35*k,.25*k,1/15,r(),r(),grey,wireF)],[new RectSpiral(null,.5,.5,50,"center",0,0,200*k,.5*k,.12,.86,Math.PI/2,0,250*k,.5*k,.12,r(),r(),grey,wireF)],[new RectSpiral(null,.5,.5,400,"corner",Math.PI/2,-Math.PI/2,100*k,.2*k,.4,.86,1.75*Math.PI*1.5,1*Math.PI/2,1*k,.2*k,0,r(),r(),grey,wireF)],[new RectSpiral(null,.5,.5,50,"center",0,0,200*k,.5*k,.2*.4,.86,Math.PI/2,0,-50*k,.5*k,.2*.4,r(),r(),grey,wireF),new RectSpiral(null,.5,.5,130,"center",0,Math.PI/2,100*k,.2*k,1/3*.8,.86,-Math.PI,2*Math.PI,-100*k,.6*k,1/2.2*.8,r(),.8,grey,wireF)]],theme_rarities=[.08,.08,.08,.08,.08,.08,.08,.08,.08,.08,.04,.04,.04,.04,.04],theme_names=["Vertex","Axiom","Chord","Matrix","Rhombus","Octagon","Hexagon","Trapezoid","Quadrilateral","Postulate","Intergral","Tangent","Derivative","Tensor","Manifold"],id=getID();window.METADATA={theme:theme_names[id],greyscale:grey,total_wireframe:wireF,contains_wireframe:themes[id].map(r=>r.wire).includes(!0),contains_center_star:null!=themes[id].find(r=>r.start.radius==r.end.radius&&0==r.start.radius),revolution:Math.floor(100*mod2),twisting:Math.floor(100*mod3),width:Math.floor(100*mod4),height:Math.floor(100*mod5)};let sketch=function(r){r.setup=function(){var e=r.createCanvas(w,w);for(var t of(e.parent("c"),e.elt.style.margin="auto",e.elt.style.display="block",themes))for(var a of t)a.rend=r},r.draw=function(){for(var e of(scr=(scr+targ_scr)/2,r.background(0+inv?255:0),r.push(),themes[id]))e&&e.draw(2*mod2+Math.PI,3*mod3,mod4+.1,mod5+.1);r.pop()},r.mouseWheel=(e=>{targ_scr-=e.delta/750,targ_scr=r.constrain(targ_scr,0,1)}),r.mouseClicked=(r=>{inv=!inv,document.getElementsByTagName("body")[0].style.background=inv?"#fff":"#000"})},myp5=new p5(sketch); </script> </body> </html>