Page 78 - Computer - 4
P. 78
To draw a polygon, the following points should be kept in mind:
(a) The number of sides of the polygon must be known.
This value is used in the Repeat block to draw the required number of sides.
(b) You need to turn the sprite by a specific angle to draw a polygon. The formula
to calculate the angle of turn is given by
360°
number of sides in the polygon
For example, to draw a pentagon having 5 sides, you need to turn the sprite
360°
by 5 = 72° after every turn.
(c) You need to use the Pen down block to draw lines as the sprite moves.
The table given below gives the value for Repeat block and the angle of turn needed
to draw various polygons.
Name of Polygon Number of Sides Value for Repeat Block Angle of Turn
Triangle 3 3 120
Square 4 4 90
Pentagon 5 5 72
Hexagon 6 6 60
Octagon 8 8 45
Knowledge Discovery Subject Enrichment
A polygon may not have all its sides equal. A polygon that has all its sides equal is called a
Regular polygon. The table given above works for drawing regular polygons.
Try This Creative Skills
Create a Scratch project to draw a pentagon in red colour with length of each side 100 units.
76