Page 64 - modular4.0
P. 64
Chapter Profile
DRAWING POLYGONS IN SCRATCH
Polygons are 2D shapes with three or more straight lines and angles. Examples of polygons
are triangle, square, rectangle, quadrilateral, pentagon, octagon, etc.
Equilateral Square Pentagon Hexagon Heptagon Octagon Nonagon Decagon
Triangle (4 sides) (5 sides) (6 sides) (7 sides) (8 sides) (9 sides) (10 sides)
(3 sides)
To draw polygons in Scratch, you must remember a few thumb rules. They are:
You must know the number of sides in the shape. This is the value to be given in repeat
block. For example, you give repeat 3 to draw a triangle and 4 to draw a square.
Each time a repeat command is used, you draw a line and turn at a corner.
You must know the degree of the angle at the corner. It is very easy to calculate this.
Just divide 360 by the number of sides in the shape. For example, to draw a triangle, the
turn will be 360/3 (sides of the triangle) = 120.
Look at these polygons can be made using repeat.
Polygon Command
Triangle Repeat 3 Move 100 Steps Turn 120 degrees
Square Repeat 4 Move 100 Steps Turn 90 degrees
Pentagon Repeat 5 Move 100 Steps Turn 72 degrees
Hexagon Repeat 6 Move 100 Steps Turn 60 degrees
Heptagon Repeat 7 Move 100 Steps Turn 51 degrees
Octagon Repeat 8 Move 100 Steps Turn 45 degrees
Nonagon Repeat 9 Move 100 Steps Turn 40 degrees
Decagon Repeat 10 Move 100 Steps Turn 36 degrees
Suppose, you have to code a dance party in Scratch where characters keep
dancing in a loop until stopped? Which block will you use for this and which
songs would you play in the program?
62 Modular (Ver. 4.0)-V

