xxxxxxxxxx
15
let xR = 50;
let yR = 150;
function setup() {
createCanvas(400, 400);
}
function draw() {
background(220);
ellipse(width/2, height/2, xR * 2, yR * 2);
angle = map(mouseX, 0, width, 0, 2*PI);
x = xR * cos(angle);
y = yR * sin(angle);
ellipse(width/2+x,height/2+y,10,10);
}