Update spinning circle
This commit is contained in:
@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user