Project Folders
Teacher Resources
Student Resources
How Do I?
Site Map
Our Team

polygons 1 2 3 4 5 6 7 8 9
Polygons 3
7 KB

Goal:   The turtle does the math to make polygons.


Vocabulary:   / (division sign), setpensize

Project Map

to polygon
setc whatcolor
setpensize howthick
repeat #sides [fd howbig rt 360 / #sides]

to reset


In this project, the turtle will always turn exactly the right amount to make regular polygons with equal sides and equal angles.

  1. Make a new slider called #howthick.   Set its minimum to 1 and its maximum to 30 (or another number of your choosing, less than 30).

    Revise the polygon procedure as shown.

  2. The turtle needs to turn 360 degrees in all to draw a polygon.
    Rt 360 / #sides means, "Turn right 360 degrees divided by the number on the #sides slider."  
    Notice that the polygon procedure uses #sides twice in one command.

  3. Setpensize howthick means, "Set the thickness of the turtle's pen to the number on the howthick slider."   Every turtle starts out with a pensize of 1.   You can choose any pensize up to 30

  4. We don't need the angle slider any more.   The turtle will do the math for us to figure out the angles we need.   You may remove this slider.   (Right-click/ctrl-click and select Cut.)

What If?
Set the #sides and howbig sliders to draw a variety of polygons.   What settings draw the largest possible polygon that does not "wrap" (that does not go off the edge of the project's page)?

At what setting on the #sides slider does the polygon begin to resemble a circle more than a polygon? (Let's call this the "first circle" setting.)   Change the settings on the howbig and howthick sliders to see their effect on the "first circle" setting.

On Your Own - Project Ideas
Use the method for creating manysquares (see project 5 in the squares folder) to create a manypolygons procedure.

© copyright 2001 - 2016  OpenWorld Learning.   All rights reserved.