Using Python Turtle To Draw A Triangle With The Circle Command

An introduction to circles

--

screen capture personal computer

Here is one way of drawing an equilateral triangle with turtle.

import turtle as T
forward (174)
right (120)
forward (174)
right (120)
forward (174)

To draw a similar sized equilateral triangle with the circle command try the following module

import turtle as T
T.circle (100,360,3)

The circle command can be used to draw triangles, squares, circles or any regular polygon.

A regular polygon is equilateral and equiangular.

That is it is an enclosed figure in which all sides and angles are equal. As the number of sides increase it becomes increasingly difficult to distinguish between the polygon and a circle.

In fact anything larger than an enneadecagon (a 19 sided regular polygon) drawn with turtle will appear identical to a circle.

In the turtle module a circle is approximated by an inscribed regular polygon.

The first number is the length of the sides the second number determines if you are drawing a full circle or an arc. it is by default 360 degrees. The last number is the steps in drawing the circle.

T.circle (100)   will draw a circle with…

--

--

Jim McAulay🍁 I'm nobody. Are you a nobody too?
ILLUMINATION

I love puns. https://medium.com/@Jim_McAulay/membership Use this link if you love them too. I’m not joking, but Stephen King has a son who is Joe King.