Table 1 lists suggested content descriptors from the Australian Curriculum: Mathematics Year 7 (ACARA, n.d.) relevant to the learning activities. The central theme of the learning activities is to establish the formulas for areas of rectangles, triangles and parallelograms.
In the process of establishing the formula for areas, rectangles are often considered to be constructed from an array of squares. One of the pedagogical advantages afforded by computational modelling is that students can investigate in a dynamic way how to generalise the construction of rectangles through both mathematical and computational abstraction, using algebraic and algorithmic thinking.
Figure 1 shows a three-part learning activity for establishing the formula for areas of rectangles. First, students learn how to draw a square using a single command myRect accepting four parameters (Line 12 in Figure 1). The first two parameters refer to the Cartesian coordinates of the top-left corner the square whereas the last two parameters refer to the width and length (in pixels) of the square. Next, students are asked to construct a row of nine squares. A common approach from students is to use the command myRect nine times, one for each square needed. To foster generalisation, students are prompted to seek an algebraic pattern for the x-coordinates of top-left corners of these nine squares, which are in effect related through horizontal translation. The pattern of horizontal translation can be mathematically expressed as using an integer variable (). Adopting the algorithmic structure of a for loop, students can express such algebraic pattern in simple computer code (Line 14 to 16 in Figure 1) and see it play out for verification.
Figure 1. Establishing the formula for areas of rectangles
The final part of the activity is to construct a rectangle using multiple rows of squares. For example, Line 18 to 21 in Figure 1 demonstrates a nested for loop structure to construct a three-row rectangle, with the outer for loop (Line 18 in Figure 1) controlling the number of rows to be constructed. For classroom teaching, students should be asked to think about how to duplicate the single row they completed previously to have them placed beneath each other. Students are expected to identify and generalise the pattern of vertical translation for y-coordinates of top-left corners of the left-most squares as using a integer variable (). The nested for loop structure is, in a Constructionist sense, a computational modelling representation of the formula for areas of rectangles. It engages students with a personally and culturally meaningful embodiment of the symbolic area formula.
This activity is specifically designed to extend Activity 1 to present an intuitive way of configuring parallelograms by slanting rectangles, as shown in Figure 2. Students usually find such an extension activity engaging, with a sense of awe, as it appeals to their creativity needs. A more formal approach to establishing the formula for areas of parallelograms will be discussed later in Activity 4.
Figure 2. Establishing the formula for areas of parallelograms
Students are asked to explore possible modifications of their nested for loop from Activity 1 to place each row of squares instead with an incremental translation of 50 pixels per row to the right. The only change that is necessary concerns the locations of left-most squares in the rows. More specifically, the integer variable of the inner for loop needs to be determined by the integer variable (), as implemented in code on Line 13 in Figure 2.
To build an explicit link to the shape of parallelogram, two auxiliary lines can be drawn using the command myLine (Line 18 and 19 in Figure 2), which accepts as parameters the coordinates of two end points of the line. Through rearrangement of the rows of square, it can be intuitively established that the area of the parallelogram is the same as that of the rectangle from which the parallelogram is constructed.
A common misconception with concrete manipulatives when slanting the rectangle originates from the height being changed. Compared with concrete manipulatives, an advantage of the computational modelling demonstrated in this activity is that it visually shows and supports the need for the height to be maintained for the area of the parallelogram to remain the same as that of the rectangle. Later in Activity 4, students will be able to directly interact with the rectangle by dragging its top-left corner to form an infinite number of parallelograms of the same area.
This activity provides students with, and prepares them for, an alternate computational modelling representation of rectangles, which will be called upon in Activity 4. Figure 3 shows a rectangle constructed by deconstructing its computational abstraction using mathematical thinking. From Activity 1, students would have known that a rectangle can be drawn using a single command, e.g., myRect. A software design challenge for students is thus to investigate how the four parameters are utilised by the hidden computational algorithm to eventually draw a rectangle.
Figure 3. Software design challenge for drawing rectangles
A rectangle has two pairs of parallel sides. One of the pedagogical advantages afforded by computational modelling is that students can conceptualise rectangles with their parallel sides from the perspective of coordinate geometry to develop a refined, quantitative understanding. The top-left corner, , of the rectangle is utilised as a reference point. The top side of the rectangle can be constructed using the reference point and the width (Line 15 in Figure 3) whereas the left side of the rectangle can be constructed using the reference point and the length (Line 17 in Figure 3). For lines to be parallel, they must be equal distant apart from each other. The bottom side is constructed by subtracting the length (l) from the y-coordinates of the end points of the top side (Line 16 in Figure 3) whereas the right side is constructed by adding the width (w) to the x-coordinates of the end points of the left side (Line 18 in Figure 3).
This activity builds upon Activity 3 to create a dynamic parallelogram having two component triangles, overlapping the fixed rectangle of Activity 3, as shown in Figure 4. The top-left corner of the parallelogram dynamically follows the mouse cursor. The diagonal of the parallelogram visually splits the parallelogram into two congruent triangles. Consequently, the two triangles change dynamically as their common top-left vertex also follow the mouse cursor.
Figure 4. Establishing the formulas for areas of parallelograms and triangles
Line 20 in Figure 4 calls myMouse() to assign the x-coordinate of the mouse cursor to the variable myMouseX. Line 21 to 24 in Figure 4 is the same as Line 15 to 18 in Figure 3 except for the x-coordinate of the top-left corner being replaced by the variable myMouseX. Line 26 in Figure 4 draws the diagonal of the parallelogram.
The dynamic feature of computational modelling enables students to experiment, observe, decompose and compare all the dynamically formed parallelograms and triangles with the fixed rectangle. Students can easily reach the conclusion that the area of the parallelogram is the same as that of the rectangle and the area of the triangle is half of that of the parallelogram (or half of that of the rectangle).