xxxxxxxxxx
38
let ang = 0;
function setup() {
createCanvas(400, 400);
stroke(0);
angleMode(DEGREES);
noFill();
background(255);
}
function draw() {
translate(width / 2, height / 2);
for(let i = 0; i < 10; i++){
shapeThing(i*20);
}
// shapeThing(50);
// shapeThing(10);
noLoop();
}
function shapeThing(len) {
fill(random(200,255),0,random(100,255),random(10,255));
beginShape();
for (let i = 0; i < 7; i++) {
let x = cos(ang) * len;
let y = sin(ang) * len;
curveVertex(x, y);
ang -= 90;
}
endShape();
}