xxxxxxxxxx
20
var angle = 0; // initialize angle variable
var scalar = 1; // set the radius of circle
var startX = 200; // set the x-coordinate for the circle center
var startY = 200; // set the y-coordinate for the circle center
function setup() {
createCanvas(400, 400);
background(255);
angleMode(DEGREES); // change the angle mode from radians to degrees
}
function draw() {
x = startX + scalar * cos(angle);
y = startY + scalar * sin(angle);
ellipse(x, y, 4);
angle++; // increment angle for the next frame
scalar += 0.05
}