xxxxxxxxxx
let centerX;
let centerY;
let radius = 200;
let numPoints = 50;
let noiseAmount = 15;
function setup() {
createCanvas(windowWidth, windowHeight);
centerX = width / 2;
centerY = height / 2;
angleMode(DEGREES);
noStroke();
}
function draw() {
background(0, 15);
beginShape();
for (let i = 0; i < numPoints; i++) {
let angle = (360 / numPoints) * i;
let x = cos(angle) * radius + centerX;
let y = sin(angle) * radius + centerY;
let xnoise = (noise(frameCount * 0.02 + i) - 0.5) * noiseAmount;
let ynoise = (noise(frameCount * 0.02 + i) - 0.5) * noiseAmount;
vertex(x + xnoise, y + ynoise);
}
endShape(CLOSE);
}