Showing posts with label Quadrilaterals. Show all posts
Showing posts with label Quadrilaterals. Show all posts

Monday, August 4, 2014

Applying Fractions to Polygons

In this programming assignment, we shall draw polygons and divide them into fractions using Pro-Bot. This assignment can be a follow-up to the one where we learned to draw various polygons using Pro-Bot. We shall use sequential programming for drawing irregular polygons and Repeat Loops to draw regular polygons. Next, we shall divide the polygons into specified fractions using Pro-Bot as our drawing tool.


Computer Science concepts involved:   Sequential programming, Repeat loops

Math concepts involved:   Polygons (regular and irregular), Linear & Angular Measurements, Fractions, Area, Congruence

Grade levels:   3, 4, 5

Hours required:   2 or more



Polygons


In geometry, a polygon refers to a closed, two-dimensional figure formed by a set of straight line segments. The straight line segments are called the polygon’s edges or sides, and the points where two edges meet are the polygon's vertices or corners.

If all edges are equal and all angles are equal, then it is a regular polygon. Else, it is an irregular polygon.


Square:

  1. Use Pro-Bot to draw a square of sides 8 cm. Each interior angle is 90 degrees.
  2. Divide the square horizontally into quarters (1/4) using Pro-Bot as your drawing tool. 
  3. Divide the square vertically into quarters (1/4) using Pro-Bot as your drawing tool.
  4. Divide the square into 4 equal squares, using Pro-Bot as your drawing tool. What fraction of the large square does each small square occupy?
  5. Divide the square into 2 equal sized triangles, using Pro-Bot as your drawing tool. Are the triangles congruent? 

Rectangle:

  1. Use Pro-Bot to draw a rectangle of sides 4 cm and 6 cm. Each interior angle is 90 degrees.
  2. Divide the rectangle into thirds along the longer side using Pro-Bot as your drawing tool. 
  3. Divide the rectangle into halves along the shorter side using Pro-Bot as your drawing tool.
  4. Divide the rectangle into quarters using Pro-Bot as your drawing tool.
  5. Divide the rectangle into 2 triangles along a diagonal, using Pro-Bot as your drawing tool. Are the triangles congruent? Are they equal in area?

Rhombus:

  1. 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. 
  2. Divide the rhombus into thirds, using Pro-Bot as your drawing tool.
  3. Divide the rhombus into sixths (1/6) using Pro-Bot as your drawing tool. Are the fractions congruent shapes? Are they rhombuses? If not, what shapes are they?

Parallelogram:

  1. 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 (Remember that for a parallelogram, opposite angles are equal).
  2. Divide the parallelogram into 2 equal parallelograms, using Pro-Bot as your drawing tool. What fraction of the original parallelogram is occupied by the smaller ones?
  3. Considering that the minimum dimension that can be provided by Pro-Bot is 1 cm, what is the maximum number of smaller parallelograms that you can divide up the larger parallelogram into, using Pro-Bot as your drawing tool? What fraction of the larger parallelogram is occupied by each of the smaller units?

Equilateral Triangle:

  1. Use Pro-Bot to draw an equilateral triangle of sides 6 cm. Each interior angle is 60 degrees.
  2. Divide the triangle into 2 equal triangles, using Pro-Bot as your drawing tool.
  3. Divide the triangle into 3 triangles of equal area, using Pro-Bot as your drawing tool. You can do this in a couple of ways: 

  • Divide one side of the triangle into 3 equal parts. Then draw lines connecting the opposite vertex to the two points that trisect the side. 
  • Find the centroid: If you draw a line from each vertex to the midpoint of the opposite side, the point at which all three lines meet is the centroid. Draw a line from each vertex to the centroid to divide up the triangle into 3 equal triangles.

Friday, August 1, 2014

Drawing Polygons using Pro-Bot given Area or Perimeter

In this programming assignment, we shall draw polygons using Pro-Bot, given the area or perimeter of the polygons. Your first task is to figure out the dimensions of the polygons from the given data and your second task is to write programs to draw the polygons using Pro-Bot. You can use either sequential programming or Repeat loops to draw the polygons, depending on whether they are irregular or regular.

Computer Science concepts involved:  Sequential programming, Repeat loops

Math concepts involved:  Polygons (regular and irregular), Area, Perimeter, Measurement, Angles

Grade levels:  4, 5

Hours required: 3 - 4


