Draw Circle using Flowgorithm Turtle
In this tutorial, we will learn how to draw a circle using Flowgorithm Turtle. We will follow a simple algorithm to draw the circle. The turtle in a loop turns a small degree turn_angle and draws a small arc. The turtle should cover 360 degrees to draw the complete circle in the loop.
Let’s assume the loop iterates n times.
The turtle turns an angle: turn_angle
We have to choose the iterations n and the turn angle such that
360 = n * turn_angle
To draw a complete circle the turtle should turn 360 degrees in the loop. We choose the small turn angle to make the circle look smooth. For example, in the example, the number of iterations = 360 and the turn_angle is 1 degree. If the turtle doesn’t cover the 360 degrees it would draw a circular arc.
The pseudocode for the flowchart is as follows:
// Draw Circle Flowgorithm Flowchart
Declare Integer i
For i = 1 To 360
Turn Right 1
The Flowgorithm flowchart to draw a circle is as follows:
Declare a loop counter variable: i
Initialize a For loop to make it run 360 times.
In the For loop statement, the turtle turns a small degree and draws a small line. Add a Turn symbol and the Forward symbol. The turn degrees and the iterations should cover 360 degrees to draw the complete circle.
Save the Flowchart.
Run the flowchart.
Let’s draw a circle with a specified radius
Now that we know how to draw a circle, in the next version we will draw a circle of a specific radius. We will prompt the user to enter the radius of the circle. Let’s calculate the arc length that the turtle draws in the loop.
Let’s assume the circle radius is: r
Circumference of the circle = 2 * pi* r
So the length of the arc that the turtle draws in the loop is: (2*pi*r)/360
Flowgorithm flowchart tutorials on this website:
For more information on the Flowgorithm tool, please visit the official website at: