xxxxxxxxxx
31
function setup() {
createCanvas(600, 600);
noLoop();
}
function draw() {
background(220);
let points = 500;
for (j=0; j<20; j++) {
let rmin = 5;
let rmax = 150;
let radius = random(rmin,rmax);
let x = random(rmin, width);
let y = random(rmin, height);
fill(50);
noStroke();
beginShape();
for (i=0; i<TWO_PI; i+= TWO_PI/points) {
pointx = j*cos(i)+1;
pointy = j*sin(i)+1;
let newr = map(noise(pointx,pointy),0,1,0,radius);
let cx = x + newr*cos(i);
let cy = y + newr*sin(i);
curveVertex(cx,cy);
}
endShape(CLOSE);
}
}