Drawing Polygons
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! |
Clearing the Screen
To clear the screen type:
clearscreen
or simply:
cs
Changing Colours etc.
Use the "set" menu to change the colour of lines and the screen. |
Drawing a Square
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] |
Assignment.
- Make a copy of this table (you can cut and paste it into Excel).
- Use Logo to find the missing angles.
- Fill in your table with your answers.
- Let your teacher check your table.
|
Hints
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.
Questions, conclusions and further work.
Write these answers onto the bottom of your Excel spreadsheet.
- Write down a rule for finding the exterior angle of a regular polygon.
- Write down a rule for the sum of the interior angles of a regular polygon.
- Let your teacher check your answers before you send them to the printer.
- If time permits, go onto the next Logo exercise and learn how to make a "procedure" to draw any regular polygon.
Interesting Designs.
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] | |