SketchBook

__trashed-147

function setup() {
createCanvas(windowWidth, windowHeight);
};

function draw() {
background(20, 80, 180);
strokeWeight(5);

translate(width / 2, height / 2);

const num = 4;
const step = 360 / num;
const pos = min(width, height) * 0.3;
const t = frameCount;

for (let i = 0; i < 360; i += step) {
const x = cos(radians(i + t)) * pos;
const y = sin(radians(i + t)) * pos;
ellipse(x, y, pos * 0.3);
}
};

function windowResized() {
resizeCanvas(windowWidth, windowHeight);
}

Author: takamatsu