0x9cb7…1c06

All memos sent from and to 0x9cb7…1c06.

Lumina engages in the delicate interplay of curved, organic lines and abstract forms, weaving a surreal narrative filled with rhythm and dynamism. It illustrates dreamy imagery of cosmic phenomena such as electromagnetic waves, magnetic reconnection, and gravitational pull. In its composition, Lumina balances fluid and structured elements, vibrant and muted tones. The artwork’s glitchy and distorted textures, reminiscent of cosmic noise and stellar interference, further enhance its spatial narrative, offering a visual echo of the cosmic phenomena. Lumina lies in its balanced integration of organic and digital elements. The first layer of the artwork, crafted with p5.js and a fBm shader, forms an organic texture, adding a swirl to give dynamism and generates diverse color palettes; establishing a visual field. This organic layer is then intertwined with a digital layer, where a custom fragment shader introduces subtle distortions and glitches, adding depth, complexity and luminance to the pieces. The inclusion of noise (and its artifacts) and various mathematical functions imbue the collection with a dreamlike ambiance. **URL Parameters:** ?resolution=5000 : to render as 2812x5000 px ?resolution=4000 : to render as 2250x4000 px ?resolution=3000 : to render as 1687x3000 px (default) **Press [S] in live view to save as .png** This work involves intensive GPU processing. It's advisable to use modern hardware and ensure your browser's hardware acceleration is enabled for optimal performance. Using the Chrome browser on a desktop equipped with a high-end GPU is highly recommended. See website for more details about the collection.
Lumina engages in the delicate interplay of curved, organic lines and abstract forms, weaving a surreal narrative filled with rhythm and dynamism. It illustrates dreamy imagery of cosmic phenomena such as electromagnetic waves, magnetic reconnection, and gravitational pull. In its composition, Lumina balances fluid and structured elements, vibrant and muted tones. The artwork’s glitchy and distorted textures, reminiscent of cosmic noise and stellar interference, further enhance its spatial narrative, offering a visual echo of the cosmic phenomena. Lumina lies in its balanced integration of organic and digital elements. The first layer of the artwork, crafted with p5.js and a fBm shader, forms an organic texture, adding a swirl to give dynamism and generates diverse color palettes; establishing a visual field. This organic layer is then intertwined with a digital layer, where a custom fragment shader introduces subtle distortions and glitches, adding depth, complexity and luminance to the pieces. The inclusion of noise (and its artifacts) and various mathematical functions imbue the collection with a dreamlike ambiance. **URL Parameters:** ?resolution=5000 : to render as 2812x5000 px ?resolution=4000 : to render as 2250x4000 px ?resolution=3000 : to render as 1687x3000 px (default) **Press [S] in live view to save a .png** This work involves intensive GPU processing. It's advisable to use modern hardware and ensure your browser's hardware acceleration is enabled for optimal performance. Using the Chrome browser on a desktop equipped with a high-end GPU is highly recommended. See website for more details about the collection.
Lumina engages in the delicate interplay of curved, organic lines and abstract forms, weaving a surreal narrative filled with rhythm and dynamism. It illustrates dreamy imagery of cosmic phenomena such as electromagnetic waves, magnetic reconnection, and gravitational pull. In its composition, Lumina balances fluid and structured elements, vibrant and muted tones. The artwork’s glitchy and distorted textures, reminiscent of cosmic noise and stellar interference, further enhance its spatial narrative, offering a visual echo of the cosmic phenomena. Lumina lies in its balanced integration of organic and digital elements. The first layer of the artwork, crafted with p5.js and a fBm shader, forms an organic texture, adding a swirl to give dynamism and generates diverse color palettes; establishing a visual field. This organic layer is then intertwined with a digital layer, where a custom fragment shader introduces subtle distortions and glitches, adding depth, complexity and luminance to the pieces. The inclusion of noise (and its artifacts) and various mathematical functions imbue the collection with a dreamlike ambiance. **Press [S] in live view to save a .png** **URL Parameters:** ?resolution=5000 : to render as 2812x5000 px ?resolution=4000 : to render as 2250x4000 px ?resolution=3000 : to render as 1687x3000 px (default) This work involves intensive GPU processing. It's advisable to use modern hardware and ensure your browser's hardware acceleration is enabled for optimal performance. Using the Chrome browser on a desktop equipped with a high-end GPU is highly recommended. See website for more details about the collection.
"Lumina" engages in the delicate interplay of curved, organic lines and abstract forms, weaving a surreal narrative filled with rhythm and dynamism. It illustrates dreamy imagery of cosmic phenomena such as electromagnetic waves, magnetic reconnection, and gravitational pull. In its composition, "Lumina" balances fluid and structured elements, vibrant and muted tones. The artwork's glitchy and distorted textures, reminiscent of cosmic noise and stellar interference, further enhance its spatial narrative, offering a visual echo of the cosmic phenomena. "Lumina" lies in its balanced integration of organic and digital elements The first layer of the artwork, crafted with p5.js and a fBm shader, forms organic textures and generates diverse color palettes, establishing a visual field. This organic layer is then intertwined with a digital layer, where a custom fragment shader introduces subtle distortions and glitches, adding depth, complexity and luminance to the pieces. The inclusion of noise (and its artifacts) and various mathematical functions imbue the collection with a dreamlike ambiance. **Press [S] in live view to save a .png in 1687x3000 px.** This work involves intensive GPU processing. It's advisable to use modern hardware and ensure your browser's hardware acceleration is enabled for optimal performance. Using the Chrome browser on a desktop equipped with a high-end GPU is highly recommended. See website for more details about the collection.
Lumina engages in the delicate interplay of curved, organic lines and abstract forms, weaving a surreal narrative filled with rhythm and dynamism. It illustrates dreamy imagery of cosmic phenomena such as electromagnetic waves, magnetic reconnection, and gravitational pull. In its composition, Lumina balances fluid and structured elements, vibrant and muted tones. The artworks' glitchy and distorted textures, reminiscent of cosmic noise and stellar interference, further enhance its spatial narrative, offering a visual echo of the cosmic phenomena. Lumina lies in its balanced integration of organic and digital elements. The first layer of the artwork, crafted with p5.js and a fBm shader, forms an organic texture, adding a swirl to give dynamism and generates diverse color palettes; establishing a visual field. This organic layer is then intertwined with a digital layer, where a custom fragment shader introduces subtle distortions and glitches, adding depth, complexity and luminance to the pieces. The inclusion of noise (and its artifacts) and various mathematical functions imbue the collection with a dreamlike ambiance. **Press [S] in live view to save as .png** **URL Parameters:** ?resolution=5000 : to save as 2812x5000px .png ?resolution=4000 : to save as 2250x4000px .png ?resolution=3000 : to save as 1687x3000px .png (default) This work involves intensive GPU processing. It's advisable to use modern hardware and ensure your browser's hardware acceleration is enabled for optimal performance. Using the Chrome browser on a desktop equipped with a high-end GPU is highly recommended. See website for more details about the collection and making of.
Lumina engages in the delicate interplay of curved, organic lines and abstract forms, weaving a surreal narrative filled with rhythm and dynamism. It illustrates dreamy imagery of cosmic phenomena such as electromagnetic waves, magnetic reconnection, and gravitational pull. In its composition, Lumina balances fluid and structured elements, vibrant and muted tones. The artworks' glitchy and distorted textures, reminiscent of cosmic noise and stellar interference, further enhance its spatial narrative, offering a visual echo of the cosmic phenomena. Lumina lies in its balanced integration of organic and digital elements. The first layer of the artwork, crafted with p5.js and a fBm shader, forms an organic texture, adding a swirl to give dynamism and generates diverse color palettes; establishing a visual field. This organic layer is then intertwined with a digital layer, where a custom fragment shader introduces subtle distortions and glitches, adding depth, complexity and luminance to the pieces. The inclusion of noise (and its artifacts) and various mathematical functions imbue the collection with a dreamlike ambiance. **Press [S] in live view to save as .png** This work involves intensive GPU processing. It's advisable to use modern hardware and ensure your browser's hardware acceleration is enabled for optimal performance. Using the Chrome browser on a desktop equipped with a high-end GPU is highly recommended. See website for more details about the collection and making of.
var styles=` html, body { width: 100%; height: 100%; margin: 0; padding: 0; } body { overflow: hidden; touch-action: none; background: #252525; } main { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; } canvas { width: auto !important; height: auto !important; max-width: 100% !important; max-height: 100% !important; /* box-shadow: 0px 0px 40px #000000;*/ } `,styleSheet=document.createElement("style");styleSheet.innerText=styles,document.head.appendChild(styleSheet);let hash=tokenData.hash,id=tokenData.tokenId;console.log("hash: "+hash),console.log("id: "+id);let rad,offset=0,blurShader,pix=2,w=1500,angle,tick,sunX1,sunX2,sunY1,sunY2,sunRad1,sunRad2,sunS1,sunH2,sunB1,sunB2,sunH1,sunS2,uRadC2,randomCanvas,uRandStr,uMult,ar,swirlShader,swW,shapeC,dir,h1,h2,uDir1,uDir2,uScale,spaBuf,spaShader,uSc,uRound,radMult,compNames,tanC,tanC2,rotCh,rotChY,seedChooser,nSeed,rSeed,asChooser,asBool,prm,uPi=1,theVertex=` #ifdef GL_ES precision highp float; #endif attribute vec3 aPosition; attribute vec2 aTexCoord; varying vec2 vTexCoord; void main() { vTexCoord = aTexCoord; vec4 positionVec4 = vec4(aPosition, 1.0); positionVec4.xy = positionVec4.xy * 2.0 - 1.0; gl_Position = positionVec4; } `,blurFrag=` precision highp float; #define PI 3.14159265359 varying vec2 vTexCoord; uniform sampler2D uTexture0; uniform vec2 uResolution; uniform float u_amp; uniform float u_octave; uniform float u_fbmAmp; uniform float u_roundness; uniform float u_angleC; uniform float u_dir1; uniform float u_dir2; uniform float u_randStr; uniform float u_mult; uniform sampler2D randomTex; uniform float u_scale; const float PHI = 1.61803398874989484820459; const float SEED = 43758.0; vec3 rgb2hsv(vec3 c) { vec4 K = vec4(0.0, -1.0 / 3.0, 2.0 / 3.0, -1.0); vec4 p = mix(vec4(c.bg, K.wz), vec4(c.gb, K.xy), step(c.b, c.g)); vec4 q = mix(vec4(p.xyw, c.r), vec4(c.r, p.yzx), step(p.x, c.r)); float d = q.x - min(q.w, q.y); float e = 1.0e-10; return vec3(abs(q.z + (q.w - q.y) / (6.0 * d + e)), d / (q.x + e), q.x); } vec3 hsv2rgb(vec3 c) { vec4 K = vec4(1.0, 2.0 / 3.0, 1.0 / 3.0, 3.0); vec3 p = abs(fract(c.xxx + K.xyz) * 6.0 - K.www); return c.z * mix(K.xxx, clamp(p - K.xxx, 0.0, 1.0), c.y); } float random(vec2 co){ return texture2D(randomTex, mod(co.xy/0.7,0.2) * PI).y; } float noise (in vec2 st) { vec2 i = floor(st); vec2 fu = fract(st); float a = random(i); float b = random(i + vec2(1.0, 0.0)); float c = random(i + vec2(0.0, 1.0)); float d = random(i + vec2(1.0, 1.0)); vec2 u = fu * fu * (3.0 - 2.0 * fu); return mix(a, b, u.x) + (c - a)* u.y * (1.0 - u.x) + (d - b) * u.x * u.y; } #define OCTAVES 12 float fbm (in vec2 st) { float value = 0.0; float amplitude = u_amp; float frequency = 0.1; for (int i = 0; i < OCTAVES; i++) { value += amplitude * noise(st); st *= u_octave; amplitude *= .45; } return value; } float fbm6( in vec2 p ) { vec2 q = vec2( fbm( p + vec2(0.0,u_roundness) ), fbm( p + vec2(u_dir1,2.0) ) ); vec2 r = vec2( fbm( p + 4.0*q + vec2(4.0,u_dir2)), fbm( p + 4.0*q + vec2(u_angleC * 4.0,0.0))); return fbm( p + u_fbmAmp * r ); } void main() { vec2 st = gl_FragCoord.xy/uResolution.xy; vec2 uv = vTexCoord; uv.y = 1.0 - uv.y; vec2 texelSize = 1.0 / uResolution; vec2 offset; float scale = u_scale; float offset2 = 0.1; float angle; angle = noise(st + uv * 0.2) * PI * 2.0; float radius = offset2; st *= scale; st *= radius * vec2(fract(angle * st.x), fract(angle / st.y)) + random(uv/1.0)/u_randStr; offset = texelSize * vec2(40.0,40.0) - fbm6(uv) + 0.18; vec4 color = vec4(0.0); float div; float mult = u_mult; color -= texture2D(uTexture0, uv + vec2(offset.y, st.y)*mult); color += texture2D(uTexture0, uv + vec2(-offset.y, st.y)*mult); color += texture2D(uTexture0, uv + vec2(-offset.x, st.x)*mult); color -= texture2D(uTexture0, uv + vec2(offset.x, st.x)*mult); color += texture2D(uTexture0, uv + vec2(offset.y, -st.y)*mult); color += texture2D(uTexture0, uv + vec2(-offset.y, -st.y)*mult); color += texture2D(uTexture0, uv + vec2(-offset.x, -st.x)*mult); color += texture2D(uTexture0, uv + vec2(offset.x, -st.x)*mult); vec3 hsv = rgb2hsv(color.rgb); hsv.y *= 1.4; color.rgb = hsv2rgb(hsv); color.rgb = ((color.rgb - vec3(0.5)) * 1.1 + vec3(0.5)); div = 2.5; color /= div; gl_FragColor = color; } `,spaFrag=` #ifdef GL_ES precision highp float; #endif #define PI 3.14159265359 const float PHI = 1.61803398874989484820459; const float SEED = 43758.0; varying vec2 vTexCoord; uniform sampler2D randomTex; uniform vec2 resolution; uniform sampler2D img; uniform float u_angleC; uniform float u_radC; uniform float u_dirR; uniform float uScale; uniform float uRound; uniform float u_radC2; uniform float u_tanC; uniform float utime; uniform float u_tanC2; uniform float uPi; float random(in vec2 co) {return texture2D(randomTex, mod(co.xy/0.7,0.2) * PI).x;} float noise (in vec2 st) { vec2 i = floor(st); vec2 fu = fract(st); float a = random(i); float b = random(i + vec2(1.0, 0.0)); float c = random(i + vec2(0.0, 1.0)); float d = random(i + vec2(1.0, 1.0)); vec2 u = fu * fu * (3.0 - 2.0 * fu); return mix(a, b, u.x) +(c - a)* u.y * (1.0 - u.x) + (d - b) * u.x * u.y; } void main( ) { vec2 st = gl_FragCoord.xy/resolution.xy; vec2 uv = vTexCoord; uv.y = 1.0 - uv.y; vec2 texelSize = 1.0 / resolution; vec2 offset; float scale = uScale; float offset2 = uRound; float angle; if(u_angleC > 0.75){ angle = noise(st / uv * 0.2) * PI * uPi; }else if(u_angleC > 0.50){ angle = noise(st * uv * 0.2) * PI * uPi; }else if(u_angleC > 0.25){ angle = noise(st - uv * 0.2) * PI * uPi; }else{ angle = noise(st + uv * 0.2) * PI * uPi; } float radius = offset2; st *= scale; if(u_radC > 0.85){ if(u_tanC > 0.50){ st *= radius * vec2(tan(angle * st.x), fract(angle * st.y)); }else{ if(u_tanC2 < 0.50){ st *= radius * vec2(tan(angle * st.x), sin(angle * st.y)); }else{ st *= radius * vec2(sin(angle * st.x), tan(angle * st.y)); } } }else if(u_radC > 0.68){ st *= radius * vec2(fract(angle / st.x), fract(angle / st.y)); }else if(u_radC > 0.51){ st *= radius * vec2(tan(angle * st.x), fract(angle / st.y)); }else if(u_radC > 0.34){ st *= radius * vec2(sin(angle * mod(st.x,st.y)), sin(angle / st.y *sin(st.x))); }else if(u_radC > 0.17){ st *= radius * noise(vec2(sin(angle), cos(angle)) / st * fract(uv)); }else{ st *= radius * vec2(fract(angle * st.x), fract(angle / st.y)); } if(u_radC2 < 0.50){ st *= radius * vec2(tan(angle/st.x) * cos(angle * st.x), sin(angle * st.y) + fract(st.y/angle)); }else{ } vec4 color = vec4(0.0); float div; if(u_dirR > 0.85){ color += texture2D(img, uv + vec2(st.x,st.y));//"Sağ" }else if(u_dirR > 0.68){ color += texture2D(img, uv + vec2(-st.y,-st.x));//"Sağ2" }else if(u_dirR > 0.51){ color += texture2D(img, uv + vec2(st.y,st.x));//"Norm" }else if(u_dirR > 0.34){ color += texture2D(img, uv + vec2(st.y,-st.x));//"Norm2" }else if(u_dirR > 0.17){ color += texture2D(img, uv + vec2(st.y*uv.y, st.x));//"SinsizUst" }else{ color += texture2D(img, uv + vec2(st.x,mod(uv.y,st.y)));// "AlttanTarama" } color -= texture2D(img, uv - noise(vec2(st.x, st.y)) / random(uv)); div = 0.45; color /= div; color += vec4(0.03,0.03,0.03,1.0); gl_FragColor = color; } `,swFrag=` precision highp float; #define PI 3.14159265359 varying vec2 vTexCoord; uniform sampler2D uTexture0; uniform vec2 uResolution; uniform vec2 uCenter; uniform float uRad; uniform float uAngle; uniform float uTick; uniform float uShape; uniform float uDir; uniform float utime; uniform float uRadMult; void main() { float effectRadius = uRad/uRadMult; float effectAngle = uAngle * PI * uDir; vec2 center = uCenter.xy / uResolution.xy; vec2 uv = gl_FragCoord.xy / uResolution.xy - center; float len = length(uv * vec2(uResolution.x / uResolution.y, 1.)); float angle = atan(uv.x, uv.y) + effectAngle * smoothstep(effectRadius, uTick, len); float radius = length(uv); vec4 color = vec4(0.0); color = texture2D(uTexture0, vec2(radius * sin(angle), radius * cos(angle)) + center); gl_FragColor = color; } `;function drawRandomTexture($,e){(randomCanvas=createImage(e,9*e/16)).loadPixels();for(let o=0;o<randomCanvas.width;o++)for(let r=0;r<randomCanvas.height;r++)randomCanvas.set(o,r,color(random(255)));randomCanvas.updatePixels(),randomSeed(rSeed)}function setup(){let $=window.location.search;5e3==(resPrm=(prm=new URLSearchParams($)).get("resolution"))&&(pix=5e3/1500),4e3==resPrm&&(pix=4e3/1500),3e3==resPrm&&(pix=2),nSeed=5198510*(R=new Random).random_dec(),rSeed=158191418*R.random_dec(),console.log("randomSeed: "+rSeed),ar=9/16,noiseSeed(nSeed),randomSeed(rSeed),asChooser=random(1),tanC=random(1),tanC2=random(1);let e=R.random_dec();rotCh=R.random_choice([0,1]),rotChY=0,uRadC2=random(1),random(1);let o=R.random_dec();e>.93?(compNames="comp1",1==(seedChooser=random([1,2,3,4]))?randomSeed(124999210.33866358):2==seedChooser?randomSeed(20088393.962960925):3==seedChooser?randomSeed(102738549.64695875):randomSeed(144955035.23758054),o=0):e>.77?(compNames="comp2",seedChooser=random([1,2,4,5,1,4]),rotChY=random([0,1]),uRadC2=R.random_choice([0,0,0,0,1,1,1]),1==seedChooser?randomSeed(3880058.2605842287):2==seedChooser?randomSeed(18913671.86441485):4==seedChooser?randomSeed(155879.87955448776):5==seedChooser&&randomSeed(150902325.960804)):e>.68?(compNames="comp3",1==(seedChooser=random([1,2,8,1,2]))?randomSeed(109467394.53931598):2==seedChooser?randomSeed(101085646.42482981):randomSeed(9221765.304619182),o=0):e>.63?(compNames="comp4",seedChooser=random([1,1,2,4,2,2,3,3,4,3]),rotChY=random([0,1]),1==seedChooser?randomSeed(24288482.1603664):2==seedChooser?randomSeed(136895108.30131546):3==seedChooser?randomSeed(59956919.715252206):randomSeed(103037819.1500985),o=0):e>.47?(compNames="comp5",2==(seedChooser=random([2,3,4,6,7,8,9,3,7,8,9]))?randomSeed(62106201.516337566):3==seedChooser?randomSeed(15846824.234565198):4==seedChooser?randomSeed(133712810.95889445):6==seedChooser?randomSeed(78641511.83008125):7==seedChooser?randomSeed(127411789.00883949):8==seedChooser?randomSeed(122433972.10454836):randomSeed(45379661.40439634)):e>.35?(compNames="comp6",2==(seedChooser=random([2,3,4,5,2,4]))?randomSeed(86855412.08410487):3==seedChooser?randomSeed(865155.5263759163):4==seedChooser?randomSeed(44013099.49922091):randomSeed(70071837.39923896)):e>.2?(compNames="comp7",uRadC2=0,seedChooser=random([1,2,1]),rotChY=random([0,1]),1==seedChooser?randomSeed(85488884.24835339):2==seedChooser&&randomSeed(117427648.37402885)):e>.16?(compNames="comp8",rotChY=random([0,1,0,0]),randomSeed(7655796.202862505),o=0):(compNames="comp9",rotChY=random([0,1]),randomSeed(29867063.522541113),o=0),createCanvas(w*ar,w),pg=createGraphics(w*ar,w),blurPg=createGraphics(w*ar,w,WEBGL),bg=createGraphics(w*ar,w),blurPg2=createGraphics(w*ar,w,WEBGL),spaBuf=createGraphics(w*ar,w,WEBGL),pixelDensity(pix),colorMode(HSB,360,100,100,1),blurPg.imageMode(CENTER),pg.colorMode(HSB,360,100,100,1),bg.pixelDensity(pix),pg.pixelDensity(pix),spaBuf.pixelDensity(pix),spaBuf.noStroke(),blurPg.colorMode(HSB,360,100,100,1),blurPg.background(30,8,90),blurPg.pixelDensity(pix),blurPg2.colorMode(HSB,360,100,100,1),blurPg2.background(30,8,90),blurPg2.pixelDensity(pix),bg.colorMode(HSB,360,100,100,1),drawRandomTexture(ar,w),blurShader=blurPg2.createShader(theVertex,blurFrag),swirlShader=blurPg.createShader(theVertex,swFrag),spaShader=spaBuf.createShader(theVertex,spaFrag),background(0,0,2),pg.background(0,0,2),bg.background(0,0,2);let r=w/3.333;sunX1=random(width/2-r,width/2-50),sunY1=height/2,sunX2=random(width/2+w/20,width/2+r),sunY2=height/2;let a;a=1,sunRad1=random(w/4.34,w/3.03)/a,sunRad2=random(w/4.34,w/3.03)/a;let t=color(20,30,35),s=color(40,30,35),u=color(150,15,30),n=color(190,30,35),_=color(210,30,35),i=color(230,30,35),c=color(250,30,35),l=color(340,15,30),d=color(360,30,35),m=R.random_choice([t,s,u,n,_,i,c,l,d]),f=R.random_choice([t,s,u,n,_,i,c,l,d]);m==f&&(o=0),sunH1=hue(m),sunH2=hue(f),sunS1=saturation(m),sunS2=saturation(f),sunB1=brightness(m),sunB2=brightness(f),h1=random([20,40,30,340,180,200,150,0]),h2=random([20,40,30,340,180,200,150,0]),seaH2=random(1),alp=random(.2,.8),alp2=random(.3,.7);let h=random(1),v=random(1),p=random(1);if(uSc=1,h=h>.75?.76:h>.5?.51:h>.25?.26:0,v=v>.85?.86:v>.68?.69:v>.51?.52:v>.34?.35:v>.17?.18:0,uRadC2=uRadC2>.5?1:0,p=p>.85?.86:p>.68?.69:p>.51?.52:p>.34?.35:p>.17?.18:0,sky(sunH1,sunH2),sun(sunX1,sunY1,sunRad1,50,alp,sunH1,sunS1,sunB1,random([1,1.1,1.2,1.2,1.2,1.3]),2),sun(sunX2,sunY2,sunRad2,50,alp2,sunH2,sunS2,sunB2,random([1,1.1,1.2,1.2,1.2,1.3]),2),o<.85){pg.beginShape();for(let x=0;x<100;x++){let g=random(0,width-0),C=random(height),S=map(noise(C/20),0,1,-50,50),y=g+S,b=random(30,50),D=random(30,50),P=dist(y,C,sunX1,sunY1);P<sunRad1&&P>sunRad1/2&&(pg.fill(h1,b,random(30,60),alp+.1),pg.stroke(h1,D,random(30,60),alp+.1),pg.curveVertex(y,C))}pg.endShape(),pg.beginShape();for(let T=0;T<100;T++){let k=random(0,width-0),U=random(height),N=map(noise(U/20),0,1,-50,50),B=k+N,Y=random(30,50),A=random(30,50),M=dist(B,U,sunX2,sunY2);M<sunRad2&&M>sunRad2/2&&(pg.fill(h2,Y,random(30,60),alp+.1),pg.stroke(h2,A,random(30,60),alp+.1),pg.curveVertex(B,U))}pg.endShape()}roundInt=4,uOctave=round(random(3,4.5),roundInt),uFbmAmp=round(random(40,80),roundInt),uAmp=.15,uRoundness=round(4*random(1),roundInt),uDir1=round(4*random(1),roundInt),uDir2=round(4*random(1),roundInt),uRandStr=.5,uMult=random(1.5,2),uScale=random([.05,.2,.07,.1]),dir=random([1,-1]),"comp1"==compNames?(uRadC2=1,h=.51,v=.35,p=.69,shapeC=.41,uPi=random(1,1.5),uSc=random(1,1.5),uRound=random(.2,.4),rad=R.random_choice([.5,.6,.7,.8])/1.25,angle=R.random_choice([1,2]),tick=R.random_choice([0,.1])):"comp2"==compNames?(h=.51,v=0,p=random([0,.35]),shapeC=.41,uPi=1,1==uRadC2&&(p=.35),0==uRadC2&&(uPi=random([.65,1.4])),uSc=random(.7,1.5),uRound=random(.2,.35),rad=R.random_choice([.5,.5,.5,.5,.6,.6,.7,.8,.6,.8,.7,.8,.8])/1.25,angle=R.random_choice([1,1,1,1,1,2,1,2,1,1,1,1]),tick=R.random_choice([0,0,0,.1,.2,.3,.3,.2,.1,.3,0,.1,.2,0])):"comp3"==compNames?(uRadC2=0,h=random([.76,0,.26,.51,0,0]),v=.18,p=.18,shapeC=.41,uPi=random(1,2),uSc=random(.7,1.2),uRound=random(.1,.25),rad=R.random_choice([.5,.5,.5,.5,.6,.6,.7,.8,.6,.8,.7,.8,.8])/1.25,angle=R.random_choice([1,1,1,1,1,2,1,2,1,1,1,1]),tick=R.random_choice([0,0,0,.1,.2,.2,.1,0,.1,.2,0])):"comp4"==compNames?(uRadC2=1,h=random([.26,0]),v=.86,p=random([.69,.18]),tanC=random([0,0,0,0,1,1,1]),tanC2=random([1,1,1,0,0]),uPi=1,shapeC=.41,uSc=1,uRound=random(.05,.35),rad=R.random_choice([.6,.7,.8])/1.25,angle=R.random_choice([1,2]),tick=R.random_choice([0,.1,.2])):"comp5"==compNames?(uRadC2=0,h=random([.76,.26,0]),v=random([.52,.52,.52,.86,.86]),p=random([.52,.18,.69,.25,0,.35]),shapeC=.41,tanC=0,tanC2=random([0,1,1]),uPi=random([1,1,1,2,1,2,1,2,1,2]),uSc=random(.8,1.2),uRound=random(.1,.2),rad=R.random_choice([.5,.5,.5,.5,.6,.6,.7,.8,.6,.8,.7,.8,.8])/1.25,angle=R.random_choice([1,1,2,1,1,2,1,2,1,1,1,1]),tick=R.random_choice([0,0,0,.1,.2,.3,.3,.2,.1,.3,0,.1,.2,0])):"comp6"==compNames?(uRadC2=0,h=random([.26,.26,.26,.76,.51]),v=.35,p=random([.18,.52,0,.69,.86,.35]),shapeC=.41,uPi=random(.75,1.5),uSc=random(.5,1.5),uRound=random(.2,.45),rad=R.random_choice([.5,.5,.5,.5,.6,.6,.7,.8,.6,.8,.7,.8,.8])/1.25,angle=R.random_choice([1,1,2,1,1,2,1,2,1,1,1,1]),tick=R.random_choice([0,0,0,.1,.2,.3,.3,.2,.1,.3,0,.1,.2,0])):"comp7"==compNames?(h=random([0,.26]),v=0,p=random([.69,.35,.86,.52]),shapeC=.41,uPi=1,1==uRadC2&&(uPi=random(1,2)),uSc=random(.5,1.5),uRound=random(.2,.4),rad=R.random_choice([.5,.5,.5,.5,.6,.6,.7,.8,.6,.8,.7,.8,.8])/1.25,angle=R.random_choice([1,1,2,1,1,2,1,2,1,1,1,1]),tick=R.random_choice([0,0,0,.1,.2,.3,.3,.2,.1,.3,0,.1,.2,0])):"comp8"==compNames?(uRadC2=1,h=.76,v=.86,p=random([.25,.35,.35]),shapeC=.41,tanC=0,tanC2=0,uPi=1,0==p&&(tanC2=random([0,1]),uPi=random(1,1.5)),uSc=random(1,1.2),uRound=.2,rad=R.random_choice([.7,.8])/1.25,angle=2,tick=R.random_choice([.2,.1])):"comp9"==compNames&&(uRadC2=0,h=0,v=.69,p=.69,shapeC=.41,uPi=random(1,2),uSc=random(.74,1.5),uRound=random(.2,.5),rad=R.random_choice([.5,.5,.5,.5,.6,.6,.7,.8,.6,.8,.7,.8,.8])/1.25,angle=R.random_choice([1,1,2,1,1,2,1,2,1,1,1,1]),tick=R.random_choice([0,0,0,.1,.2,.3,.3,.2,.1,.3,0,.1,.2,0])),swW=random(1.5,3),shapeC=.41,radMult="comp1"==compNames||"comp4"==compNames||"comp8"==compNames?R.random_choice([1.75,1.5,1.75,1.5,1.75]):R.random_choice([2,2,2,1.75,1.5,1.75,2]);for(let F=0;F<2;F++)blurShader.setUniform("uTexture0",pg),blurShader.setUniform("randomTex",randomCanvas),blurShader.setUniform("u_amp",uAmp),blurShader.setUniform("uResolution",[width*pix,height*pix]),blurShader.setUniform("u_octave",uOctave),blurShader.setUniform("u_fbmAmp",uFbmAmp),blurShader.setUniform("u_roundness",uRoundness),blurShader.setUniform("u_dir1",uDir1),blurShader.setUniform("u_dir2",uDir1),blurShader.setUniform("u_randStr",uRandStr),blurShader.setUniform("u_mult",uMult),blurShader.setUniform("u_scale",uScale),blurPg2.noStroke(),blurPg2.shader(blurShader),blurPg2.translate(-width/2,-height/2),blurPg2.rect(0,0,width,height),bg.push(),bg.noStroke(),bg.imageMode(CENTER),bg.translate(width/2,height/2),bg.image(blurPg2,0,0,width,height),bg.pop(),starsBg(swW),swirlShader.setUniform("uTexture0",bg),swirlShader.setUniform("uResolution",[width*pix,height*pix]),swirlShader.setUniform("uCenter",[width/swW*pix,height/2*pix]),swirlShader.setUniform("uRad",rad),swirlShader.setUniform("uAngle",angle),swirlShader.setUniform("uTick",tick),swirlShader.setUniform("uShape",shapeC),swirlShader.setUniform("uDir",dir),swirlShader.setUniform("uRadMult",radMult),blurPg.noStroke(),blurPg.shader(swirlShader),blurPg.translate(-width/2,-height/2),blurPg.rect(0,0,width,height),spaShader.setUniform("resolution",[width*pix,height*pix]),spaShader.setUniform("randomTex",randomCanvas),spaShader.setUniform("img",blurPg),spaShader.setUniform("u_radC",v),spaShader.setUniform("u_angleC",h),spaShader.setUniform("u_dirR",p),spaShader.setUniform("uScale",uSc),spaShader.setUniform("uRound",uRound),spaShader.setUniform("u_radC2",uRadC2),spaShader.setUniform("u_tanC",tanC),spaShader.setUniform("u_tanC2",tanC2),spaShader.setUniform("uPi",uPi),spaBuf.shader(spaShader),spaBuf.rect(0,0,width,height),push(),0==rotCh?(translate(0,0),scale(1,1)):(translate(width,0),scale(-1,1)),1==rotChY&&(translate(0,height),scale(1,-1)),image(spaBuf,0,0),pop();stars(swW,1,2),stars(swW,.25,2.5),console.log("Lumina by DistC.")}function draw(){noLoop()}function keyPressed(){("s"==key||"S"==key)&&saveCanvas("DistCollective_Lumina","png")}function sun($,e,o,r,a,t,s,u,n,_){for(let i=0;i<r;i++){let c=random(1);c>.6?pg.beginShape(LINES):c>.4?.7>random(1)?100==r?pg.beginShape():pg.beginShape(TRIANGLE_FAN):pg.beginShape():pg.beginShape(TRIANGLES);for(let l=0;l<TAU;l+=.01){let d=map(noise(offset,.001*l),0,1,-50,50);offset+=.001;let m=o-i*o/20,f=o-i*o/20,h=$+cos(l/n)*m+d/2,v=e+sin(l/_)*f+d;pg.noFill(),pg.strokeWeight(1.2*random(1,2)),pg.stroke(t,s,u,random(a)),pg.curveVertex(h^l,v^l)}pg.endShape()}}function sky($,e){pg.push();let o=random([50,50,100,100,100,80])/2;for(let r=0;r<450;r++){var a=random(width),t=random(height),s=random(width),u=random(height),n=map(t,0,height/2,200,10);pg.noFill();var _=dist(sunX1,sunY1,a,t),i=dist(sunX2,sunY2,s,u),c=map(_,0,3.5*sunRad1,100,0),l=map(i,0,3.5*sunRad2,100,0);pg.stroke($,o,c,random(.1)),pg.strokeWeight(random(.5,1.2)*w/250),pg.line(a,t,a-random(-n,n),t),pg.stroke(e,o,l,random(.1)),pg.line(s,u,s-random(-n,n),u)}pg.pop()}function stars($,e,o){for(let r=0;r<w*o;r++){let a=random(width),t=random(height);noStroke(),beginShape(),drawingContext.shadowOffsetX=0,drawingContext.shadowOffsetY=0,drawingContext.shadowBlur=7,drawingContext.shadowColor="white";let s=random(.001,1)*e;for(let u=0;u<TAU;u+=PI/10){let n=a+sin(u)*s+random(-.5,.5),_=t+cos(u)*s+random(-.5,.5);fill(random([0,20,340,280]),random(7,20),random(90,100)/1,random(.01,.8)/1.2),curveVertex(n,_)}endShape()}}function starsBg($){for(let e=0;e<w/2;e++){let o=random(width),r=random(height);bg.noStroke(),bg.beginShape();let a=random(.01,2);for(let t=0;t<TAU;t+=PI/10){let s=o+sin(t)*a+random(-.5,.5),u=r+cos(t)*a+random(-.5,.5),n=dist(o,r,width/$,height/2);bg.fill(random([0,20,340,280]),random(10,30),random(90,100)/1,random(.01,.8)/1.2),n<width/3&&bg.curveVertex(s,u)}bg.endShape()}}class Random{constructor(){this.useA=!1;let $=function($){let e=parseInt($.substr(0,8),16),o=parseInt($.substr(8,8),16),r=parseInt($.substr(16,8),16),a=parseInt($.substr(24,8),16);return function(){r|=0;let $=((e|=0)+(o|=0)|0)+(a|=0)|0;return a=a+1|0,e=o^o>>>9,o=r+(r<<3)|0,r=(r=r<<21|r>>>11)+$|0,($>>>0)/4294967296}};this.prngA=new $(tokenData.hash.substr(2,32)),this.prngB=new $(tokenData.hash.substr(34,32));for(let e=0;e<1e6;e+=2)this.prngA(),this.prngB()}random_dec(){return this.useA=!this.useA,this.useA?this.prngA():this.prngB()}random_num($,e){return $+(e-$)*this.random_dec()}random_int($,e){return Math.floor(this.random_num($,e+1))}random_choice($){return $[this.random_int(0,$.length-1)]}}
"Lumina" engages in the delicate interplay of curved, organic lines and abstract forms, weaving a surreal narrative filled with rhythm and dynamism. It illustrates dreamy imagery of cosmic phenomena such as electromagnetic waves, magnetic reconnection, and gravitational pull. In its composition, "Lumina" balances fluid and structured elements, vibrant and muted tones. The artwork's glitchy and distorted textures, reminiscent of cosmic noise and stellar interference, further enhance its spatial narrative, offering a visual echo of the cosmic phenomena. "Lumina" lies in its balanced integration of organic and digital elements The first layer of the artwork, crafted with p5.js and a fBm shader, forms organic textures and generates diverse color palettes, establishing a visual field. This organic layer is then intertwined with a digital layer, where a custom fragment shader introduces subtle distortions and glitches, adding depth, complexity and luminance to the pieces. The inclusion of noise (and its artifacts) and various mathematical functions imbue the collection with a dreamlike ambiance. **Press [S] in live view to save a .png in 1687x3000 px.** This work involves intensive GPU processing. It's advisable to use modern hardware and ensure your browser's hardware acceleration is enabled for optimal performance. Using the Chrome browser on a desktop equipped with a high-end GPU is highly recommended. See website for more details about the collection and making of.
var styles=` html, body { width: 100%; height: 100%; margin: 0; padding: 0; } body { overflow: hidden; touch-action: none; background: #252525; } main { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; } canvas { width: auto !important; height: auto !important; max-width: 100% !important; max-height: 100% !important; /* box-shadow: 0px 0px 40px #000000;*/ } `,styleSheet=document.createElement("style");styleSheet.innerText=styles,document.head.appendChild(styleSheet);let hash=tokenData.hash,id=tokenData.tokenId;console.log("hash: "+hash),console.log("id: "+id);let rad,offset=0,blurShader,pix=2,w=1500,angle,tick,sunX1,sunX2,sunY1,sunY2,sunRad1,sunRad2,sunS1,sunH2,sunB1,sunB2,sunH1,sunS2,uRadC2,randomCanvas,uRandStr,uMult,ar,swirlShader,swW,shapeC,dir,h1,h2,uDir1,uDir2,uScale,spaBuf,spaShader,uSc,uRound,radMult,compNames,tanC,tanC2,rotCh,rotChY,seedChooser,nSeed,rSeed,asChooser,asBool,prm,uPi=1,theVertex=` #ifdef GL_ES precision highp float; #endif attribute vec3 aPosition; attribute vec2 aTexCoord; varying vec2 vTexCoord; void main() { vTexCoord = aTexCoord; vec4 positionVec4 = vec4(aPosition, 1.0); positionVec4.xy = positionVec4.xy * 2.0 - 1.0; gl_Position = positionVec4; } `,blurFrag=` precision highp float; #define PI 3.14159265359 varying vec2 vTexCoord; uniform sampler2D uTexture0; uniform vec2 uResolution; uniform float u_amp; uniform float u_octave; uniform float u_fbmAmp; uniform float u_roundness; uniform float u_angleC; uniform float u_dir1; uniform float u_dir2; uniform float u_randStr; uniform float u_mult; uniform sampler2D randomTex; uniform float u_scale; const float PHI = 1.61803398874989484820459; const float SEED = 43758.0; vec3 rgb2hsv(vec3 c) { vec4 K = vec4(0.0, -1.0 / 3.0, 2.0 / 3.0, -1.0); vec4 p = mix(vec4(c.bg, K.wz), vec4(c.gb, K.xy), step(c.b, c.g)); vec4 q = mix(vec4(p.xyw, c.r), vec4(c.r, p.yzx), step(p.x, c.r)); float d = q.x - min(q.w, q.y); float e = 1.0e-10; return vec3(abs(q.z + (q.w - q.y) / (6.0 * d + e)), d / (q.x + e), q.x); } vec3 hsv2rgb(vec3 c) { vec4 K = vec4(1.0, 2.0 / 3.0, 1.0 / 3.0, 3.0); vec3 p = abs(fract(c.xxx + K.xyz) * 6.0 - K.www); return c.z * mix(K.xxx, clamp(p - K.xxx, 0.0, 1.0), c.y); } float random(vec2 co){ return texture2D(randomTex, mod(co.xy/0.7,0.2) * PI).y; } float noise (in vec2 st) { vec2 i = floor(st); vec2 fu = fract(st); float a = random(i); float b = random(i + vec2(1.0, 0.0)); float c = random(i + vec2(0.0, 1.0)); float d = random(i + vec2(1.0, 1.0)); vec2 u = fu * fu * (3.0 - 2.0 * fu); return mix(a, b, u.x) + (c - a)* u.y * (1.0 - u.x) + (d - b) * u.x * u.y; } #define OCTAVES 12 float fbm (in vec2 st) { float value = 0.0; float amplitude = u_amp; float frequency = 0.1; for (int i = 0; i < OCTAVES; i++) { value += amplitude * noise(st); st *= u_octave; amplitude *= .45; } return value; } float fbm6( in vec2 p ) { vec2 q = vec2( fbm( p + vec2(0.0,u_roundness) ), fbm( p + vec2(u_dir1,2.0) ) ); vec2 r = vec2( fbm( p + 4.0*q + vec2(4.0,u_dir2)), fbm( p + 4.0*q + vec2(u_angleC * 4.0,0.0))); return fbm( p + u_fbmAmp * r ); } void main() { vec2 st = gl_FragCoord.xy/uResolution.xy; vec2 uv = vTexCoord; uv.y = 1.0 - uv.y; vec2 texelSize = 1.0 / uResolution; vec2 offset; float scale = u_scale; float offset2 = 0.1; float angle; angle = noise(st + uv * 0.2) * PI * 2.0; float radius = offset2; st *= scale; st *= radius * vec2(fract(angle * st.x), fract(angle / st.y)) + random(uv/1.0)/u_randStr; offset = texelSize * vec2(40.0,40.0) - fbm6(uv) + 0.18; vec4 color = vec4(0.0); float div; float mult = u_mult; color -= texture2D(uTexture0, uv + vec2(offset.y, st.y)*mult); color += texture2D(uTexture0, uv + vec2(-offset.y, st.y)*mult); color += texture2D(uTexture0, uv + vec2(-offset.x, st.x)*mult); color -= texture2D(uTexture0, uv + vec2(offset.x, st.x)*mult); color += texture2D(uTexture0, uv + vec2(offset.y, -st.y)*mult); color += texture2D(uTexture0, uv + vec2(-offset.y, -st.y)*mult); color += texture2D(uTexture0, uv + vec2(-offset.x, -st.x)*mult); color += texture2D(uTexture0, uv + vec2(offset.x, -st.x)*mult); vec3 hsv = rgb2hsv(color.rgb); hsv.y *= 1.4; color.rgb = hsv2rgb(hsv); color.rgb = ((color.rgb - vec3(0.5)) * 1.1 + vec3(0.5)); div = 2.5; color /= div; gl_FragColor = color; } `,spaFrag=` #ifdef GL_ES precision highp float; #endif #define PI 3.14159265359 const float PHI = 1.61803398874989484820459; const float SEED = 43758.0; varying vec2 vTexCoord; uniform sampler2D randomTex; uniform vec2 resolution; uniform sampler2D img; uniform float u_angleC; uniform float u_radC; uniform float u_dirR; uniform float uScale; uniform float uRound; uniform float u_radC2; uniform float u_tanC; uniform float utime; uniform float u_tanC2; uniform float uPi; float random(in vec2 co) {return texture2D(randomTex, mod(co.xy/0.7,0.2) * PI).x;} float noise (in vec2 st) { vec2 i = floor(st); vec2 fu = fract(st); float a = random(i); float b = random(i + vec2(1.0, 0.0)); float c = random(i + vec2(0.0, 1.0)); float d = random(i + vec2(1.0, 1.0)); vec2 u = fu * fu * (3.0 - 2.0 * fu); return mix(a, b, u.x) +(c - a)* u.y * (1.0 - u.x) + (d - b) * u.x * u.y; } void main( ) { vec2 st = gl_FragCoord.xy/resolution.xy; vec2 uv = vTexCoord; uv.y = 1.0 - uv.y; vec2 texelSize = 1.0 / resolution; vec2 offset; float scale = uScale; float offset2 = uRound; float angle; if(u_angleC > 0.75){ angle = noise(st / uv * 0.2) * PI * uPi; }else if(u_angleC > 0.50){ angle = noise(st * uv * 0.2) * PI * uPi; }else if(u_angleC > 0.25){ angle = noise(st - uv * 0.2) * PI * uPi; }else{ angle = noise(st + uv * 0.2) * PI * uPi; } float radius = offset2; st *= scale; if(u_radC > 0.85){ if(u_tanC > 0.50){ st *= radius * vec2(tan(angle * st.x), fract(angle * st.y)); }else{ if(u_tanC2 < 0.50){ st *= radius * vec2(tan(angle * st.x), sin(angle * st.y)); }else{ st *= radius * vec2(sin(angle * st.x), tan(angle * st.y)); } } }else if(u_radC > 0.68){ st *= radius * vec2(fract(angle / st.x), fract(angle / st.y)); }else if(u_radC > 0.51){ st *= radius * vec2(tan(angle * st.x), fract(angle / st.y)); }else if(u_radC > 0.34){ st *= radius * vec2(sin(angle * mod(st.x,st.y)), sin(angle / st.y *sin(st.x))); }else if(u_radC > 0.17){ st *= radius * noise(vec2(sin(angle), cos(angle)) / st * fract(uv)); }else{ st *= radius * vec2(fract(angle * st.x), fract(angle / st.y)); } if(u_radC2 < 0.50){ st *= radius * vec2(tan(angle/st.x) * cos(angle * st.x), sin(angle * st.y) + fract(st.y/angle)); }else{ } vec4 color = vec4(0.0); float div; if(u_dirR > 0.85){ color += texture2D(img, uv + vec2(st.x,st.y));//"Sağ" }else if(u_dirR > 0.68){ color += texture2D(img, uv + vec2(-st.y,-st.x));//"Sağ2" }else if(u_dirR > 0.51){ color += texture2D(img, uv + vec2(st.y,st.x));//"Norm" }else if(u_dirR > 0.34){ color += texture2D(img, uv + vec2(st.y,-st.x));//"Norm2" }else if(u_dirR > 0.17){ color += texture2D(img, uv + vec2(st.y*uv.y, st.x));//"SinsizUst" }else{ color += texture2D(img, uv + vec2(st.x,mod(uv.y,st.y)));// "AlttanTarama" } color -= texture2D(img, uv - noise(vec2(st.x, st.y)) / random(uv)); div = 0.45; color /= div; color += vec4(0.03,0.03,0.03,1.0); gl_FragColor = color; } `,swFrag=` precision highp float; #define PI 3.14159265359 varying vec2 vTexCoord; uniform sampler2D uTexture0; uniform vec2 uResolution; uniform vec2 uCenter; uniform float uRad; uniform float uAngle; uniform float uTick; uniform float uShape; uniform float uDir; uniform float utime; uniform float uRadMult; void main() { float effectRadius = uRad/uRadMult; float effectAngle = uAngle * PI * uDir; vec2 center = uCenter.xy / uResolution.xy; vec2 uv = gl_FragCoord.xy / uResolution.xy - center; float len = length(uv * vec2(uResolution.x / uResolution.y, 1.)); float angle = atan(uv.x, uv.y) + effectAngle * smoothstep(effectRadius, uTick, len); float radius = length(uv); vec4 color = vec4(0.0); color = texture2D(uTexture0, vec2(radius * sin(angle), radius * cos(angle)) + center); gl_FragColor = color; } `;function drawRandomTexture($,e){(randomCanvas=createImage(e,9*e/16)).loadPixels();for(let o=0;o<randomCanvas.width;o++)for(let r=0;r<randomCanvas.height;r++)randomCanvas.set(o,r,color(random(255)));randomCanvas.updatePixels(),randomSeed(rSeed)}function setup(){let $=window.location.search;5==(resPrm=(prm=new URLSearchParams($)).get("density"))&&(pix=5),4==resPrm&&(pix=4),3==resPrm&&(pix=3),2==resPrm&&(pix=2),nSeed=5198510*(R=new Random).random_dec(),rSeed=158191418*R.random_dec(),console.log("randomSeed: "+rSeed),ar=9/16,noiseSeed(nSeed),randomSeed(rSeed),asChooser=random(1),tanC=random(1),tanC2=random(1);let e=R.random_dec();rotCh=R.random_choice([0,1]),rotChY=0,uRadC2=random(1),random(1);let o=R.random_dec();e>.93?(compNames="comp1",1==(seedChooser=random([1,2,3,4]))?randomSeed(124999210.33866358):2==seedChooser?randomSeed(20088393.962960925):3==seedChooser?randomSeed(102738549.64695875):randomSeed(144955035.23758054),o=0):e>.77?(compNames="comp2",seedChooser=random([1,2,4,5,1,4]),rotChY=random([0,1]),uRadC2=R.random_choice([0,0,0,0,1,1,1]),1==seedChooser?randomSeed(3880058.2605842287):2==seedChooser?randomSeed(18913671.86441485):4==seedChooser?randomSeed(155879.87955448776):5==seedChooser&&randomSeed(150902325.960804)):e>.68?(compNames="comp3",1==(seedChooser=random([1,2,8,1,2]))?randomSeed(109467394.53931598):2==seedChooser?randomSeed(101085646.42482981):randomSeed(9221765.304619182),o=0):e>.63?(compNames="comp4",seedChooser=random([1,1,2,4,2,2,3,3,4,3]),rotChY=random([0,1]),1==seedChooser?randomSeed(24288482.1603664):2==seedChooser?randomSeed(136895108.30131546):3==seedChooser?randomSeed(59956919.715252206):randomSeed(103037819.1500985),o=0):e>.47?(compNames="comp5",2==(seedChooser=random([2,3,4,6,7,8,9,3,7,8,9]))?randomSeed(62106201.516337566):3==seedChooser?randomSeed(15846824.234565198):4==seedChooser?randomSeed(133712810.95889445):6==seedChooser?randomSeed(78641511.83008125):7==seedChooser?randomSeed(127411789.00883949):8==seedChooser?randomSeed(122433972.10454836):randomSeed(45379661.40439634)):e>.35?(compNames="comp6",2==(seedChooser=random([2,3,4,5,2,4]))?randomSeed(86855412.08410487):3==seedChooser?randomSeed(865155.5263759163):4==seedChooser?randomSeed(44013099.49922091):randomSeed(70071837.39923896)):e>.2?(compNames="comp7",uRadC2=0,seedChooser=random([1,2,1]),rotChY=random([0,1]),1==seedChooser?randomSeed(85488884.24835339):2==seedChooser&&randomSeed(117427648.37402885)):e>.16?(compNames="comp8",rotChY=random([0,1,0,0]),randomSeed(7655796.202862505),o=0):(compNames="comp9",rotChY=random([0,1]),randomSeed(29867063.522541113),o=0),createCanvas(w*ar,w),pg=createGraphics(w*ar,w),blurPg=createGraphics(w*ar,w,WEBGL),bg=createGraphics(w*ar,w),blurPg2=createGraphics(w*ar,w,WEBGL),spaBuf=createGraphics(w*ar,w,WEBGL),pixelDensity(pix),colorMode(HSB,360,100,100,1),blurPg.imageMode(CENTER),pg.colorMode(HSB,360,100,100,1),bg.pixelDensity(pix),pg.pixelDensity(pix),spaBuf.pixelDensity(pix),spaBuf.noStroke(),blurPg.colorMode(HSB,360,100,100,1),blurPg.background(30,8,90),blurPg.pixelDensity(pix),blurPg2.colorMode(HSB,360,100,100,1),blurPg2.background(30,8,90),blurPg2.pixelDensity(pix),bg.colorMode(HSB,360,100,100,1),drawRandomTexture(ar,w),blurShader=blurPg2.createShader(theVertex,blurFrag),swirlShader=blurPg.createShader(theVertex,swFrag),spaShader=spaBuf.createShader(theVertex,spaFrag),background(0,0,2),pg.background(0,0,2),bg.background(0,0,2);let r=w/3.333;sunX1=random(width/2-r,width/2-50),sunY1=height/2,sunX2=random(width/2+w/20,width/2+r),sunY2=height/2;let a;a=1,sunRad1=random(w/4.34,w/3.03)/a,sunRad2=random(w/4.34,w/3.03)/a;let t=color(20,30,35),s=color(40,30,35),u=color(150,15,30),n=color(190,30,35),_=color(210,30,35),i=color(230,30,35),c=color(250,30,35),d=color(340,15,30),l=color(360,30,35),m=R.random_choice([t,s,u,n,_,i,c,d,l]),f=R.random_choice([t,s,u,n,_,i,c,d,l]);m==f&&(o=0),sunH1=hue(m),sunH2=hue(f),sunS1=saturation(m),sunS2=saturation(f),sunB1=brightness(m),sunB2=brightness(f),h1=random([20,40,30,340,180,200,150,0]),h2=random([20,40,30,340,180,200,150,0]),seaH2=random(1),alp=random(.2,.8),alp2=random(.3,.7);let h=random(1),v=random(1),p=random(1);if(uSc=1,h=h>.75?.76:h>.5?.51:h>.25?.26:0,v=v>.85?.86:v>.68?.69:v>.51?.52:v>.34?.35:v>.17?.18:0,uRadC2=uRadC2>.5?1:0,p=p>.85?.86:p>.68?.69:p>.51?.52:p>.34?.35:p>.17?.18:0,sky(sunH1,sunH2),sun(sunX1,sunY1,sunRad1,50,alp,sunH1,sunS1,sunB1,random([1,1.1,1.2,1.2,1.2,1.3]),2),sun(sunX2,sunY2,sunRad2,50,alp2,sunH2,sunS2,sunB2,random([1,1.1,1.2,1.2,1.2,1.3]),2),o<.85){pg.beginShape();for(let x=0;x<100;x++){let g=random(0,width-0),C=random(height),S=map(noise(C/20),0,1,-50,50),y=g+S,b=random(30,50),D=random(30,50),P=dist(y,C,sunX1,sunY1);P<sunRad1&&P>sunRad1/2&&(pg.fill(h1,b,random(30,60),alp+.1),pg.stroke(h1,D,random(30,60),alp+.1),pg.curveVertex(y,C))}pg.endShape(),pg.beginShape();for(let T=0;T<100;T++){let k=random(0,width-0),U=random(height),N=map(noise(U/20),0,1,-50,50),B=k+N,Y=random(30,50),A=random(30,50),M=dist(B,U,sunX2,sunY2);M<sunRad2&&M>sunRad2/2&&(pg.fill(h2,Y,random(30,60),alp+.1),pg.stroke(h2,A,random(30,60),alp+.1),pg.curveVertex(B,U))}pg.endShape()}roundInt=4,uOctave=round(random(3,4.5),roundInt),uFbmAmp=round(random(40,80),roundInt),uAmp=.15,uRoundness=round(4*random(1),roundInt),uDir1=round(4*random(1),roundInt),uDir2=round(4*random(1),roundInt),uRandStr=.5,uMult=random(1.5,2),uScale=random([.05,.2,.07,.1]),dir=random([1,-1]),"comp1"==compNames?(uRadC2=1,h=.51,v=.35,p=.69,shapeC=.41,uPi=random(1,1.5),uSc=random(1,1.5),uRound=random(.2,.4),rad=R.random_choice([.5,.6,.7,.8])/1.25,angle=R.random_choice([1,2]),tick=R.random_choice([0,.1])):"comp2"==compNames?(h=.51,v=0,p=random([0,.35]),shapeC=.41,uPi=1,1==uRadC2&&(p=.35),0==uRadC2&&(uPi=random([.65,1.4])),uSc=random(.7,1.5),uRound=random(.2,.35),rad=R.random_choice([.5,.5,.5,.5,.6,.6,.7,.8,.6,.8,.7,.8,.8])/1.25,angle=R.random_choice([1,1,1,1,1,2,1,2,1,1,1,1]),tick=R.random_choice([0,0,0,.1,.2,.3,.3,.2,.1,.3,0,.1,.2,0])):"comp3"==compNames?(uRadC2=0,h=random([.76,0,.26,.51,0,0]),v=.18,p=.18,shapeC=.41,uPi=random(1,2),uSc=random(.7,1.2),uRound=random(.1,.25),rad=R.random_choice([.5,.5,.5,.5,.6,.6,.7,.8,.6,.8,.7,.8,.8])/1.25,angle=R.random_choice([1,1,1,1,1,2,1,2,1,1,1,1]),tick=R.random_choice([0,0,0,.1,.2,.2,.1,0,.1,.2,0])):"comp4"==compNames?(uRadC2=1,h=random([.26,0]),v=.86,p=random([.69,.18]),tanC=random([0,0,0,0,1,1,1]),tanC2=random([1,1,1,0,0]),uPi=1,shapeC=.41,uSc=1,uRound=random(.05,.35),rad=R.random_choice([.6,.7,.8])/1.25,angle=R.random_choice([1,2]),tick=R.random_choice([0,.1,.2])):"comp5"==compNames?(uRadC2=0,h=random([.76,.26,0]),v=random([.52,.52,.52,.86,.86]),p=random([.52,.18,.69,.25,0,.35]),shapeC=.41,tanC=0,tanC2=random([0,1,1]),uPi=random([1,1,1,2,1,2,1,2,1,2]),uSc=random(.8,1.2),uRound=random(.1,.2),rad=R.random_choice([.5,.5,.5,.5,.6,.6,.7,.8,.6,.8,.7,.8,.8])/1.25,angle=R.random_choice([1,1,2,1,1,2,1,2,1,1,1,1]),tick=R.random_choice([0,0,0,.1,.2,.3,.3,.2,.1,.3,0,.1,.2,0])):"comp6"==compNames?(uRadC2=0,h=random([.26,.26,.26,.76,.51]),v=.35,p=random([.18,.52,0,.69,.86,.35]),shapeC=.41,uPi=random(.75,1.5),uSc=random(.5,1.5),uRound=random(.2,.45),rad=R.random_choice([.5,.5,.5,.5,.6,.6,.7,.8,.6,.8,.7,.8,.8])/1.25,angle=R.random_choice([1,1,2,1,1,2,1,2,1,1,1,1]),tick=R.random_choice([0,0,0,.1,.2,.3,.3,.2,.1,.3,0,.1,.2,0])):"comp7"==compNames?(h=random([0,.26]),v=0,p=random([.69,.35,.86,.52]),shapeC=.41,uPi=1,1==uRadC2&&(uPi=random(1,2)),uSc=random(.5,1.5),uRound=random(.2,.4),rad=R.random_choice([.5,.5,.5,.5,.6,.6,.7,.8,.6,.8,.7,.8,.8])/1.25,angle=R.random_choice([1,1,2,1,1,2,1,2,1,1,1,1]),tick=R.random_choice([0,0,0,.1,.2,.3,.3,.2,.1,.3,0,.1,.2,0])):"comp8"==compNames?(uRadC2=1,h=.76,v=.86,p=random([.25,.35,.35]),shapeC=.41,tanC=0,tanC2=0,uPi=1,0==p&&(tanC2=random([0,1]),uPi=random(1,1.5)),uSc=random(1,1.2),uRound=.2,rad=R.random_choice([.7,.8])/1.25,angle=2,tick=R.random_choice([.2,.1])):"comp9"==compNames&&(uRadC2=0,h=0,v=.69,p=.69,shapeC=.41,uPi=random(1,2),uSc=random(.74,1.5),uRound=random(.2,.5),rad=R.random_choice([.5,.5,.5,.5,.6,.6,.7,.8,.6,.8,.7,.8,.8])/1.25,angle=R.random_choice([1,1,2,1,1,2,1,2,1,1,1,1]),tick=R.random_choice([0,0,0,.1,.2,.3,.3,.2,.1,.3,0,.1,.2,0])),swW=random(1.5,3),shapeC=.41,radMult="comp1"==compNames||"comp4"==compNames||"comp8"==compNames?R.random_choice([1.75,1.5,1.75,1.5,1.75]):R.random_choice([2,2,2,1.75,1.5,1.75,2]);for(let F=0;F<2;F++)blurShader.setUniform("uTexture0",pg),blurShader.setUniform("randomTex",randomCanvas),blurShader.setUniform("u_amp",uAmp),blurShader.setUniform("uResolution",[width*pix,height*pix]),blurShader.setUniform("u_octave",uOctave),blurShader.setUniform("u_fbmAmp",uFbmAmp),blurShader.setUniform("u_roundness",uRoundness),blurShader.setUniform("u_dir1",uDir1),blurShader.setUniform("u_dir2",uDir1),blurShader.setUniform("u_randStr",uRandStr),blurShader.setUniform("u_mult",uMult),blurShader.setUniform("u_scale",uScale),blurPg2.noStroke(),blurPg2.shader(blurShader),blurPg2.translate(-width/2,-height/2),blurPg2.rect(0,0,width,height),bg.push(),bg.noStroke(),bg.imageMode(CENTER),bg.translate(width/2,height/2),bg.image(blurPg2,0,0,width,height),bg.pop(),starsBg(swW),swirlShader.setUniform("uTexture0",bg),swirlShader.setUniform("uResolution",[width*pix,height*pix]),swirlShader.setUniform("uCenter",[width/swW*pix,height/2*pix]),swirlShader.setUniform("uRad",rad),swirlShader.setUniform("uAngle",angle),swirlShader.setUniform("uTick",tick),swirlShader.setUniform("uShape",shapeC),swirlShader.setUniform("uDir",dir),swirlShader.setUniform("uRadMult",radMult),blurPg.noStroke(),blurPg.shader(swirlShader),blurPg.translate(-width/2,-height/2),blurPg.rect(0,0,width,height),spaShader.setUniform("resolution",[width*pix,height*pix]),spaShader.setUniform("randomTex",randomCanvas),spaShader.setUniform("img",blurPg),spaShader.setUniform("u_radC",v),spaShader.setUniform("u_angleC",h),spaShader.setUniform("u_dirR",p),spaShader.setUniform("uScale",uSc),spaShader.setUniform("uRound",uRound),spaShader.setUniform("u_radC2",uRadC2),spaShader.setUniform("u_tanC",tanC),spaShader.setUniform("u_tanC2",tanC2),spaShader.setUniform("uPi",uPi),spaBuf.shader(spaShader),spaBuf.rect(0,0,width,height),push(),0==rotCh?(translate(0,0),scale(1,1)):(translate(width,0),scale(-1,1)),1==rotChY&&(translate(0,height),scale(1,-1)),image(spaBuf,0,0),pop();stars(swW,1,2),stars(swW,.25,2.5)}function draw(){noLoop()}function keyPressed(){"s"==key&&saveCanvas("DistCollective_Lumina","png")}function sun($,e,o,r,a,t,s,u,n,_){for(let i=0;i<r;i++){let c=random(1);c>.6?pg.beginShape(LINES):c>.4?.7>random(1)?100==r?pg.beginShape():pg.beginShape(TRIANGLE_FAN):pg.beginShape():pg.beginShape(TRIANGLES);for(let d=0;d<TAU;d+=.01){let l=map(noise(offset,.001*d),0,1,-50,50);offset+=.001;let m=o-i*o/20,f=o-i*o/20,h=$+cos(d/n)*m+l/2,v=e+sin(d/_)*f+l;pg.noFill(),pg.strokeWeight(1.2*random(1,2)),pg.stroke(t,s,u,random(a)),pg.curveVertex(h^d,v^d)}pg.endShape()}}function sky($,e){pg.push();let o=random([50,50,100,100,100,80])/2;for(let r=0;r<450;r++){var a=random(width),t=random(height),s=random(width),u=random(height),n=map(t,0,height/2,200,10);pg.noFill();var _=dist(sunX1,sunY1,a,t),i=dist(sunX2,sunY2,s,u),c=map(_,0,3.5*sunRad1,100,0),d=map(i,0,3.5*sunRad2,100,0);pg.stroke($,o,c,random(.1)),pg.strokeWeight(random(.5,1.2)*w/250),pg.line(a,t,a-random(-n,n),t),pg.stroke(e,o,d,random(.1)),pg.line(s,u,s-random(-n,n),u)}pg.pop()}function stars($,e,o){for(let r=0;r<w*o;r++){let a=random(width),t=random(height);noStroke(),beginShape(),drawingContext.shadowOffsetX=0,drawingContext.shadowOffsetY=0,drawingContext.shadowBlur=7,drawingContext.shadowColor="white";let s=random(.001,1)*e;for(let u=0;u<TAU;u+=PI/10){let n=a+sin(u)*s+random(-.5,.5),_=t+cos(u)*s+random(-.5,.5);fill(random([0,20,340,280]),random(7,20),random(90,100)/1,random(.01,.8)/1.2),curveVertex(n,_)}endShape()}}function starsBg($){for(let e=0;e<w/2;e++){let o=random(width),r=random(height);bg.noStroke(),bg.beginShape();let a=random(.01,2);for(let t=0;t<TAU;t+=PI/10){let s=o+sin(t)*a+random(-.5,.5),u=r+cos(t)*a+random(-.5,.5),n=dist(o,r,width/$,height/2);bg.fill(random([0,20,340,280]),random(10,30),random(90,100)/1,random(.01,.8)/1.2),n<width/3&&bg.curveVertex(s,u)}bg.endShape()}}class Random{constructor(){this.useA=!1;let $=function($){let e=parseInt($.substr(0,8),16),o=parseInt($.substr(8,8),16),r=parseInt($.substr(16,8),16),a=parseInt($.substr(24,8),16);return function(){r|=0;let $=((e|=0)+(o|=0)|0)+(a|=0)|0;return a=a+1|0,e=o^o>>>9,o=r+(r<<3)|0,r=(r=r<<21|r>>>11)+$|0,($>>>0)/4294967296}};this.prngA=new $(tokenData.hash.substr(2,32)),this.prngB=new $(tokenData.hash.substr(34,32));for(let e=0;e<1e6;e+=2)this.prngA(),this.prngB()}random_dec(){return this.useA=!this.useA,this.useA?this.prngA():this.prngB()}random_num($,e){return $+(e-$)*this.random_dec()}random_int($,e){return Math.floor(this.random_num($,e+1))}random_choice($){return $[this.random_int(0,$.length-1)]}}
Instructions; [space]: to pause and unpause [s]: saves the current canvas Click with cursor/tap with finger: populate the canvas and change the course of the animation To fully experience this artwork, it is recommended to open it in live view. There might be slight color variations between different aspect ratios -- "Life has a rhythm; it's constantly in motion"(Roebers, 2010), and embracing the notion that failure guides evolution(Whitehead, 1999). Aesthetics of Failure explores the organic fusion of two contrasting textures, seeking beauty within this blend. Dedicated to and inspired by Kim Cascone's article "The Aesthetics of Failure: Post-Digital Tendencies in Contemporary Computer Music"(2000), this collection employs custom shaders and p5.js to manipulate pixels and generate real-time animations that continuously evolve based on autonomous algorithmic choices. If the viewers choose to engage with the animation, they become active participants in shaping the artwork. By clicking and interacting with the animation, viewers populate the canvas and influence the computer's decision-making process. This interaction leads to a dynamic interplay between the human and the computer, blurring the boundaries in expression between creator, experiencer and the evolving creation. The animation's movement is guided by a steady rhythm, allowing viewers to perceive and adapt to the changes unfolding within the canvas. The computer continuously generates a stream of gestures, resulting in an ever-changing array of textures. Each gesture introduces new elements to the canvas, creating a fusion of watercolor-like forms and glitchy textures.
let w,h,pix=1,s,c,pg,pg2,img,sh,f,g,k,frameMod,pgStr,hyperMeter,blurShader,blurShader2,seed,contChooser,celColChooser,onOffChooser,sqChooser,sqTriChooser,borderStr,monoChooser,darkSat,darkHue,contStr,uOctave,monoStr,coun=0,shaderChooser,shaderChooser2,rect1X,rect1Y,rect1W,rect1H,rect2X,rect2Y,border,triChooser,blockChooser,blockColor,blockColor2,sqStr,stopCount=1,fr,dirC,durC,bgMult,eW,minDim,R,seedCounter1,seedCounter2,seedCounter3,theVertex=` #ifdef GL_ES precision highp float; #endif attribute vec3 aPosition; attribute vec2 aTexCoord; varying vec2 vTexCoord; void main() { vTexCoord = aTexCoord; vec4 positionVec4 = vec4(aPosition, 1.0); positionVec4.xy = positionVec4.xy * 2.0 - 1.0; gl_Position = positionVec4; } `,b1Frag=` precision highp float; #define PI 3.14159265359 varying vec2 vTexCoord; uniform sampler2D uTexture0; uniform float u_time; uniform vec2 uResolution; uniform float u_octave; uniform float u_fbmAmp; uniform float u_roundness; uniform float u_angleC; highp float random(vec2 co) { highp float a = 12.9898; highp float b = 78.233; highp float c = 43758.5453; highp float dt= dot(co.xy ,vec2(a,b)); highp float sn= mod(dt,3.14); return fract(sin(sn) * c); } float noise (in vec2 st) { vec2 i = floor(st); vec2 fu = fract(st); float a = random(i); float b = random(i + vec2(1.0, 0.0)); float c = random(i + vec2(0.0, 1.0)); float d = random(i + vec2(1.0, 1.0)); vec2 u = fu * fu * (3.0 - 2.0 * fu); return mix(a, b, u.x) + (c - a)* u.y * (1.0 - u.x) + (d - b) * u.x * u.y; } #define OCTAVES 4 float fbm (in vec2 st) { // Initial values float value = 0.0; float amplitude = 0.25; float frequency = 0.1; for (int i = 0; i < OCTAVES; i++) { value += amplitude* noise(st); st *= u_octave + u_time/100.0; amplitude *= .45; } return value; } float fbm6( in vec2 p ) { vec2 q = vec2( fbm( p + vec2(0.0,u_roundness) ),fbm( p + vec2(0.0,2.0) ) ); vec2 r = vec2( fbm( p + 4.0*q + vec2(4.0,3.0)),fbm( p + 4.0*q + vec2(u_angleC * 4.0,0.0))); return fbm( p + u_fbmAmp* r ); // 2.0, 6.0 } void main() { vec2 st = gl_FragCoord.xy/uResolution.xy; vec2 uv = vTexCoord; uv.y = 1.0 - uv.y; vec2 texelSize = 1.0 / uResolution; vec2 offset; float scale = 0.1; float offset2 = 0.1; float angle; angle = noise(st + uv * 0.2) * PI * 2.0; //0.01 0.4 float radius = offset2; st *= scale; st *= radius * vec2(fract(angle * st.x), fract(angle / st.y)); offset = texelSize * vec2(4.0,4.0) - fbm6(uv) + 0.18; vec4 color = vec4(0.0); float div; color += texture2D(uTexture0, uv + vec2(offset.y, st.y)); color += texture2D(uTexture0, uv + vec2(-offset.y, st.y)); color += texture2D(uTexture0, uv + vec2(-offset.x, st.x)); color += texture2D(uTexture0, uv + vec2(offset.x, st.x)); color += texture2D(uTexture0, uv + vec2(offset.y, -st.y)); color += texture2D(uTexture0, uv + vec2(-offset.y, -st.y)); color += texture2D(uTexture0, uv + vec2(-offset.x, -st.x)); color += texture2D(uTexture0, uv + vec2(offset.x, -st.x)); div = 8.0; color /= div; gl_FragColor = color; } `,b2Frag=` precision highp float; #define PI 3.14159265359 varying vec2 vTexCoord; uniform sampler2D uTexture0; uniform float u_time; uniform vec2 uResolution; uniform float u_octave; uniform float u_fbmAmp; uniform float u_roundness; uniform float u_angleC; highp float random(vec2 co) { highp float a = 12.9898; highp float b = 78.233; highp float c = 43758.5453; highp float dt= dot(co.xy ,vec2(a,b)); highp float sn= mod(dt,3.14); return fract(sin(sn) * c); } float noise (in vec2 st) { vec2 i = floor(st); vec2 fu = fract(st); float a = random(i); float b = random(i + vec2(1.0, 0.0)); float c = random(i + vec2(0.0, 1.0)); float d = random(i + vec2(1.0, 1.0)); vec2 u = fu * fu * (3.0 - 2.0 * fu); return mix(a, b, u.x) + (c - a)* u.y * (1.0 - u.x) + (d - b) * u.x * u.y; } #define OCTAVES 4 float fbm (in vec2 st) { // Initial values float value = 0.0; float amplitude = 0.25; float frequency = 0.1; for (int i = 0; i < OCTAVES; i++) { value += amplitude* noise(st); st *= u_octave + u_time/100.0; amplitude *= .45; } return value; } float fbm6( in vec2 p ){ vec2 q = vec2( fbm( p + vec2(0.0,u_roundness) ),fbm( p + vec2(0.0,2.0) ) ); vec2 r = vec2( fbm( p + 4.0*q + vec2(4.0,3.0)),fbm( p + 4.0*q + vec2(u_angleC * 4.0,0.0))); return fbm( p + u_fbmAmp* r ); } void main() { vec2 st = gl_FragCoord.xy/uResolution.xy; vec2 uv = vTexCoord; uv.y = 1.0 - uv.y; vec2 texelSize = 1.0 / uResolution; vec2 offset; float scale = 0.1; float offset2 = 0.1; float angle; angle = noise(st + uv * 0.2) * PI * 2.0; //0.01 0.4 float radius = offset2; st *= scale; st *= radius * vec2(fract(angle * st.x), fract(angle / st.y)); offset = texelSize * vec2(4.0,4.0) - fbm6(uv) + 0.18; vec4 color = vec4(0.0); float div; color += texture2D(uTexture0, uv + vec2(offset.y, st.y)); color += texture2D(uTexture0, uv + vec2(-offset.y, st.y)); color += texture2D(uTexture0, uv + vec2(-offset.x, st.x)); color += texture2D(uTexture0, uv + vec2(offset.x, st.x)); color += texture2D(uTexture0, uv + vec2(offset.y, -st.y)); color += texture2D(uTexture0, uv + vec2(-offset.y, -st.y)); color += texture2D(uTexture0, uv + vec2(-offset.x, -st.x)); color += texture2D(uTexture0, uv + vec2(offset.x, -st.x)); div = 8.0; color /= div; gl_FragColor = color; } `,pixFrag=` #ifdef GL_ES precision highp float; #endif uniform vec2 resolution; uniform sampler2D pg; uniform sampler2D pg2; uniform sampler2D img; uniform float ak; uniform float dirX; uniform float dirY; uniform float pgC; uniform float dur; uniform float onOff; uniform float celCol; uniform float contC; uniform float satOn; vec3 rgb2hsv(vec3 c) { vec4 K = vec4(0.0, -1.0 / 3.0, 2.0 / 3.0, -1.0); vec4 p = mix(vec4(c.bg, K.wz), vec4(c.gb, K.xy), step(c.b, c.g)); vec4 q = mix(vec4(p.xyw, c.r), vec4(c.r, p.yzx), step(p.x, c.r)); float d = q.x - min(q.w, q.y); float e = 1.0e-10; return vec3(abs(q.z + (q.w - q.y) / (6.0 * d + e)), d / (q.x + e), q.x); } vec3 hsv2rgb(vec3 c) { vec4 K = vec4(1.0, 2.0 / 3.0, 1.0 / 3.0, 3.0); vec3 p = abs(fract(c.xxx + K.xyz) * 6.0 - K.www); return c.z * mix(K.xxx, clamp(p - K.xxx, 0.0, 1.0), c.y); } void main() { vec2 uv = gl_FragCoord.xy / resolution; uv.y = 1. - uv.y; vec2 offset; vec2 pgCol; if(pgC == 1.){ offset = vec2(texture2D(pg2, uv).r * ak) * vec2(1./resolution.x, 1./resolution.y); pgCol = vec2(texture2D(pg, uv) ); }else if(pgC == 2.){ offset = vec2(texture2D(pg, uv).r * ak) * vec2(1./resolution.x, 1./resolution.y); pgCol = vec2(texture2D(pg2, uv) ) ; }else if(pgC == 3.){ offset = vec2(texture2D(pg2, uv).r * ak) * vec2(1./resolution.x, 1./resolution.y); pgCol = vec2(texture2D(pg2, uv) - texture2D(pg, uv)); } if(pgCol.x < .1) offset.x *= -1.; else offset.x *= dirX; if(pgCol.y < .1) offset.y *= -1.; else offset.y *= dirY; vec3 c = texture2D(img, uv+offset).rgb; if(dur == 1.0){ if(onOff == 0.){ c += texture2D(img, uv+offset).rgb; c -= texture2D(img, uv-offset).rgb; } } if(celCol > 0.65){ if(c.r + c.g + c.b < .1) c = vec3(0.0); }else if(celCol > 0.45){ if(c.r + c.g + c.b < .1) c = vec3(0.0); else if(c.r + c.g + c.b < 0.2) c = vec3(200., 127., 0.)/255.;//Yellow }else if(celCol > 0.15){ if(c.r + c.g + c.b < .1) c = vec3(0.0); else if(c.r + c.g + c.b < 0.2) c = vec3(10., 127., 255.)/255.;//Blue }else{ if(c.r + c.g + c.b < .1) c = vec3(0.0); else if(c.r + c.g + c.b < 0.2) c = vec3(36., 120., 36.)/255.;//Green } if(dur == 1.0){ if(onOff == 1.){ c += texture2D(img, uv+offset).rgb; c -= texture2D(img, uv-offset).rgb; } } if(satOn == 1.0){ vec3 hsv = rgb2hsv(c.rgb); hsv.y *= 1.01; c.rgb = hsv2rgb(hsv); } if(contC < 0.45){ c.rgb = ((c.rgb - vec3(0.5)) * 1.05 + vec3(0.5)); } gl_FragColor = vec4(c, 1.); } `;function setup(){noiseSeed(seed=99999999*(R=new Random).random_dec()),randomSeed(seed),w=windowWidth,h=windowHeight,bgMult=w>1500?2:w>1e3?1.5:1,c=createCanvas(w,h,WEBGL),pixelDensity(pix),(f=createGraphics(w,h)).pixelDensity(pix),f.colorMode(HSB,360,100,100,1),f.background(0,0,10),f.rectMode(CENTER),(pg=createGraphics(w,h)).pixelDensity(pix),pg.noStroke(),(pg2=createGraphics(w,h)).pixelDensity(pix),pg2.noStroke(),(g=createGraphics(w,h,WEBGL)).pixelDensity(pix),g.colorMode(HSB,360,100,100,1),g.background(0,0,80),(k=createGraphics(w,h,WEBGL)).colorMode(HSB,360,100,100,1),k.background(30,8,90),k.pixelDensity(pix),(img=createGraphics(w,h)).pixelDensity(pix),img.imageMode(CENTER),img.colorMode(HSB,360,100,100,1),img.rectMode(CENTER),sh=createShader(theVertex,pixFrag),blurShader=g.createShader(theVertex,b1Frag),blurShader2=k.createShader(theVertex,b2Frag),pgCh=random([1,2,3,1,2]);let e=[20,50,100,100,20,50];frameMod=e[floor(random(e.length))],minDim=min(width,height),s=random([minDim/20,minDim/20,minDim/10,minDim/10,minDim/3.33,minDim/5]),pgCh=random([1,2,3,1,2]),onOffChooser=random([0,1,0,0]),celColChooser=random(1),contChooser=R.random_dec(),shaderChooser=random(1),shaderChooser2=random(1),triChooser=random(1),blockChooser=R.random_dec(),sqTriChooser=R.random_dec(),dirC=random(1),durC=random(1),monoChooser=R.random_dec(),celColChooser=1,monoChooser<.25&&(monoStr="mono",contChooser=0),contChooser<.45&&(contStr="cont"),"mono"==monoStr&&(dirC=random([1,1,0,1,1])),pgStr=255,hyperMeter=random([4,8,8,8,12,12,8,8,4,4])/2,frameRate(fr=random([30,25,25,25,30,25])),sqChooser=random(1),darkHue=random([0,180,40,220,90,150,200,280,320]),darkSat="mono"==monoStr?0:80,eW=min(width,height)/8;for(let o=0;o<3e4;o++){let r=random(width),t=random(height);noise(.01*r,.01*t),f.noFill(),f.stroke(0,0,90,1),f.strokeWeight(random(.5,1)),f.ellipse(r,t,random(eW)),f.noFill(),f.stroke(darkHue,darkSat,10,1),f.ellipse(r+random(-10,10),t+random(-10,10),random(eW))}noiseSeed(seed),randomSeed(seed),shader(sh),sh.setUniform("resolution",[w*pix,h*pix]),sh.setUniform("pg",pg),sh.setUniform("pg2",pg2),sh.setUniform("img",f),sh.setUniform("ak",random([1,10,5,20])),sh.setUniform("dirX",random([-1,1,0,0])),sh.setUniform("dirY",random([-1,1,0,0])),sh.setUniform("pgC",pgCh),sh.setUniform("onOff",onOffChooser),sh.setUniform("celCol",celColChooser),sh.setUniform("contC",contChooser),sh.setUniform("satOn",1),img.image(f,w/2,h/2),uSqr=0,roundInt=4,uAmp=random(.25,.35),uOctave=round(random(1,2.5),roundInt),uFbmAmp=round(random(30,80),roundInt),uAngleC=round(random(1),roundInt),uAmp2=random(.25,.35),uOctave2=round(random(1,2.5),roundInt),uFbmAmp2=round(random(30,80),roundInt),uAngleC2=round(random(1),roundInt),sqChooser<.5?(rect1X=width/2,rect1Y=random([height/4,height-height/4]),rect1W=width,rect1H=height/random(1.9,2.1),sqStr="yatay",sqTriChooser<.5&&(rect1X=width/2,rect1Y=height/8,rect1W=width,rect1H=height/3.333,rect2X=width/2,rect2Y=height-height/8)):(rect1X=random([width/4,width-width/4]),rect1Y=height/2,rect1W=width/random(1.9,2.1),rect1H=height,sqStr="dikey",sqTriChooser<.5&&(rect1X=width/8,rect1Y=height/2,rect1W=width/3.333,rect1H=height,rect2X=width-width/8,rect2Y=height/2)),blockColor=255,blockColor2=255,0==(border=random([1,1,1,1,1,1]))&&(borderStr="no"),seedCounter1=0,seedCounter2=0,seedCounter3=0}function draw(){let e=(random(w/s)^frameCount/s)*s,o=(random(h/s)^frameCount/s)*s;if(pg.fill(random([0,127,255]),random([0,127,255]),0),pg.rect(e^o,o,2*s,2*s),pg2.fill(random([20,50,100]),2*random([20,50,100]),0),yamuk(e^o,o,2*s,2*s),1==border&&(pg2.push(),pg2.fill(blockColor),blockChooser>.4?(yamuk(rect1X,rect1Y,rect1W,rect1H),sqTriChooser<.5&&(pg2.fill(blockColor2),yamuk(rect2X,rect2Y,rect1W,rect1H))):blockChooser>.2?pg2.ellipse(width/2,height/2,height/1.25):tri(),pg2.pop()),blurShader.setUniform("uTexture0",pg),blurShader.setUniform("u_time",millis()/1e3),blurShader.setUniform("uResolution",[width*pix,height*pix]),blurShader.setUniform("u_amp",uAmp),blurShader.setUniform("u_octave",uOctave),blurShader.setUniform("u_fbmAmp",uFbmAmp),blurShader.setUniform("u_angleC",uAngleC),blurShader.setUniform("u_sqr",uSqr),g.noStroke(),g.shader(blurShader),g.translate(-width/2,-height/2),g.rect(0,0,width,height),blurShader2.setUniform("uTexture0",pg2),blurShader2.setUniform("u_time",millis()/1e3),blurShader2.setUniform("uResolution",[width*pix,height*pix]),blurShader2.setUniform("u_amp",uAmp2),blurShader2.setUniform("u_octave",uOctave2),blurShader2.setUniform("u_fbmAmp",uFbmAmp2),blurShader2.setUniform("u_angleC",uAngleC2),blurShader2.setUniform("u_sqr",uSqr),k.noStroke(),k.shader(blurShader2),k.translate(-width/2,-height/2),k.rect(0,0,width,height),img.image(c,w/2,h/2),frameCount%frameMod==0){let r=random([minDim/40,minDim/25,minDim/10,minDim/40,minDim/25,minDim/100,minDim/10,minDim/10,minDim/5]);blockColor=random([0,255,255,255]),blockColor2=random([0,255,255,255]);for(let t=0;t<h;t+=r)for(let $=0;$<w;$+=r)pg.fill(random([0,127,86]),random([0,127,86]),0),pg.rect($,t,2*r,2*r);if(1==(seedCounter1+=1)){let i=99999999*R.random_dec();noiseSeed(i),randomSeed(i),seedCounter1=0}if(sh.setUniform("ak",random([1,10,5,15,10,5,10,10,5,1])),dirC<.15&&(sh.setUniform("dirX",random([-1,1,0,0])),sh.setUniform("dirY",random([-1,1,0,0]))),"cont"==contStr){for(let u=0;u<10/bgMult;u++)for(let l=0;l<width;l++){let n=random(width),a=random(height),_=noise(.01*n,.01*a)/50;img.noFill(),img.stroke(darkHue,random([0,darkSat]),random([10,90,90,0]),2*_),img.strokeWeight(random(.5,1)),img.ellipse(n,a,random(100))}if(1==(seedCounter2+=1)){let m=99999999*R.random_dec();noiseSeed(m),randomSeed(m),seedCounter2=0}"mono"==monoStr?sh.setUniform("dur",random([1,0,0])):sh.setUniform("dur",random([1,0,0,0]))}else sh.setUniform("dur",random([1,0,0,0,0,0,0]))}if(frameCount%(frameMod*hyperMeter)==0){sh.setUniform("dirX",random([-1,1,0,0,0])),sh.setUniform("dirY",random([-1,1,0,0,0])),sh.setUniform("satOn",random([1,0,0]));for(let v=0;v<10/bgMult;v++)for(let d=0;d<1*width;d++){let p=random(width),x=random(height),b=noise(.01*p,.01*x)/50;img.noFill(),img.stroke(darkHue,random([0,darkSat]),random([0,100,100,90,0]),2*b),img.strokeWeight(random(.5,1)),img.ellipse(p,x,random(100))}if(1==(seedCounter3+=1)){let C=99999999*R.random_dec();noiseSeed(C),randomSeed(C),seedCounter3=0}"cont"==contStr?sh.setUniform("dur",1):sh.setUniform("dur",random([1,0,0,0]))}if(mouseIsPressed&&1==(coun+=1)){blockColor=255,blockColor2=255,sh.setUniform("dur",1),sh.setUniform("celCol",celColChooser),sh.setUniform("dirX",random([-1,1,0,0])),sh.setUniform("dirY",random([-1,1,0,0]));for(let y=0;y<5;y++)for(let S=0;S<1*width;S++){let D=random(width),U=random(height),T=noise(.01*D,.01*U)/50;img.noFill(),img.stroke(darkHue,darkSat,random([0,100,100,90]),2*T),img.strokeWeight(random(.5,1)),img.ellipse(D,U,random(100))}coun=0}shaderChooser2<.65?sh.setUniform("pg",g):sh.setUniform("pg",pg),sh.setUniform("img",img),shaderChooser<.65?sh.setUniform("pg2",k):blockChooser>.2?sh.setUniform("pg2",pg2):sh.setUniform("pg2",k),sh.setUniform("time",millis()),quad(-1,-1,1,-1,1,1,-1,1)}function yamuk(e,o,r,t){pg2.beginShape(),pg2.noStroke();let $=min(r,t)/7;pg2.vertex(e-r/2+random(-$,$),o-t/2+random(-$,$)),pg2.vertex(e-r/4+random(-$,$),o-t/2+random(-$,$)),pg2.vertex(e+random(-$,$),o-t/2+random(-$,$)),pg2.vertex(e+r/4+random(-$,$),o-t/2+random(-$,$)),pg2.vertex(e+r/2+random(-$,$),o-t/2+random(-$,$)),pg2.vertex(e+r/2+random(-$,$),o-t/4+random(-$,$)),pg2.vertex(e+r/2+random(-$,$),o+random(-$,$)),pg2.vertex(e+r/2+random(-$,$),o+t/4+random(-$,$)),pg2.vertex(e+r/2+random(-$,$),o+t/2+random(-$,$)),pg2.vertex(e+r/4+random(-$,$),o+t/2+random(-$,$)),pg2.vertex(e+random(-$,$),o+t/2+random(-$,$)),pg2.vertex(e-r/4+random(-$,$),o+t/2+random(-$,$)),pg2.vertex(e-r/2+random(-$,$),o+t/2+random(-$,$)),pg2.vertex(e-r/2+random(-$,$),o+t/4+random(-$,$)),pg2.vertex(e-r/2+random(-$,$),o+random(-$,$)),pg2.vertex(e-r/2+random(-$,$),o-t/4+random(-$,$)),pg2.endShape()}function yamukF(e,o,r,t){f.beginShape(),f.noStroke();let $=r/2;f.vertex(e-r/2+random(-$,$),o-t/2+random(-$,$)),f.vertex(e+r/2+random(-$,$),o-t/2+random(-$,$)),f.vertex(e+r/2+random(-$,$),o+t/2+random(-$,$)),f.vertex(e-r/2+random(-$,$),o+t/2+random(-$,$)),f.endShape()}function tri(){pg2.beginShape(),pg2.noStroke(),triChooser<.5?(pg2.vertex(0,0),pg2.vertex(width,0),pg2.vertex(width,height)):(pg2.vertex(0,0),pg2.vertex(0,height),pg2.vertex(width,0)),pg2.endShape()}function keyPressed(){" "==key&&((stopCount+=1)%2==0?frameRate(0):frameRate(fr)),"s"==key&&saveCanvas("AestheticsOfFailure_DistCollective","png")}class Random{constructor(){this.useA=!1;let e=function(e){let o=parseInt(e.substr(0,8),16),r=parseInt(e.substr(8,8),16),t=parseInt(e.substr(16,8),16),$=parseInt(e.substr(24,8),16);return function(){t|=0;let e=((o|=0)+(r|=0)|0)+($|=0)|0;return $=$+1|0,o=r^r>>>9,r=t+(t<<3)|0,t=(t=t<<21|t>>>11)+e|0,(e>>>0)/4294967296}};this.prngA=new e(tokenData.hash.substr(2,32)),this.prngB=new e(tokenData.hash.substr(34,32));for(let o=0;o<1e6;o+=2)this.prngA(),this.prngB()}random_dec(){return this.useA=!this.useA,this.useA?this.prngA():this.prngB()}}
“Spacetime grips mass, telling it how to move... Mass grips spacetime, telling it how to curve.” – John Archibald Wheeler Spatial Curvatures captures the powerful and mysterious essence of the universe, depicting the phenomena of gravitational lensing, the spacetime continuum, and the space fabric. The main focus of this piece is the visualization of the warping, bending, and fracturing of light and space fabric caused by gravity. The viewer can see how the fabric of spacetime is affected by the presence of matter and energy, and how this in turn affects the motion of objects within the universe. In creating this artwork, a particle system was utilized to create the spacetime fabric, and various shaders were used to visualize how gravity can warp, bend, and fracture the fabric and light. To obtain higher resolution output, you can press the 's' key in live view. Alternatively you can right-click and save the preview image. Due to differences in how shaders operate in different engines, there may be slight differences between the preview image and the live-rendered output. Made with p5js and custom glsl shaders. DistCollective, February 2023
var styles=` html, body { width: 100%; height: 100%; margin: 0; padding: 0; } body { overflow: hidden; touch-action: none; background: #252525; } main { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; } canvas { width: auto !important; height: auto !important; max-width: 100% !important; max-height: 100% !important; /* box-shadow: 0px 0px 40px #000000;*/ } `,styleSheet=document.createElement("style");styleSheet.innerText=styles,document.head.appendChild(styleSheet);let particles=[],particles2=[],particles3=[],particles4=[],particles5=[],particles6=[],particles7=[],particles8=[],particles9=[],mult=.03,vec,vec2,vec3,vec4,vec5,vec6,vec7,vec8,vec9,hash=tokenData.hash,id=tokenData.tokenId;console.log(hash),console.log(id);let rSeed,nSeed,nSeed1,nSeed2,nSeed3,progress1,progress2,progress3,progress,rSeed1=12.49414,rSeed2=78.233,rSeed3=43758.5453123,strokesSc,blurSc,drawAngle,uSqr,stC,uRand,uRand2,speed,sek,counter=0,sw,flag1=!1,flag2=!1,flag3=!1,flag4=!1,bolBol=!1,colPic,colPic2,colPic3,yatayChooser,yataStr,bol1,bol2,bol3,fr,pg,blurBg,blurShader,c=0,c2=0,noiseRandom1,noiseRandom2,noiseRandom3,xoff1=0,xoff2=0,xoff3=0,uvChooser,uvChooser2,intensityC,roundnessC,angleC,radC,darkC,denC,sinC,max,wi,fbmShader,strokeShader,strokePg,fbmPg,uRoundness,uAngleC,shaderC,pgPg,dirR,randRan,dirCr,noiseC,soloChooser,rotateC,rotCh,angleC2,radC2,dirR2,col1,col2,col3,colV1,colV2,colV3,col1Smin,col1Smax,col2Smin,col2Smax,col3Smin,col3Smax,col1Bmin,col1Bmax,col2Bmin,col2Bmax,col3Bmin,col3Bmax,colV1Bmin,colV1Bmax,colV2Bmin,colV2Bmax,colV3Bmin,colV3Bmax,colV1Smin,colV1Smax,colV2Smin,colV2Smax,colV3Smin,colV3Smax,briMult,briMult2,uniRand1,uniRand2,fbmC,pix=2,kalCh,combinationC,combName,granPg,dirdir,fig,genel,stars=[],fvertexsh=` attribute vec3 aPosition; attribute vec2 aTexCoord; varying vec2 vTexCoord; void main() { vTexCoord = aTexCoord; vec4 positionVec4 = vec4(aPosition, 1.0); positionVec4.xy = positionVec4.xy * 2.0 - 1.0; gl_Position = positionVec4; }`,ffragsh=` precision mediump float; #define PI 3.14159265359 varying vec2 vTexCoord; uniform sampler2D uTexture0; uniform float u_time; uniform vec2 uResolution; uniform float u_amp; uniform float u_octave; uniform float u_fbmAmp; uniform float uvChooser; uniform float u_intensity; uniform float u_roundness; uniform float u_angleC; uniform float u_sqr; uniform float u_darkC; uniform float u_fbmC; const float PHI = 1.61803398874989484820459; const float SEED1 = 12.0; const float SEED2 = 78.0; const float SEED3 = 437.0; float random (in vec2 st) { return fract(sin(dot(st.xy, vec2(SEED1,SEED2)))*SEED3); } float noise (in vec2 st) { vec2 i = floor(st); vec2 fu = fract(st); float a = random(i); float b = random(i + vec2(1.0, u_sqr));//1.0 float c = random(i + vec2(0.0, 1.0)); float d = random(i + vec2(1.0, 1.0)); vec2 u = fu * fu * (3.0 - 2.0 * fu); return mix(a, b, u.x) +(c - a)* u.y * (1.0 - u.x) +(d - b) * u.x * u.y; } #define OCTAVES 24 float fbm (in vec2 st) { float value = 0.0; float amplitude = 0.2;//u_amp;//0.1,0.24 float frequency = 0.1; for (int i = 0; i < OCTAVES; i++) { value += amplitude * noise(st); st *= u_octave; amplitude *= .45; } return value; } float fbm6( in vec2 p ) { vec2 q = vec2( fbm( p + vec2(0.0,0.0) ), fbm( p + vec2(0.0,2.0) ) ); vec2 r = vec2( fbm( p + 4.0*q + vec2(4.0,3.0)), fbm( p + 4.0*q + vec2(0.0,0.0))); return fbm( p + 1.0 * r ); // 2.0, 6.0 } void main() { vec2 st = gl_FragCoord.xy/uResolution.xy; vec2 uv = vTexCoord; uv.y = 1.0 - uv.y; vec2 texelSize = 1.0 / uResolution; vec2 offset; float scale = 0.1; float offset2 = 0.1; float angle; angle = noise(st / uv * 0.2) * PI * 1.0; float radius = offset2; st *= scale; offset = texelSize * vec2(0.0,0.0) - fbm6(uv) + 0.15; vec4 color = vec4(0.0); float div; float mult = 1.0; color += texture2D(uTexture0, uv + vec2(offset.x, offset.y)); if(u_fbmC < 0.65){ color += texture2D(uTexture0, uv + vec2(offset.x, offset.y) * 4.0); mult = 2.0; } color += fbm(uv*2.0); div = 1.1*mult; color /= div; color += vec4(0.0,-0.01,-0.02,0.0); gl_FragColor = color; } `,bvertexsh=` attribute vec3 aPosition; attribute vec2 aTexCoord; varying vec2 vTexCoord; void main() { vTexCoord = aTexCoord; vec4 positionVec4 = vec4(aPosition, 1.0); positionVec4.xy = positionVec4.xy * 2.0 - 1.0; gl_Position = positionVec4; }`,bfragsh=` precision mediump float; #define PI 3.14159265359 varying vec2 vTexCoord; uniform sampler2D uTexture0; uniform float u_time; uniform vec2 uResolution; uniform vec2 uScale; uniform float u_rand; uniform vec2 u_mouse; uniform float u_blurSel1; uniform float u_blurSel2; uniform float uvChooser; uniform float uvChooser2; uniform float u_intensity; uniform float u_roundness; uniform float u_angleC; uniform float u_radC; uniform float u_darkC; uniform float u_dirR; uniform float u_noiseC; uniform float u_blurSc; uniform float u_random; uniform float u_rSeed1; uniform float u_rSeed2; uniform float u_rSeed3; uniform float u_angleC2; uniform float u_radC2; uniform float u_dirR2; const float PHI = 1.61803398874989484820459; const float SEED = 43758.0; float random(in vec2 st) { return fract(tan(distance(st*PHI*1.0, st * PI*1.0)*SEED)*st.x); } float noise (in vec2 st) { vec2 i = floor(st); vec2 fu = fract(st); float a = random(i); float b = random(i + vec2(1.0, 0.0)); float c = random(i + vec2(0.0, 1.0)); float d = random(i + vec2(1.0, 1.0)); vec2 u = fu * fu * (3.0 - 2.0 * fu); return mix(a, b, u.x) +(c - a)* u.y * (1.0 - u.x) + (d - b) * u.x * u.y; } void main() { vec2 st = gl_FragCoord.xy/uResolution.xy; vec2 uv = vTexCoord; if(uvChooser > 0.60){ uv.y = 1.0 - uv.y; } vec2 texelSize = 1.0 / uResolution; vec2 offset; float scale = u_intensity; float offset2 = u_roundness; float angle; if(u_angleC > 0.90){ angle = noise(st / uv * u_random) * PI * 1.0; }else if(u_angleC > 0.65){ angle = noise(st + uv * u_random) * PI * 1.0; }else if(u_angleC > 0.40){ angle = noise(st - uv * u_random) * PI * 1.0; }else{ angle = noise(st / mod(uv, st) * u_random) * PI * 1.0; } float radius = offset2; st *= scale; if(u_radC > 0.90){ st *= radius * vec2(fract(angle * st.x), fract(angle / st.y)); }else if(u_radC > 0.70){ st *= radius * vec2(fract(angle / st.x), fract(angle / st.y)); }else if(u_radC > 0.45){ st *= radius * vec2(tan(angle * st.x), fract(angle / st.y)); }else if(u_radC > 0.25){ st *= radius * vec2(sin(angle * mod(st.x,st.y)), sin(angle / st.y *sin(st.x))); }else{ st *= radius * noise(vec2(sin(angle), cos(angle)) / st * fract(uv)); } if(u_radC2 < 0.50){ st *= radius * vec2(tan(angle/st.x) * cos(angle * st.x), sin(angle * st.y) + fract(st.y/angle)); }else{ } vec4 color = vec4(0.0); float div; if(u_dirR > 0.90){ color += texture2D(uTexture0, uv + vec2(-st.y,st.x));//"Sağ" }else if(u_dirR > 0.70){ color += texture2D(uTexture0, uv + vec2(-st.y,-st.x));//"Sağ2" }else if(u_dirR > 0.65){ color += texture2D(uTexture0, uv + vec2(st.y,st.x));//"Norm" }else if(u_dirR > 0.50){ color += texture2D(uTexture0, uv + vec2(st.y,-st.x));//"Norm2" }else if(u_dirR > 0.30){ color += texture2D(uTexture0, uv + vec2(st.y*uv.y, st.x));//"SinsizUst" }else{ color += texture2D(uTexture0, uv + vec2(st.x,uv.y));// "AlttanTarama" } color -= texture2D(uTexture0, uv + noise(vec2(st.x, st.y) / random(uv))); div = 0.40; color /= div; color += vec4(0.12,0.12,0.12,1.0); gl_FragColor = color; } `;function setup(){let e=16/9;createCanvas(1e3,1e3*e),pg=createGraphics(1e3,1e3*e),fbmPg=createGraphics(1e3,1e3*e,WEBGL),blurBg=createGraphics(1e3,1e3*e,WEBGL),granPg=createGraphics(1e3,1e3*e),fbmShader=fbmPg.createShader(fvertexsh,ffragsh),blurShader=blurBg.createShader(bvertexsh,bfragsh),pixelDensity(pix),colorMode(HSB,360,100,100,1),background(20,10,80),rectMode(CENTER),pg.pixelDensity(pix),pg.colorMode(HSB,360,100,100,1),pg.background(20,10,80),pg.rectMode(CENTER),blurBg.pixelDensity(pix),blurBg.colorMode(HSB,360,100,100,1),blurBg.background(20,10,80),blurBg.rectMode(CENTER),fbmPg.pixelDensity(pix),fbmPg.colorMode(HSB,360,100,100,1),fbmPg.background(20,10,80),fbmPg.rectMode(CENTER),granPg.pixelDensity(pix),granPg.colorMode(HSB,360,100,100,1),granPg.rectMode(CENTER);let $=new Random;rSeed=999999*$.random_dec(),nSeed=999999*$.random_dec(),nSeed1=1874915*$.random_dec(),nSeed2=158719*$.random_dec(),nSeed3=527915*$.random_dec(),randomSeed(rSeed),noiseSeed(nSeed);for(let t=0;t<13e3;t++)granPg.stroke(0,0,random(40,80),random(.7)),granPg.strokeWeight(random(.5)),granPg.point(random(width),random(height));colPic=random(1);let r=random(1);colPic>.6?r<.4?(col1=190,col2=10,col3=30):(col1=30,col2=190,col3=10):colPic>.2?(col1=220,col2=20,col3=180):(col1=20,col2=220,col3=180),briMult=1,briMult2=1,sw=1.5*map(pix,1,7,2,2.35),yatayChooser=random(1),shaderC=random(1),soloChooser=random(1),noiseRandom1=random(45,55),noiseRandom2=random(45,55),noiseRandom3=random(45,55),wi=random(15,20),drawAngle=random(1),colPic2=random(1),uvChooser=random([0,1,1]),uvChooser2=random([0,0,0,1]),rotCh=random([0,1,2,3,0,0]),randRan=random(1),denC=random(1),sinC=random(1),dirCr=random(1),uAmp=random(.15,.24),uOctave=random(2.1,5),uFbmAmp=random(1,4),uRoundness=random(1),uAngleC=random(1),uSqr=0,stC=random(1),uRand=random(1),uRand2=random(1),rotateC=random(1),strokesSc=random([.5,1,1]),blurSc=random([.5,1,1]),uniRand1=round(random(.2,.4),2),uniRand2=round(random(.1,.4),2),fbmC=random(1),noiseC=1,kalCh=random(1),angleC=random(1),radC=random(1),dirR=random(1),angleC2=random(1),radC2=random(1),dirR2=random(1),intensityC=round(random(.1,2),4),roundnessC=round(random(.05,.16),4),"Eye"==(combName=(combinationC=random(1))>.93?"Eye":combinationC>.8?"LeftEye":combinationC>.7?"LightSaber":combinationC>.64?"AltSaber":combinationC>.55?"Relief":combinationC>.51?"Fractured":combinationC>.47?"BigBend":combinationC>.35?"Tim":combinationC>.28?"Mag":combinationC>.2?"Tim2":combinationC>.1?"RectDrift":"Rect")&&(angleC=.66,radC=.46,dirR=0,radC2=1,intensityC=round(random(.9,1.35),4),roundnessC=round(random(.05,.22),4),soloChooser=random([1,1,0]),kalCh=random([0,0,1,1,0]),0==soloChooser&&1==kalCh&&(drawAngle=1,sinC=1),uvChooser=1,yatayChooser=0,fbmC=0),"LeftEye"==combName&&(angleC=.41,radC=.46,dirR=0,radC2=random([1,1,0]),intensityC=round(random(1,1.75),4),roundnessC=round(random(.05,.22),4),soloChooser=random([1,1,0,1]),kalCh=random([0,0,1]),0==soloChooser&&1==kalCh&&(drawAngle=1,sinC=1),intensityC=1,yatayChooser=0,fbmC=0),"LightSaber"==combName&&(angleC=.66,radC=.46,dirR=0,radC2=1,intensityC=round(random(.1,.4),4),roundnessC=round(random(.05,.16),4),yatayChooser=0,fbmC=random([0,0,1])),"AltSaber"==combName&&(angleC=.66,radC=.95,dirR=0,radC2=1,intensityC=round(random(.1,2),4),roundnessC=round(random(.05,.16),4),yatayChooser=0,fbmC=random([0,0,1])),"Relief"==combName&&(angleC=.41,radC=random([.26,.56,.96]),radC2=0,dirR=0,intensityC=round(random(1.8,2),4),roundnessC=round(random(.11,.16),4),uniRand1=.3,yatayChooser=0,soloChooser=random([1,0,1]),kalCh=0,uvChooser=random([0,1]),fbmC=0),"Fractured"==combName&&(angleC=.41,radC=.26,dirR=random([0,0,.71,0]),radC2=1,intensityC=round(random(1.5,2),4),roundnessC=round(random(.05,.16),4),yatayChooser=0,uvChooser=0,fbmC=0),"BigBend"==combName&&(angleC=.66,radC=.46,dirR=random([.91,.51,.66,.71]),radC2=random([1,1,0]),intensityC=round(random(.7,1.2),4),roundnessC=round(random(.05,.14),4),yatayChooser=1,shaderC=0,fbmC=0),"Tim"==combName&&(angleC=.41,radC=.46,dirR=.71,radC2=1,intensityC=round(random(1.5,2),4),roundnessC=round(random(.05,.14),4),uvChooser=random([0,0,1]),yatayChooser=0,0==(soloChooser=random([0,1,1]))&&(kalCh=0),fbmC=random([0,0,1])),"Mag"==combName&&(angleC=.41,radC=.46,dirR=.71,radC2=1,intensityC=round(random(.8,1.1),4),roundnessC=round(random(.1,.16),4),yatayChooser=0,soloChooser=random([1,1,0]),kalCh=random([0,0,1]),0==soloChooser&&1==kalCh&&(drawAngle=1,sinC=1),uvChooser=0,fbmC=random([0,1])),"Tim2"==combName&&(angleC=.66,radC=.46,dirR=.51,radC2=1,intensityC=round(random(1,1.5),4),roundnessC=round(random(.05,.16),4),yatayChooser=0,uvChooser=0,soloChooser=1,fbmC=0),"RectDrift"==combName&&(angleC=.91,radC=.46,dirR=0,radC2=random([0,1,1]),intensityC=round(random(1.5,2),4),roundnessC=round(random(.05,.16),4),0==(uvChooser=random([0,1,1,0]))&&(yatayChooser=random([0,1,0])),1==uvChooser&&(yatayChooser=random([0,1,0]),rotCh=0),1==yatayChooser&&(shaderC=0,fbmC=0,kalCh=1),fbmC=0),"Rect"==combName&&(angleC=.91,radC=.46,dirR=.71,radC2=1,intensityC=round(random(1.5,3.2),4),roundnessC=round(random(.05,.16),4),yatayChooser=0,uvChooser=0,fbmC=0),shaderC="fbm",yataStr=0==yatayChooser?"ver":"hor",darkC=0,soloChooser<.5?(soloChooser="Solo","hor"==yataStr&&(soloChooser="Triplet")):soloChooser="Triplet",max=drawAngle<.8?random(.1,.3):PI/2,placements(),console.log(combName);for(var o=0;o<1800;o++){let l=random(1);stars[o]=new Star(l)}}function draw(){noStroke(),pg.noStroke();let e,$,t;frameRate(60),"ver"==yataStr&&(sek=0),"hor"==yataStr&&(sek=-PI/2),sinC<.7?(noiseSeed(nSeed1),e=map(noise(xoff1/noiseRandom1,frameCount/noiseRandom1/1),0,1,-max,max),noiseSeed(nSeed2),$=map(noise(xoff1/noiseRandom2,frameCount/noiseRandom2/1),0,1,-max,max),noiseSeed(nSeed3),t=map(noise(xoff1/noiseRandom3,frameCount/noiseRandom3/1),0,1,-max,max)):(noiseSeed(nSeed1),e=map(sin(frameCount/50),-1,1,-max,max),noiseSeed(nSeed2),$=map(sin(frameCount/75),-1,1,-max,max),noiseSeed(nSeed3),t=map(sin(frameCount/noiseRandom3),-1,1,-max,max)),xoff1+=.1,xoff2+=.2,xoff3+=.3;let r=e,o=e,l=e,a=$,s=$,i=$,_=t,n=t,u=t;counter+=1,noiseSeed(nSeed1);let f=2.5*map(noise(frameCount/(1e3/random(.8,1.1))/.5),0,1,.1,.7),d=2.5*map(noise(frameCount/(1050/random(.9,1.2))/.5),0,1,.1,.7),m=2.5*map(noise(frameCount/(950/random(.8,1.2))/.5),0,1,.1,.7);noiseSeed(nSeed2);let p=2.5*map(noise(frameCount/(950/random(.9,1.2))/.5),0,1,.1,.7),C=2.5*map(noise(frameCount/(1050/random(.8,1.2))/.5),0,1,.1,.7),h=2.5*map(noise(frameCount/(1e3/random(.8,1.1))/.5),0,1,.1,.7);noiseSeed(nSeed3);let g=2.5*map(noise(frameCount/(1050/random(.9,1.2))/.5),0,1,.1,.7),v=2.5*map(noise(frameCount/(1e3/random(.8,1.2))/.5),0,1,.1,.7),b=2.5*map(noise(frameCount/(950/random(.8,1.1))/.5),0,1,.1,.7);noiseSeed(nSeed),pg.push();for(let y=0;y<particles.length;y+=1){let x=map(sin(particles[y].y*mult/particles[y].x*mult),0,1,-sek,sek),S=map(sin(particles2[y].y*mult/particles2[y].x*mult),0,1,-sek,sek),w=map(sin(particles3[y].y*mult/particles3[y].x*mult),0,1,-sek,sek);x+=r,S+=o,w+=l,vec=createVector(sin(1*x),cos(x)),vec2=createVector(sin(1*S),cos(S)),vec3=createVector(sin(1*w),cos(w)),vec.setMag(f*(sw/2)),vec2.setMag(d*(sw/2)),vec3.setMag(m*(sw/2)),particles[y].add(vec),particles2[y].add(vec2),particles3[y].add(vec3);let R=map(noise(particles[y].x*mult,particles[y].y*mult*100,frameCount*mult*20),0,1,0,1),k=map(noise(particles2[y].x*mult,particles2[y].y*mult*92,frameCount*mult*20),0,1,0,1),P=map(noise(particles3[y].x*mult,particles3[y].y*mult*92,frameCount*mult*20),0,1,0,1);if("ver"==yataStr&&(bol1=particles[y].y<height&&particles[y].y>0,bol2=particles2[y].y<height&&particles2[y].y>0,bol3=particles3[y].y<height&&particles3[y].y>0),"hor"==yataStr&&(bol1=particles[y].x<width&&particles[y].x>0,bol2=particles2[y].x<width&&particles2[y].x>0,bol3=particles3[y].x<width&&particles3[y].x>0),bol1&&(pg.fill(col1,random(60,80),random(30,50)*briMult,R),pg.ellipse(particles[y].x+5*R*random(-1,1),particles[y].y,sw)),bol2&&(pg.fill(col2,random(10,40)*briMult,random(5,20)*briMult2,k),pg.ellipse(particles2[y].x,particles2[y].y,sw)),bol3&&(pg.fill(col3,random(60,80),random(40,80),P),"ver"==yataStr&&particles3[y].y>=height-5&&(flag1=!0,fr=frameCount),"hor"==yataStr&&particles3[y].x>=width-5&&(flag1=!0,fr=frameCount),pg.ellipse(particles3[y].x,particles3[y].y,1*sw)),0==yatayChooser){let T=min(particles[y].y,particles2[y].y),U=min(particles2[y].y,particles3[y].y);progress=min(T,U)}else{let B=min(particles[y].x,particles2[y].x),M=min(particles2[y].x,particles3[y].x);progress=min(B,M)}}if("Triplet"==soloChooser){for(let D=0;D<particles4.length;D+=1){let V=map(sin(particles4[D].y*mult/particles4[D].x*mult),0,1,-sek,sek),A=map(sin(particles5[D].y*mult/particles5[D].x*mult),0,1,-sek,sek),E=map(sin(particles6[D].y*mult/particles6[D].x*mult),0,1,-sek,sek);V+=a,A+=s,E+=i,vec4=createVector(sin(1*V),cos(V)),vec5=createVector(sin(1*A),cos(A)),vec6=createVector(sin(1*E),cos(E)),vec4.setMag(p*(sw/2)),vec5.setMag(C*(sw/2)),vec6.setMag(h*(sw/2)),particles4[D].add(vec4),particles5[D].add(vec5),particles6[D].add(vec6);let z=map(noise(particles4[D].x*mult,particles4[D].y*mult*100,frameCount*mult*20),0,1,0,1),N=map(noise(particles5[D].x*mult,particles5[D].y*mult*92,frameCount*mult*20),0,1,0,1),I=map(noise(particles6[D].x*mult,particles6[D].y*mult*92,frameCount*mult*20),0,1,0,1);if("ver"==yataStr&&(bol1=particles4[D].y<height&&particles4[D].y>0,bol2=particles5[D].y<height&&particles5[D].y>0,bol3=particles6[D].y<height&&particles6[D].y>0),"hor"==yataStr&&(bol1=particles4[D].x<width&&particles4[D].x>0,bol2=particles5[D].x<width&&particles5[D].x>0,bol3=particles6[D].x<width&&particles6[D].x>0),bol1&&(pg.fill(col1,random(60,80),random(30,50)*briMult,z),pg.ellipse(particles4[D].x+5*z*random(-1,1),particles4[D].y,sw)),bol2&&(pg.fill(col2,random(10,40)*briMult,random(5,20)*briMult2,N),pg.ellipse(particles5[D].x,particles5[D].y,sw)),bol3&&(pg.fill(col3,random(60,80),random(40,80),I),"ver"==yataStr&&particles6[D].y>=height-5&&(flag2=!0,fr=frameCount),"hor"==yataStr&&particles6[D].x>=width-5&&(flag2=!0,fr=frameCount),pg.ellipse(particles6[D].x,particles6[D].y,1*sw)),0==yatayChooser){let q=min(particles4[D].y,particles5[D].y);progress2=min(q,particles6[D].y)}else{let F=min(particles4[D].x,particles5[D].x);progress2=min(F,particles6[D].x)}}for(let L=0;L<particles7.length;L+=1){let H=map(sin(particles7[L].y*mult/particles7[L].x*mult),0,1,-sek,sek),O=map(sin(particles8[L].y*mult/particles8[L].x*mult),0,1,-sek,sek),j=map(sin(particles9[L].y*mult/particles9[L].x*mult),0,1,-sek,sek);H+=_,O+=n,j+=u,vec7=createVector(sin(1*H),cos(H)),vec8=createVector(sin(1*O),cos(O)),vec9=createVector(sin(1*j),cos(j)),vec7.setMag(g*(sw/2)),vec8.setMag(v*(sw/2)),vec9.setMag(b*(sw/2)),particles7[L].add(vec7),particles8[L].add(vec8),particles9[L].add(vec9);let G=map(noise(particles7[L].x*mult,particles7[L].y*mult*100,frameCount*mult*20),0,1,0,1),W=map(noise(particles8[L].x*mult,particles8[L].y*mult*92,frameCount*mult*20),0,1,0,1),J=map(noise(particles9[L].x*mult,particles9[L].y*mult*92,frameCount*mult*20),0,1,0,1);if("ver"==yataStr&&(bol1=particles7[L].y<height&&particles7[L].y>0,bol2=particles8[L].y<height&&particles8[L].y>0,bol3=particles9[L].y<height&&particles9[L].y>0),"hor"==yataStr&&(bol1=particles7[L].x<width&&particles7[L].x>0,bol2=particles8[L].x<width&&particles8[L].x>0,bol3=particles9[L].x<width&&particles9[L].x>0),bol1&&(pg.fill(col1,random(60,80),random(30,50)*briMult,G),pg.ellipse(particles7[L].x+5*G*random(-1,1),particles7[L].y,sw)),bol2&&(pg.fill(col2,random(10,40)*briMult,random(5,20)*briMult2,W),pg.ellipse(particles8[L].x,particles8[L].y,sw)),bol3&&(pg.fill(col3,random(60,80),random(40,80),J),"ver"==yataStr&&particles9[L].y>=height-5&&(flag3=!0,fr=frameCount),"hor"==yataStr&&particles9[L].x>=width-5&&(flag3=!0,fr=frameCount),pg.ellipse(particles9[L].x,particles9[L].y,1*sw)),0==yatayChooser){let K=min(particles7[L].y,particles8[L].y);progress3=min(K,particles9[L].y)}else{let Q=min(particles7[L].x,particles8[L].x);progress3=min(Q,particles9[L].x)}}}if(pg.pop(),push(),background(0,0,10,.5),"Triplet"==soloChooser){let X=min(progress,progress2);progress=min(X,progress3)}let Y;Y=0==yatayChooser?height:width;let Z=floor(map(progress,0,Y,0,100));fill(0,0,80),noStroke(),textSize(25),textAlign(CENTER,CENTER),text("%"+Z,width/2,height/2),speed=progress/50,translate(width/2,height/2);for(var ee=0;ee<stars.length;ee++)stars[ee].update(),stars[ee].show();if(translate(-width/2,-height/2),image(granPg,0,0),pop(),bolBol="Triplet"==soloChooser?flag1&&flag2&&flag3:flag1){fbmShader.setUniform("uTexture0",pg),fbmShader.setUniform("u_time",millis()/1e3),fbmShader.setUniform("u_middle",[mouseX,mouseY]),fbmShader.setUniform("u_amp",uAmp),fbmShader.setUniform("uResolution",[width,height]),fbmShader.setUniform("uPla",[width,height]),fbmShader.setUniform("u_octave",uOctave),fbmShader.setUniform("u_fbmAmp",uFbmAmp),fbmShader.setUniform("u_roundness",uRoundness),fbmShader.setUniform("u_angleC",uAngleC),fbmShader.setUniform("u_sqr",uSqr),fbmShader.setUniform("u_fbmC",fbmC),fbmPg.noStroke(),fbmPg.shader(fbmShader),fbmPg.rect(0,0,width,height),frameRate(1);for(let e$=0;e$<125;e$++){let et=random(1);et>.66?pg.fill(col3,random(60,80)/1,random(40,80),1):et>.33?pg.fill(col2,random(10,40)/1,random(0,20),1):pg.fill(col1,random(60,80)/1,random(30,50),1),el(random(width),random(height),randomGaussian(2,7),e$)}(c+=1)>2&&(flag4=!0,frameRate(60))}if(flag4&&(blurShader.setUniform("uTexture0",fbmPg),blurShader.setUniform("u_time",millis()/1e3),blurShader.setUniform("uScale",[4,4]),blurShader.setUniform("u_middle",[mouseX,mouseY]),blurShader.setUniform("u_rand",random(0,2)),blurShader.setUniform("uResolution",[width,height]),blurShader.setUniform("uPla",[width,height]),blurShader.setUniform("uvChooser",uvChooser),blurShader.setUniform("uvChooser2",uvChooser2),blurShader.setUniform("u_intensity",intensityC),blurShader.setUniform("u_roundness",roundnessC),blurShader.setUniform("u_angleC",angleC),blurShader.setUniform("u_radC",radC),blurShader.setUniform("u_darkC",darkC),blurShader.setUniform("u_dirR",dirR),blurShader.setUniform("u_noiseC",noiseC),blurShader.setUniform("u_blurSc",blurSc),blurShader.setUniform("u_random",uniRand1),blurShader.setUniform("u_rSeed1",rSeed1),blurShader.setUniform("u_rSeed2",rSeed2),blurShader.setUniform("u_rSeed3",rSeed3),blurShader.setUniform("u_angleC2",angleC2),blurShader.setUniform("u_radC2",radC2),blurShader.setUniform("u_dirR2",dirR2),blurBg.noStroke(),blurBg.shader(blurShader),blurBg.rect(0,0,width,height),push(),0==rotCh?(translate(0,0),scale(1,1)):1==rotCh?(translate(width,0),scale(-1,1)):2==rotCh?(translate(width,height),scale(-1,-1)):3==rotCh&&(translate(0,height),scale(1,-1)),image(blurBg,0,0),pop(),(c2+=1)>2)){for(let er=0;er<150;er++){let eo=random(1);eo>.66?fill(col3,random(60,80)/2,random(40,80),1):eo>.33?fill(col2,random(10,40)/2,random(0,20),1):fill(col1,random(60,80)/2,random(30,50),1),elN(random(width),random(height),random(2,7),er)}granulate(25),frame(),noLoop()}}function frame(){push(),rectMode(CORNER),fill(0,0,87),beginShape(),vertex(0,0);for(let e=0;e<width/wi;e++)vertex(e*wi+random(-wi/10,wi/10),wi+random(-wi/10,wi/10));vertex(width,wi),vertex(width,0),endShape(),beginShape(),vertex(0,0);for(let $=0;$<height/wi;$++)vertex(wi+random(-wi/10,wi/10),$*wi+random(-wi/10,wi/10));vertex(wi,height),vertex(0,height),endShape(),beginShape(),vertex(0,height-wi);for(let t=0;t<width/wi;t++)vertex(t*wi+random(-wi/10,wi/10),height-wi+random(-wi/10,wi/10));vertex(width,height),vertex(0,height),endShape(),beginShape(),vertex(width-wi,0);for(let r=0;r<height/wi;r++)vertex(width-wi+random(-wi/10,wi/10),r*wi+random(-wi/10,wi/10));vertex(width,height),vertex(width,0),endShape(),pop()}function el(e,$,t,r){pg.beginShape();for(let o=0;o<TAU;o+=PI/60){let l=map(noise(1*o,1*r),0,1,0,7),a=e+cos(o)*t/1.5+l,s=$+sin(o)*t/1.5+l;pg.vertex(a,s)}pg.endShape(CLOSE)}function elN(e,$,t,r){beginShape();for(let o=0;o<TAU;o+=PI/60){let l=map(noise(1*o,1*r),0,1,0,7),a=e+cos(o)*t/1.5+l,s=$+sin(o)*t/1.5+l;vertex(a,s)}endShape(CLOSE)}function placements(){if("ver"==yataStr){let e=random([200,100,100,200,500]),$=200,t=400,r=200,o=700;"Solo"==soloChooser&&(kalCh<.25?(t=200,r=600):(t=400,r=200));let l=2-e/5,a=2-e/5,s=2-e/5;for(let i=t;i<t+r;i+=2){let _=l+noise(.04*i,.02*frameCount)*e,n=createVector(i,_);particles.push(n)}for(let u=t;u<t+r;u+=2){let f=l+noise(.08*u,.03*frameCount)*e,d=createVector(u,f);particles2.push(d)}for(let m=t;m<t+r;m+=2){let p=l+noise(.038*m,.01*frameCount)*e,C=createVector(m,p);particles3.push(C)}for(let h=$;h<$+100;h+=2){let g=a+noise(.034*h,.097*frameCount)*e,v=createVector(h,g);particles4.push(v)}for(let b=$;b<$+100;b+=2){let y=a+noise(.045*b,.034*frameCount)*e,x=createVector(b,y);particles5.push(x)}for(let S=$;S<$+100;S+=2){let w=a+noise(.042*S,.046*frameCount)*e,R=createVector(S,w);particles6.push(R)}for(let k=o;k<o+100;k+=2){let P=s+noise(.04*k,.02*frameCount)*e,T=createVector(k,P);particles7.push(T)}for(let U=o;U<o+100;U+=2){let B=s+noise(.027*U,.067*frameCount)*e,M=createVector(U,B);particles8.push(M)}for(let D=o;D<o+100;D+=2){let V=s+noise(.045*D,.08*frameCount)*e,A=createVector(D,V);particles9.push(A)}}if("hor"==yataStr){let E=random([200,100,100,200,500]),z=200,N=400,I=200,q=700,F=1e3,L=1200,H=1500;kalCh<.2?(N=200,I=600,L=976):(N=400,I=200,L=1200);for(let O=N;O<N+I;O+=2){let j=5+noise(.04*O,.02*frameCount)*E,G=createVector(j,O);particles.push(G)}for(let W=N;W<N+I;W+=2){let J=5+noise(.08*W,.03*frameCount)*E,K=createVector(J,W);particles2.push(K)}for(let Q=N;Q<N+I;Q+=2){let X=5+noise(.038*Q,.08*frameCount)*E,Y=createVector(X,Q);particles3.push(Y)}for(let Z=z;Z<z+100;Z+=2){let ee=5+noise(.04*Z,.02*frameCount)*E,e$=createVector(ee,Z);particles4.push(e$)}for(let et=z;et<z+100;et+=2){let er=5+noise(.08*et,.03*frameCount)*E,eo=createVector(er,et);particles5.push(eo)}for(let ea=z;ea<z+100;ea+=2){let es=5+noise(.038*ea,.08*frameCount)*E,ei=createVector(es,ea);particles6.push(ei)}for(let e_=q;e_<q+100;e_+=2){let en=5+noise(.04*e_,.02*frameCount)*E,ec=createVector(en,e_);particles7.push(ec)}for(let eu=q;eu<q+100;eu+=2){let e0=5+noise(.08*eu,.03*frameCount)*E,ef=createVector(e0,eu);particles8.push(ef)}for(let ed=q;ed<q+100;ed+=2){let em=5+noise(.038*ed,.08*frameCount)*E,ep=createVector(em,ed);particles9.push(ep)}for(let eC=L;eC<L+I;eC+=2){let eh=5+noise(.04*eC,.02*frameCount)*E,eg=createVector(eh,eC);particles.push(eg)}for(let ev=L;ev<L+I;ev+=2){let eb=5+noise(.08*ev,.03*frameCount)*E,ey=createVector(eb,ev);particles2.push(ey)}for(let ex=L;ex<L+I;ex+=2){let e3=5+noise(.038*ex,.08*frameCount)*E,e2=createVector(e3,ex);particles3.push(e2)}for(let eS=F;eS<F+100;eS+=2){let e1=5+noise(.04*eS,.02*frameCount)*E,e4=createVector(e1,eS);particles4.push(e4)}for(let e6=F;e6<F+100;e6+=2){let e8=5+noise(.08*e6,.03*frameCount)*E,e7=createVector(e8,e6);particles5.push(e7)}for(let ew=F;ew<F+100;ew+=2){let eR=5+noise(.038*ew,.08*frameCount)*E,e5=createVector(eR,ew);particles6.push(e5)}for(let ek=H;ek<H+100;ek+=2){let eP=5+noise(.04*ek,.02*frameCount)*E+10,eT=createVector(eP,ek);particles7.push(eT)}for(let eU=H;eU<H+100;eU+=2){let eB=5+noise(.08*eU,.03*frameCount)*E+10,eM=createVector(eB,eU);particles8.push(eM)}for(let eD=H;eD<H+100;eD+=2){let eV=5+noise(.038*eD,.08*frameCount)*E+10,eA=createVector(eV,eD);particles9.push(eA)}}}function granulate(e){loadPixels();let $=pixelDensity(),t=4*(width*$)*(height*$);for(let r=0;r<t;r+=4){let o=random(-e,e);pixels[r]=pixels[r]+o,pixels[r+1]=pixels[r+1]+o,pixels[r+2]=pixels[r+2]+o}updatePixels()}function granulateGran(e){granPg.loadPixels();let $=pixelDensity(),t=4*(width*$)*(height*$);for(let r=0;r<t;r+=4){let o=random(-e,e);pixels[r]=pixels[r]+o,pixels[r+1]=pixels[r+1]+o,pixels[r+2]=pixels[r+2]+o}granPg.updatePixels()}function keyPressed(){("s"==key||"S"==key)&&saveCanvas("DistCollective_SpatialCurvatures","png")}class Random{constructor(){this.useA=!1;let e=function(e){let $=parseInt(e.substr(0,8),16),t=parseInt(e.substr(8,8),16),r=parseInt(e.substr(16,8),16),o=parseInt(e.substr(24,8),16);return function(){r|=0;let e=(($|=0)+(t|=0)|0)+(o|=0)|0;return o=o+1|0,$=t^t>>>9,t=r+(r<<3)|0,r=(r=r<<21|r>>>11)+e|0,(e>>>0)/4294967296}};this.prngA=new e(tokenData.hash.substr(2,32)),this.prngB=new e(tokenData.hash.substr(34,32));for(let $=0;$<1e6;$+=2)this.prngA(),this.prngB()}random_dec(){return this.useA=!this.useA,this.useA?this.prngA():this.prngB()}}class Star{constructor(e){this.x=random(-width,width),this.y=random(-height,height),this.z=random(width),this.pz=this.z,this.co=e}update(){this.z=this.z-speed,this.z<1&&(this.z=width,this.x=random(-width,width),this.y=random(-height,height),this.pz=this.z)}show(){this.co>.66?fill(col3,random(60,80)/1,random(40,80),1):this.co>.33?fill(col2,random(10,40)/1,random(50,60),1):fill(col1,random(60,80)/1,random(30,50),1),noStroke();var e=map(this.x/this.z,0,1,0,width),$=map(this.y/this.z,0,1,0,height),t=map(this.z,0,width,16,0);ellipse(e,$,t,t);var r=map(this.x/this.pz,0,1,0,width),o=map(this.y/this.pz,0,1,0,height);this.pz=this.z,this.co>.66?stroke(col3,random(60,80)/1,random(40,80),1):this.co>.33?stroke(col2,random(10,40)/1,random(50,60),1):stroke(col1,random(60,80)/1,random(30,50),1),line(r,o,e,$)}}