Mike Koss

Drawing Polygons

One of the easiest things to do in Logo is use the turtle to draw various polygons. You can notice that in order to draw a closed polygon, the turtle has to walk around the edges, eventually turning through 360 degrees before coming back home. Since the turtle makes N turns for an N-sided polygon, the size of each turn is 360/N degrees.

A triangle

Triangle (3 sides)

Turtle turns 120°

A square

Square (4 sides)

Turtle turns 90°

A pentagon

Pentagon (5 sides)

Turtle turns 72°

A hexagon

Hexagon (6 sides)

Turtle turns 60°

A septagon

Septagon (7 sides)

Turtle turns 51°

An octagon

Octagon (8 sides)

Turtle turns 45°

REPEAT 3 [FD 100 RT 120]
REPEAT 4 [FD 100 RT 90]
REPEAT 5 [FD 100 RT 72]
REPEAT 6 [FD 100 RT 60]
REPEAT 7 [FD 100 RT 51]
REPEAT 8 [FD 100 RT 45]