xxxxxxxxxx
22
function setup() {
createCanvas(600, 600);
}
function draw() {
background(220);
translate(width/2, height/2);
strokeWeight(2);
randomSeed(0);
var radius = 200;
var nPoints = 60;
beginShape();
for (var i = 0; i < nPoints; i++) {
var t = map(i, 0, nPoints, 0, TWO_PI);
var randomR = radius + random(-6, 6);
var px = randomR * cos(t);
var py = randomR * sin(t);
curveVertex(px, py);
}
endShape(CLOSE);
}