Draw Polygons using Pro-Bot given the perimeter:

  1. The perimeter of a regular, 4 sided polygon is 32 cm. The interior angles are all 90 degrees each. Can you write a program for Pro-Bot to draw this polygon? What kind of a polygon is it?
  2. The perimeter of a regular, 4 sided polygon is 32 cm. A pair of opposite interior angles are 60 degrees each. Can you write a program for Pro-Bot to draw this polygon? What kind of a polygon is it?
  3. The perimeter of a regular 3 sided polygon is 18 cm. The interior angles are all 60 degrees each. Can you write a program for Pro-Bot to draw this polygon? What kind of a polygon is it?
  4. The perimeter of a 3 sided polygon is 24 cm. The interior angle between the shortest sides is 90 degrees. The interior angle between the shortest and longest sides is 54 degrees. The sum of the lengths of the shortest sides is 14 cm. The difference between the lengths of the shortest sides is 2 cm. What kind of a polygon is it? Can you write a program for Pro-Bot to draw this polygon? 
  5. The perimeter of a 4 sided polygon is 24 cm. Two of its sides are parallel to each other and the other two are not. The sides that are not parallel are equal in length. Both the angles coming from a parallel side are equal: the pair of angles coming from the longer parallel side is 54 degrees each and the pair of angles coming from the shorter parallel side is 126 degrees each. The sum of the lengths of the parallel sides is 14 cm. The shorter of the parallel sides is 4 cm. Can you identify the polygon? Can you write a program for Pro-Bot to draw this polygon?
  6. The perimeter of a 4 sided polygon is 24 cm. Both sets of opposite sides are parallel. What kind of a polygon do you think it is? The ratio of the shorter side to the longer side of this polygon is 1/2; i.e.; each shorter side is half the length of the longer side. One pair of interior opposite angles is 60 degrees and the other pair of interior opposite angles is 120 degrees. Can you write a program for Pro-Bot to draw this polygon?
  7. The perimeter of a 5 sided regular polygon is 25 cm. Can you write a program for Pro-Bot to draw this polygon? What kind of a polygon is it? What is the value of each interior angle?

Drawing Polygons using Pro-Bot given the area:


  1. The area of a regular, 4 sided polygon is 24 square cm. The interior angles are all 90 degrees each. Can you write a program for Pro-Bot to draw this polygon? What kind of a polygon is it?
  2. The area of a 4 sided polygon is 24 square cm. The opposite sides are equal in length and the interior angles are all 90 degrees each. The longer side measures 2 cm more than the shorter side. The sum of the lengths of the long side and the short side is 10 cm. Can you write a program for ProBot to draw this polygon? What kind of a polygon is it?
  3. The area of a 3 sided polygon is 24 square cm. The interior angle between the shortest sides is 90 degrees. The interior angle between the shortest and longest sides is 54 degrees. The sum of the lengths of the shortest sides is 14 cm. The difference between the lengths of the shortest sides is 2 cm. What kind of a polygon is it? Can you write a program for ProBot to draw this polygon? 
  4. The area of a 4 sided polygon is 24 square cm. Both sets of opposite sides are parallel to each other. What kind of a polygon is it? The distance between the longer parallel sides is 4 cm. The perimeter of this polygon is 20 cm. One pair of interior opposite angles is 60 degrees and the other pair of interior opposite angles is 120 degrees. Can you write a program for ProBot to draw this polygon?

Thursday, July 31, 2014

Solutions: Art with Pro-Bot - A Soccer Game

The soccer game picture is a follow-up to the "Art with Pro-Bot: A Dancing Robot" exercise, with one of the figures being the exact same as the Dancing Robot and the other being its mirror image.


Let's name the figure on the left as Team A and the one on the right as Team B. You would recognize from the figure that both Team A and Team B share some parts in common, such as the head and the neck. So, it's easier for the programmer to write the code for these parts just once and store it as a procedure; it can then be used multiple times. 

// Proc 1 - procedure for the neck and head


Fd 1
Lt
Fd 1
Rt
Rpt 3 [
Fd 2
Rt
]
Fd 1





Team A:  


// Program written in Main and using the above procedure. The Start point is marked in the figure.


Rpt 4 [
Fd 10
Bk 4
Rt
]
Fd 3
Lt
Proc 1


Team B:


// Program written in Main and using the above procedure. The Start point is marked in the figure.


Rpt 4 [
Fd 10
Bk 4
Lt
]
Fd 3
Rt
Proc 1


Art with Pro-Bot: A Soccer Game


Let’s use Pro-Bot to draw a picture of robots playing soccer.

