xxxxxxxxxx
22
var angle = 0; // initialize angle variable
var scalar = 0.001; // set the radius of circle
var speed = 0.0001; // set the speed of growth for the spirals
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 += speed;
speed += 0.00005;
}