xxxxxxxxxx
37
let r;
let angle = 0;
function setup() {
createCanvas(400, 400);
r = 25;
}
function draw() {
background(0);
translate(width/2,height/2);
noFill();
stroke(255);
strokeWeight(2);
// circle(0,0,r*2);
beginShape();
noLoop();
for(let i = 0; i < TWO_PI; i+= 0.5){
let distortedR = r + random(-15,5);
let x = distortedR * cos(i);
let y = distortedR * sin(i);
vertex(x, y);
}
endShape(CLOSE);
// strokeWeight(5);
// stroke(200,0, 150);
// let x = r * cos(angle);
// let y = r * sin(angle);
// point(x,y);
// angle += 0.01;
// r -= 0.1;
}