We shall work using both Repeat Loops and Procedures in Pro-Bot for this assignment. This "art" project was designed to use the concepts of Repeat Loops and Procedures in a fun way.

There are 2 robots in the picture, one representing Team 1 and the other, Team 2. The two robots are playing each other in a game of soccer. The dimensions are as follows: Each robot's body is a 6 cm side square, the limbs are 4 cm long, the neck is 1 cm long and the head is a 2 cm side square. 

While writing the programs for Pro-Bot to draw the figures, remember to use Repeat Loops for patterns that repeat. You can also see from the pictures that the head and neck is exactly the same for both pictures. Hence, you can write the program for the head and neck once, store it as a procedure in Pro-Bot's memory and call it for drawing both robots. 

Click here for a set of solutions.

Draw in as many members for each team as you like. You can even store the programs for each robot as separate procedures which makes it easier for you to draw multiple figures in your art project. You can put in a background of your choice and draw a soccer ball in the middle once you have drawn both teams. It does not have to be just soccer; students in my class have used this theme to depict scenes from various sporting events. We worked on this project the day after a major basketball game and there were quite a few children who made pictures with basketball scenes... Let your imagination run free in creating your art work. 























Tuesday, July 29, 2014

Solution: A Train using Nested Loops

1.  Assume we start drawing the train from the leftmost bottom corner, with Pro-Bot facing forward.

Here is the code for the engine:

  Fd 6
  Rt
  Fd 2
  Lt
  Fd 3
  Rt
  Fd 2
  Rt
  Fd 3
  Lt
  Fd 6
  Rt
  Fd 6
  Rt
  Fd 10
  Bk 12
  Rt

At this point, the engine is done and the Pro-Bot is ready to start drawing the coaches. The 3 coaches are similar, which means we can use Nested Loops for drawing them. Here is the code for the train with 3 coaches and the connectors:

  Rpt 3 [           // the 3 here refers to the number of coaches
  Rpt 3 [           // the 3 here refers to the 3 sides of the square that forms a coach
  Fd 6
  Rt
  ]
  Fd 6
  Bk 8
  Rt
  ]



2.  To draw the train with 5 coaches, the only change required is to change the 3 in the outer loop to 5. The code for the engine remains the same. The code for the coaches is now:

  Rpt 5 [           // the 5 here refers to the number of coaches
  Rpt 3 [           // the 3 here refers to the 3 sides of the square that forms a coach
  Fd 6
  Rt
  ]
  Fd 6
  Bk 8
  Rt
  ]



3.  To draw the train with 20 coaches, the only change required is to change the number in the outer loop to 20. Everything else remains the same.

  Rpt 20 [         // the 20 here refers to the number of coaches
  Rpt 3 [           // the 3 here refers to the 3 sides of the square that forms a coach
  Fd 6
  Rt
  ]
  Fd 6
  Bk 8
  Rt
  ]

Art with Pro-Bot: A Train using Nested Loops

Using Pro Bot, trace the following simplified picture of a train. We have an engine up front and 3 coaches following it. The specifications for the engine and the coaches are provided below. All measurements are in centimeters.


Each coach is a square of side 6 cm.
The engine is 10 cm long and 6 cm tall. The funnel is located at 2 cm from the front end of the engine, and is 2 cm wide and 3 cm tall.
The connector between the engine & the first coach, as well as the ones between coaches are 2 cm each. We also have an extra connector on the last coach to account for any additional coaches that may be added in later.






















In this project, we shall:
(1) work with nested loops
(2) revisit the technique to draw squares using Repeat Loops
(3) think about how to customize our code to produce a new train picture with a varying number of coaches each time.



  • Write a program for Pro-Bot to draw the above picture of a train with the engine and 3 coaches. Remember to use Nested loops in your program.
  • Now modify your program so that Pro-Bot draws a similar train with the same engine and 5 coaches. What changes did you make to your program?
  • What change would you make to your program if you want Pro-Bot to draw the above train with 20 coaches?
  • Once you have drawn the picture of the above train using Pro-Bot, you can decorate your picture and give it an interesting background.

I had designed this project as a fun way of introducing Nested Loops to the children. We worked on this project the week of Valentine's Day. So, after drawing the train using Pro-Bot, we had fun customizing the train picture to the theme, with little heart shaped stickers chugging out of the funnel. Each kid drew a picture of himself/herself as the train driver and their family in the train's coaches, with backgrounds of their choice... It was a really fun assignment. Across the various classrooms that I taught, children ranked Nested Loops as the most favorite programming concept that they learned this year.


