TURTLE GEOMETRY MICROWORLD 3
In
this appendix to the Geometry Microworld Part II Chris Gregory, Senior
Lecturer in Mathematics at Bradford and llkley Community College, looks
at the rectangle.
We have already come across the procedures SQUARE and TRI, which draw
squares and equilateral triangles, in particular with the variable SIDE
which allows us to make the shapes any size we like. These ideas can now
be adapted to draw rectangles.
Draw a Rectangle
Knowing already how to draw a square, how can we instruct the Turtle to
draw any rectangle? Leave the children to discuss this - they will certainly
have to consider carefully what, in general, rectangles look like and,
in their procedures, which numbers will have to vary and which will remain
constant.
This activity may well lead to children deciding that SQUARE is just
a special case of RECT - that a square can be considered to be just a
special kind of rectangles.
Different Rectangles, Perimeters and Areas
Using the RECT procedure, make the Turtle draw rectangles which have all
the same perimeter, say, 36 units. In other words, it has to travel the
same distance each time.
The 'standard' procedure for drawing a rectangle is:
TO RECT :SIDE1 :SIDE2
FD :SIDE1
RT 90
FD :SIDE2
RT 90
FD :SIDE1
RT 90
FD :SIDE2
RT 90
END |
Or, more neatly: |
TO RECT :SIDE1 :SIDE2
REPEAT 2 [FD :SIDE1 RT 90
FD
:SIDE2 RT90]
END |
These procedures can be called by specifying two values,
for the length and width of the rectangle:
e.g. RECT 15 20
|