xxxxxxxxxx
50
function setup() {
createCanvas(600, 600);
noLoop();
}
function draw() {
background(220);
translate(60,60);
push();
inkblot(300,300);
push();
translate(150,200);
scale(0.3);
noiseSeed(3);
inkblot(0,0);
pop();
push();
translate(130,180);
scale(0.2);
noiseSeed(3);
inkblot(0,0);
pop();
pop();
}
function inkblot(cx, cy){
fill(color("black"));
stroke(5);
beginShape();
var startx;
var starty;
for (let t = 0; t < 100; t++) {
let m = map(t, 0, 100, 0, 2*PI);
r = 100 + 20*sin(noise(t*20));
x = r*sin(m) + cx;
y = r*cos(m) + cy;
if (t == 0){
startx = x;
starty = y;
}
vertex(x, y);
}
vertex(startx, starty);
endShape();
}