diff --git a/CM2030 Graphics Programming/Topic 8/8.1.6 Circle in Polar Coords/sketcho.js b/CM2030 Graphics Programming/Topic 8/8.1.6 Circle in Polar Coords/sketcho.js index 3857305..997defe 100644 --- a/CM2030 Graphics Programming/Topic 8/8.1.6 Circle in Polar Coords/sketcho.js +++ b/CM2030 Graphics Programming/Topic 8/8.1.6 Circle in Polar Coords/sketcho.js @@ -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); }