Budding in the invisible shadow,
Absorbed the overflowing noise of the city,
Immersed in the emotions of the crowd,
The fern possessed consciousness and began to expand.
/** OPC START **/ OPC.slider('STROKE_WEIGHT', ~~(Math.random()*5)+1, 0.5, 30); OPC.slider('CREATURE_R', ~~(Math.random()*100)+100, 1, 300); OPC.slider('CREATURE_LEG_COUNT', ~~(Math.random()*35)+5,1,40,1 ); OPC.slider('COLOR_OFFSET', ~~(Math.random()*360), 0,360); OPC.slider('NODE_SIZE', ~~(Math.random()*30), 1,50); OPC.slider('LEG_LEN', ~~(Math.random()*20)+30, 2,50,1); OPC.slider('SPEED', ~~(Math.random()*2), 0.5,4); OPC.slider('ALPHA', ~~(Math.random()*99)+0.1, 0.1,100); OPC.slider('COLOR_MODE',0, 0,2,1); /** OPC END **/ let UNIQUE_HASH ="" let overAllTexture function setup(){ createCanvas(windowWidth,windowHeight) colorMode(HSB) background(0) overAllTexture=createGraphics(width,height) overAllTexture.loadPixels() for(var i=0;ifor(var o=0;o overAllTexture.set(i,o,color(150,noise(i/10,o/10)*random([0,0,0,25,50]))) } } overAllTexture.updatePixels() } function getHash(){ return parseInt((STROKE_WEIGHT + ""+ CREATURE_R + ""+ CREATURE_LEG_COUNT + ""+ COLOR_OFFSET + ""+ NODE_SIZE + ""+ LEG_LEN + ""+ SPEED + ""+ ALPHA + ""+ COLOR_MODE).replace(/\./g,"")).toString(16); } let lerpValue=1 function draw(){ UNIQUE_HASH = getHash(); lerpValue = lerp(lerpValue,mouseIsPressed?0:1,0.05) push() let bgColor=0, strokeColor=255 if(COLOR_MODE==2){ bgColor=230 strokeColor=0 } background(bgColor) stroke(strokeColor) noStroke() stroke(strokeColor,50) for(var x=0;x stroke(strokeColor,x%100==0?0.5:0.1) line(x,0,x,height) } for(var y=0;y stroke(strokeColor,y%100==0?0.5:0.2) line(0,y,width,y) } translate(width/2,height/2) for(var o=0;o push() rotate(PI/10*2*o*(ALPHA/1000) ) for(var i=0;i let r = CREATURE_R/pow(i,0.8) let deg = o + lerpValue*sin( i/(ALPHA) + cos(frameCount/(20/SPEED))/30+ frameCount/(50/SPEED) +i*o*ALPHA )/5 +lerpValue*sin(i*o*ALPHA)/5 + lerpValue*noise(frameCount/50,i*(8+ALPHA/10),o*10) + lerpValue*cos(frameCount/(200+ALPHA*2) ) if (ALPHA>60){ deg+=lerpValue*noise(i/30) } if (ALPHA>80){ deg+=lerpValue*sin(i) } rotate(deg) strokeWeight(STROKE_WEIGHT) if (COLOR_MODE==1){ stroke( (i+COLOR_OFFSET+noise(i,o,frameCount/50)*COLOR_OFFSET) %360,0,COLOR_OFFSET/10+150-o/1.2-i/(5)+sin((i+o)/200*COLOR_OFFSET)*50,i/50+o/50 ) }else if (COLOR_MODE==2){ stroke( (i+COLOR_OFFSET+noise(i,o,frameCount/50)*COLOR_OFFSET) %360,0,COLOR_OFFSET/10+o/2+i/(10) +sin((i+o)/200*COLOR_OFFSET)*50) }else{ stroke( (i+COLOR_OFFSET+noise(i,o,frameCount/50)*COLOR_OFFSET) %360,150,100-o/2-i/(10) ) } line(0,0,r,0) noStroke() push() if (COLOR_MODE==1){ fill((i*2+COLOR_OFFSET +noise(i,o,frameCount/50)*COLOR_OFFSET) %360,0,COLOR_OFFSET/10+100-o-i +sin((i+o)/200*COLOR_OFFSET)*200,map(sin(o/20+i/20),-1,1,0.2,0.4) ) }else if (COLOR_MODE==2){ fill((i*2+COLOR_OFFSET +noise(i,o,frameCount/50)*COLOR_OFFSET) %360,0,COLOR_OFFSET/10+o/2+i/2 +sin((i+o)/200*COLOR_OFFSET)*200,o/3+i/3) }else{ fill((i*2+COLOR_OFFSET +noise(i,o,frameCount/50)*COLOR_OFFSET) %360,180,100-o/2-i/10) } circle(0,0,log(i)*NODE_SIZE*noise(i,o,frameCount/50)*sin(o)) pop() translate(r,0) } pop() } pop() if (mouseIsPressed){ push() fill(255) textSize(20) text("TARGET CODE: [FERN]\nMutation: #"+UNIQUE_HASH,50,height-50) pop() } push() blendMode(MULTIPLY) image(overAllTexture,0,0) pop() }