xxxxxxxxxx
26
let shapes = [];
let points = 30;
let offset = 0;
function setup() {
createCanvas(400, 400);
for (let i=0; i<points; i++){
let angle = TWO_PI/points;
print(angle);
let r = noise(offset)*width;
shapes[i] = createVector(r*cos(angle*i), r*sin(angle*i));
offset+=0.01;
}
}
function draw() {
background(220);
noFill();
translate(width/2, height/2);
beginShape();
for (let i=0; i<points; i++){
vertex(shapes[i].x, shapes[i].y);
}
endShape(CLOSE);
}