xxxxxxxxxx
const palette = [
'#D64933',
'#EA9010',
'#3587A4',
'#23B5D3',
'#70587C',
'#573280',
'#832232',
'#DA4167',
'#E87461'
];
function setup() {
createCanvas(windowWidth, windowHeight);
frameRate(2);
noStroke();
}
function drawCurve(j, i) {
const startAngle = map(i, 0, 41, 0, 2 * PI);
const endAngle = map(j, 0, 41, 0, 2 * PI);
const startingPoint = {
x: map(j, 0, 41, width * 0.1, width * 0.9),
y: map(i, 0, 41, height * 0.1, height * 0.9)
}
const size = random(0.1, 0.9) * min(width, height);
fill(random(palette) + "42");
arc(width / 2, height / 2, size, size, startAngle, endAngle);
}
function draw() {
background("#fffbe6");
for (let i = 0; i < 42; i++) {
for (let j = 0; j < 42; j++) {
drawCurve(i, j);
}
}
}