xxxxxxxxxx
const color0 = [60, 9, 13, 100];
const color1 = [40, 4, 54, 100];
const color2 = [45, 2, 86, 100];
function setup() {
createCanvas(windowWidth, windowHeight);
colorMode(HSB);
}
function zeroToOneWave(x) {
return 0.5 * (sin(TAU * x - PI / 2) + 1);
}
function draw() {
background(color0);
noFill();
const angle = zeroToOneWave(frameCount/100) * TWO_PI;
for (let x = 1; x < 6; x++) {
if (x % 2 === 0) {
stroke(color2);
} else {
stroke(color1);
}
const s = width / 2 / x;
arc(width / 2, height / 2, s, s, -angle, 0);
}
}