Update spinning circle

This commit is contained in:
Lev
2021-07-15 23:11:08 -05:00
parent 7253eb06b4
commit 70f72123c3

View File

@ -9,14 +9,11 @@ function draw()
background(0);
translate(width/2, height/2);
let radius = 200;
let theta = frameCount;
fill(255);
for(let theta=0; theta < 360; theta += 20)
{
let x = cos(theta) * radius;
let y = sin(theta) * radius;
//let x = cos(radians(theta)) * radius;
//let y = sin(radians(theta)) * radius;
ellipse(x, y, 15, 15);
}
let x = cos(theta) * radius;
let y = sin(theta) * radius;
//let x = cos(radians(theta)) * radius;
//let y = sin(radians(theta)) * radius;
ellipse(x, y, 15, 15);
}