Enlarge a Polygon Using Winlogo

This program will allow you to create any polygon of a specified size. By increasing the scale factor a series of polygons may be created similar to the one below.

logo pentagons

The program is as follows:


to polygon :sides :length :scale
make "angle 360/ :sides
make "enlarge :length*:scale
repeat :sides [fd :enlarge rt :angle]

To create a shape using this program the command polygon 4 90 1 would create a square of enlargement factor 1 with side lengths of 90.

To create other polygons alter the 4.
5 would make a pentagon etc.

Remember these useful commands:
clearscreen = clear the screen
hideturtle  = hide the turtle