In this programming assignment, we shall draw polygons using Pro-Bot. We shall start by using sequential programming to draw the polygons. Next, we shall look at some regular polygons and learn how to use Pro-Bot’s Repeat Loops to draw them. We shall also develop a generalized algorithm to draw regular polygons using Pro-Bot. We can store programs for the polygons as Procedures on Pro-Bot.
Polygons
We see polygons of different types all around us in our daily lives. Here is an interesting article that I found on mathforum.org, as to where we see different types of polygons in our daily lives.
Use Pro-Bot to draw a square of sides 8 cm. Each interior angle is 90 degrees.
Use Pro-Bot to draw a rectangle of sides 4 cm and 6 cm. Each interior angle is 90 degrees.
Use Pro-Bot to draw a parallelogram of sides 4 cm and 6 cm. One pair of interior opposite angles is 45 degrees each and the other pair is 135 degrees each.
Note: Remember that for a parallelogram, opposite angles are equal.
In the figure of the parallelogram above, angles marked ‘a’ are equal; they are opposite angles. Similarly, angles marked ‘b’ are equal; they too are opposite angles. The angles ‘a’ and ‘b’ add up to 180 degrees; ‘a’ and ‘b’ are supplementary angles.
Use Pro-Bot to draw a rhombus of sides 6 cm. One pair of opposite interior angles is 60 degrees each and the other pair is 120 degrees each.
Use Pro-Bot to draw an equilateral triangle of sides 6 cm. Each interior angle is 60 degrees.
Use Pro-Bot to draw a right triangle of sides 3 cm, 4 cm and 5 cm. The interior angle between the 4 cm and 5 cm sides is 36 degrees. The interior angle between the 3 cm and 5 cm sides is 54 degrees. The interior angle between the 3 cm and 4 cm sides is 90 degrees.
Drawing Regular Polygons using Repeat Loops in Pro-Bot
- Equilateral Triangle: Use Pro-Bot to draw an equilateral triangle of sides 6 cm. Each interior angle is 60 degrees.
- Square: Use Pro-Bot to draw a square of sides 6 cm. Each interior angle is 90 degrees.
- Pentagon: Use Pro-Bot to draw a pentagon of sides 6 cm. Each interior angle is 108 degrees.
- Hexagon: Use Pro-Bot to draw a hexagon of sides 6 cm. Each interior angle is 120 degrees.
- Octagon: Use Pro-Bot to draw a octagon of sides 6 cm. Each interior angle is 135 degrees.
- Nonagon: Use Pro-Bot to draw a nonagon of sides 6 cm. Each interior angle is 140 degrees.
- Decagon: Use Pro-Bot to draw a decagon of sides 6 cm. Each interior angle is 144 degrees.
After drawing the various polygons, ask the students to identify a few examples of where they might see these shapes in their daily lives. For example: a sandwich cut in half is a triangle, roof trusses are triangles, a STOP sign is an octagon, a YIELD sign is a triangle, cells in beehives/ honeycombs are hexagons, etc.
Here is a set of solutions for this assignment.
Develop an Algorithm for drawing Regular Polygons using Pro-Bot
- Is it more efficient to use Repeat Loops or Sequential Programming when you write programs for regular polygons on Pro-Bot?
- From your programs above, can you identify a technique to find the angle at which Pro-Bot should turn at each vertex for a regular polygon?
- Given the length of a side of a regular polygon and the angle you found using your above technique, can you write a program for drawing a regular polygon of N sides (N being any whole number) using Pro-Bot?
- Can you now generalize your method and write down the various steps involved, as an algorithm.
Experiment more with Regular Polygons using Pro-Bot:
- While developing your algorithm, did you notice that as the number of sides of the polygon increases, the shape of the polygon tends to a circle? What happens to the interior angle of the polygon in this case; does it increase or decrease?
- What happens to the angle at which Pro-Bot has to turn as the number of sides of the polygon increases? Does it increase or decrease?
- What is the smallest measurement of angle that you can use on Pro-Bot? What is the smallest length that you can draw using Pro-Bot?
- Using the algorithm that you developed above for Pro-Bot, draw a regular polygon using that uses the smallest angle and the smallest length that Pro-Bot can provide as its dimensions. What shape do you get?
- Draw a regular polygon using Pro-Bot, just like the one in the previous question, that uses the smallest degree of angle, but with the length of the side increased by 1 unit. What shape do you get?
- What happens to the shape if you keep increasing the length of the side by 1 unit at a time, but keep the angle constant at the smallest value?
- What happens if you increase both the length and the angle by 1 unit each time? What difference do you see?
Challenge Question:
- Can you write a program for Pro-Bot to draw a circular maze (a spiral shape) using all of the ideas that you learned from the above questions? It is easier to start the spiral from inside and start moving outwards. Start the spiral with the smallest length and angle that Pro-Bot can provide and then build outwards.
No comments:
Post a Comment