Page 81 - iPrime_V2.2_class6
P. 81
To draw polygons in Scratch, you must remember a few thumb rules. These are as follows:
You must know the number of sides of 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 block 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 of the shape. For example, to draw a triangle, the turn will
be 360/3 (sides of the triangle) = 120.
Look at these polygons that can be made using Repeat block.
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
Tech Funda
Use the Hide block to hide the sprite after drawing the shape.
DRAWING A SQUARE IN SCRATCH
Now you will learn how to draw a square in Scratch. The steps are given below:
Step 1 Click on Events blocks category .
Step 2 Click and drag the when clicked block to the script area.
Step 3 Click on Pen blocks category .
Step 4 Click on erase all block and drag it to the script area and snap it to the script.
Step 5 Next click on Control blocks category .
79
Scratch Programming—Game Creation 79

