Page 114 - TGPT_V5.0_C3_Flipbook
P. 114

The Pen blocks are added to the Code tab. They are colour-coded green and are used to draw
              shapes, design patterns, and adjust the colour and thickness of the lines or drawings created
              by the sprite, not the shape itself.

              The                       lets you change the pen's colour.


              The                    block lets you adjust the pen's thickness by typing a number in the box.



                   DRAWING A POLYGON

              Polygons are 2D shapes with three or more straight lines and angles. Examples of polygons
              are triangle, square, rectangle, quadrilateral, pentagon, octagon, etc.









                                      Triangle                  Square                  Pentagon
                                      (3 sides)                (4 sides)                (5 sides)

              To draw polygons in Scratch, follow these basic guidelines:

                   Determine the number of sides: Know how many sides the shape has. This number is
                 used in the Repeat block. For example, use Repeat 3 to draw a triangle and Repeat 4 to
                 draw a square.

                   Draw and turn: Each time you use the Repeat block, the Sprite will draw a line and turn at
                 each corner.

                   Calculate the angle: Find the angle for each corner by dividing 360 degrees by the number
                 of sides. For instance, to draw a triangle, divide 360 by 3 (the number of sides), resulting in

                 a 120-degree turn.

              Look at these polygons can be made using repeat.
              Drawing a Square


              To draw a square in scratch, arrange the blocks as shown below:























                  112  Premium Edition-III
   109   110   111   112   113   114   115   116   117   118   119