// Day1 Circle — 円だけを使って描いてみましょう。
/** @param {import('p5')} p */
export default function sketch(p, ctx) {
const { width, height, palette } = ctx;
p.setup = () => {
p.createCanvas(width, height);
p.noFill();
};
p.draw = () => {
p.background(palette[0]);
const t = p.frameCount * 0.01;
for (let i = 0; i < 18; i++) {
const r = 30 + i * 30 + p.sin(t + i * 0.4) * 12;
p.stroke(palette[2 + (i % 3)]);
p.strokeWeight(2 + (i % 4));
p.circle(width / 2 + p.cos(t + i) * 8, height / 2 + p.sin(t + i) * 8, r);
}
};
}