xxxxxxxxxx
38
//random splat
function setup() {
createCanvas(600, 600);
noLoop();
}
function draw() {
background(168, 202, 255);
push();
inkblot(300,300);
pop();
}
function inkblot(cx, cy){
fill(0, 140, 255);
noStroke();
beginShape();
var initX;
var initY;
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(initX, initY);
endShape();
}