xxxxxxxxxx
23
let angle = 0;
function setup() {
createCanvas(400, 400);
}
function draw() {
background(0);
let size1 = map(sin(radians(angle)), -1, 1, 0, 100);
ellipse(100, 100, size1, size1);
let size2 = map(sin(radians(angle - 1 * (360/4))), -1, 1, 0, 100);
ellipse(300, 100, size2, size2);
let size3 = map(sin(radians(angle - 2 * (360/4))), -1, 1, 0, 100);
ellipse(300, 300, size3, size3);
let size4 = map(sin(radians(angle - 3 * (360/4))), -1, 1, 0, 100);
ellipse(100, 300, size4, size4);
angle = angle + 1;
}