This program draws an equilateral triangle. This is the simplest polygon. repeat 3 [forward 40 right 120] You must be letter perfect when you type this in! |
![]() |
To clear the screen type:
clearscreen
or simply:
cs
Use the "set" menu to change the colour of lines and the screen. |
![]() |
You have already drawn a triangle. You can draw a square by using the code:
repeat 4 [forward 100 right 90] Or use the abbreviations: repeat 4 [fd 100 rt 90] |
![]() |
|
|
Does the length of the sides make any difference to the angles of any of the polygons?.
You can make the polygon big and use a fine line to check if the sides actually join up.
Try to spot patterns in the answers and then use this pattern to predict the angles that you need in the formula.
Write these answers onto the bottom of your Excel spreadsheet.
Groovy BordersUse the "set" menu to change the colour of lines and the screen. Or use the code below and change the numbers in the setpensize and setpencolor commands.
setpensize [1 1] setpencolor 8 repeat 5 [fd 100 rt 72] Draw the same polygon, over and over again, with gradually thinner lines in different colours | |
|
![]() |
Swirling ShapesMake a polygon and then put the polygon code into a repeat loop so that you can draw lots of copies of it gradually turning through 360 degrees.
cs ht repeat 20 [ repeat 5 [fd 100 rt 72] rt 18] | |
|
![]() |
Stellations.Draw a repeating polygon pattern but then alter the code for the repeat and the polygon.
cs ht repeat 20 [ repeat 5 [fd 100 rt 18] rt 72] | |
|
![]() |
![]() | |