xxxxxxxxxx
28
function setup() {
createCanvas(800, 800);
background(220);
x = 0;
stroke(color(255, 0, 255));
// beginShape();
}
let x;
function draw() {
// beginShape();
rotate(frameCount)
let y = height / 2 + (5 + random(-5, 5)) * cos(frameCount);
for (let _ = 0; _ < random(1,50); _++) {
let off = random(-5,5);
let off2 = random(-5,5);
point(x+off,y+off2);
}
// vertex(x,y);
x += PI/32;
if (x > width) {
x = 0;
// endShape();
}
}