xxxxxxxxxx
22
let angle = 0;
let angleV = 0;
function setup() {
createCanvas(400, 400);
}
function draw() {
background(220);
fill(255, 255, 0);
noStroke();
let r = map(sin(angle), -1, 1, 0, width);
circle(width/2, height/2, r);
// inner circle
fill(0, 155, 155);
circle(width/2, height/2, r/2);
angle = angle + angleV;
angleV = angleV + 0.00001;
}