xxxxxxxxxx
//About a year ago I imagined a splat-like shape with blobby extrusions. Over the course of months I tried
//to create the shape with sin/cos math and recursive breaking down of an ellipse. Never looked right!
//So here are three more attempts. The third one is pretty damn close, with only the shape of the dips between
//extrusions not quite what I would like.
let drops=[]
let resists=[]
let resistPts=[]
let spacing=2
let loovers=[]
let simplex
function preload(){
font= loadFont('FamiljenGrotesk-VariableFont_wght.ttf')
}
function setup() {
createCanvas(400, 400);
background('#f4f1de')
simplex= new openSimplexNoise(Date.now())
for(let a=PI+PI/6; a<=TAU; a+=PI/3){
let x=200+ cos(a)*75
let y=260+sin(a)*75
let r= 20
resists.push(createVector(x, y, r))
for(let a=0; a<TAU; a+= TAU/100){
let xpt=x+cos(a)*r
let ypt= y+sin(a)*r
resistPts.push(createVector(xpt, ypt))
}
}
resists.push(createVector(150, 330, 25))
resists.push(createVector(250, 330, 25))
for(let a=0; a<TAU; a+= TAU/100){
let xpt=150+cos(a)*25
let ypt=340+sin(a)*25
resistPts.push(createVector(xpt, ypt))
}
for(let a=0; a<TAU; a+= TAU/100){
let xpt=250+cos(a)*25
let ypt=340+sin(a)*25
resistPts.push(createVector(xpt, ypt))
}
drops.push(new drop(200, 360, 250))
}
function draw(){
if(frameCount<400){
background('#f4f1de')
}
strokeWeight(1)
stroke(200)
noFill()
for(let r of resists){
ellipse(r.x, r.y, r.z)
}
for( d of drops){
d.grow()
d.show()
}
for(l of loovers){
l.move()
l.show()
l.done()
}
noFill()
stroke(100)
textFont(font)
fill(100)
noStroke()
strokeWeight(1)
text('1.11', 20, 380)
if(frameCount<400){
text("Attempt #1", 320, 380)
}
if(frameCount==400){
drops=[]
resists=[]
resistPts=[]
background('#f4f1de')
}
if(frameCount>400 && frameCount<500){
text("Attempt #2", 320, 380)
fill(100)
noStroke()
ellipse(200, 260, 200, 200)
fill(100)
beginShape()
for(let a=-HALF_PI*0.75; a<=HALF_PI; a+=TAU*0.01){
vertex(125+cos(a)*12, 350+sin(a)*20)
}
for(let a=HALF_PI; a<=PI+HALF_PI*0.75; a+=TAU*0.01){
vertex(275+cos(a)*12, 350+sin(a)*20)
}
endShape(CLOSE)
}
if(frameCount==410){
for(let a=PI+PI/6; a<=TAU; a+=PI/3){
loovers.push(new loover(width/2+cos(a)*70, 260+sin(a)*70, a, 80, 100, 1))
// (x, y, initAngle, initSize, finalSize, delay)
}
}
if(frameCount==600){
loovers=[]
background('#f4f1de')
fill(100)
noStroke()
ellipse(200, 260, 200, 200)
fill(100)
beginShape()
for(let a=-HALF_PI*0.75; a<=HALF_PI; a+=TAU*0.01){
vertex(125+cos(a)*12, 350+sin(a)*20)
}
for(let a=HALF_PI; a<=PI+HALF_PI*0.75; a+=TAU*0.01){
vertex(275+cos(a)*12, 350+sin(a)*20)
}
endShape(CLOSE)
let a=PI+PI/12
while(a<TAU){
let s= random(40, 80)
let addAngle= map(s, 40, 80, PI/8 ,PI/6)
let adjR= 100-(s*0.5)
loovers.push(new loover(width/2+cos(a)*adjR, 260+sin(a)*adjR, a, s, s*1.5, 0))
a+=addAngle
}
}
if(frameCount>600){
//llovers again, but more random as far as size, and position
text("Attempt #3", 320, 380)
}
}