Here is a set of solutions to the above.


Solutions: Art with Pro-Bot - A Dancing Robot

The picture of the Dancing Robot consists of 2 main parts - the body and the head, both of which are squares and can be drawn using Repeat Loops. The interesting part is that the limbs of the robot can also be drawn as part of the Repeat Loop for drawing the body.




Let's look at the code for drawing the body of the robot first. Please keep in mind that depending on the starting point and the direction in which Pro-Bot is facing, you can have different ways of drawing this figure.


Here is one way of drawing it, refer to the figure on the right for the Starting point.

    Rpt 4 [
    Fd 10       // body + limb = 10 cm
    Bk 4          
    Rt        
    ]




Now, let's try to draw the neck and the head of the robot. Again, the following code is just one of the possible solutions.

Starting from the neck and going up,

    Fd 1          // 1 cm long neck
    Lt
    Fd 1
    Rt
    Rpt 4 [      // Repeat loop to draw the square for the head
    Fd 2
    Rt
    ]
 

Combining the two pieces of code above, we have the final program to draw our dancing robot:
 
    Rpt 4 [      // Start by drawing the body of the robot
    Fd 10    
    Bk 4          
    Rt        
    ]
    Fd 3         // After drawing the body, get to the start point for drawing the neck
    Lt
    Fd 1          // Draw the 1 cm long neck
    Lt
    Fd 1
    Rt
    Rpt 4 [      // Draw the square for the head
    Fd 2
    Rt
    ]



Art with Pro-Bot: A Dancing Robot



Write a program to draw the following figure of a dancing robot. All measurements are in centimeters. 

Do you see patterns in the figure that keeps repeating? How many Repeat Loops can you use in the program for this robot?

The sides of the body are 6 cm long, the limbs are 4 cm each. The neck is 1 cm long and the head is a square measuring 2 cm on each side.






















This assignment can be used as a follow-up to drawing squares with Repeat Loops. The body of the robot can be written using a Repeat Loop as can the head. 

The children in the classes that I taught drew multiple ones of these and drew in other features by hand. Imaginations ranged all the way from groups of ballet dancers to soccer players to swimmers (with the picture rotated to the right)...

Click here to see one set of solutions.

Solutions: Art with Pro-Bot - Snails

Let's create four procedures for the squares of sides 2 cm, 4 cm, 8 cm and 12 cm. We could store them in Proc 1, Proc 2, Proc 3 and Proc 4.


Here is one way of writing these procedures:

// Proc 1 - procedure for drawing 2 cm side square
Rpt 4 [
Fd 2
Rt
]


// Proc 2 - procedure for drawing 4 cm side square
Rpt 4 [
Fd 4
Rt
]


// Proc 3 - procedure for drawing 8 cm side square
Rpt 4 [
Fd 8
Rt
]


// Proc 4 - procedure for drawing 12 cm side square
Rpt 4 [
Fd 12
Rt
]



Next, we shall use the above procedures to draw the snails. Keep in mind that this is just a subset of the possible solutions. Both the procedures as well as the following programs can be written in multiple ways.

Program for the small snail as written from Main:


Proc 1
Rt
Fd 4
Lt
Proc 2
Rt
Fd 1
Lt
Proc 1


Program for the large snail as written from Main:


Proc 2
Rt
Fd 8
Lt
Proc 4
Rt
Fd 2
Lt
Proc 3
Rt
Fd 2
Lt
Proc 2



Art with Pro-Bot: Snails

Write a program for Pro-Bot to draw a picture of snails as shown below. 

The bigger snail has a square head of side 4 cm and a 4 cm long neck. The outer square of its shell has 12 cm sides, the middle one 8 cm & the inner one 4 cm. The smaller snail has a square head of side 2 cm & a 2 cm long neck. The outer square of its shell has 4 cm sides & the inner one 2 cm.


Remember to use Repeat Loops when you write programs for drawing squares using Pro-Bot. We shall reuse the pattern for the larger snail's shell from the Repeat Loops Maze project. 



Once you are done drawing the body of the snail using Pro-Bot, you can draw in other features such as eyes, mouth, antennae, etc. You can also draw in more features in the background to make your picture more interesting. 

























I designed this project to let the children practice Repeat Loops and Procedures in a fun way using Pro-Bot. Repeat Loops were used for drawing the squares. The 4 cm side square was stored as a procedure and used multiple times in the figure. We did the same for the 2 cm side square as well. 


Here is a set of solutions.