Drawing shapes in Scratch
In programming pictures are drawn with commands, not tools. To draw in Scratch we add the Pen extension through the “add extension” button at the bottom left of the window. The “pen down” block makes the sprite leave a trail and “pen up” stops drawing. “Set pen colour” and “set pen size” change how the line looks, and “erase all” clears the stage. To start from the centre use “go to x: 0 y: 0”. To draw a shape, walking and turning are repeated: a square is “repeat 4: move 80 steps, turn 90 degrees”. A regular triangle is 3 repeats turning 120° each time; a hexagon is 6 repeats turning 60°. Rule: in a regular polygon the turning angle is 360° divided by the number of corners. If you want the sprite itself not to show, use the “hide” block.
Children played at walking a square in the yard: four steps, turn the same amount to the right, four steps again, and so on. After the fourth time they were back where they started. In a program a pen trail draws a shape in the same way.
A programmer draws shapes with code, an architect makes exact drawings, and a robot programmer tells a robot its path.
Explain to a friend how to draw a triangle using only the words “go forward” and “turn”, without saying the word “triangle”.
“Sprite on paper”: following commands on the board, pupils draw on squared paper as the “sprite” (4 times: 5 squares forward, turn right 90°). The result should be a square. Then test in Scratch.