What is the Pen Extension?
PictoBlox has a special set of blocks called the Pen Extension. These blocks allow a sprite to draw on the Stage as it moves — just like holding a pen to paper!
The Pen Extension is not available by default. You need to add it by clicking the Extension button at the bottom left of the Code tab.

Key Pen Blocks
Pen Extension Blocks
Drawing Shapes
By combining Pen blocks with Motion blocks, you can draw shapes on the Stage. The key idea is that a sprite moves in straight lines and turns at angles to form the sides and corners of a shape.
To draw a closed shape, the total turning angle of the sprite must add up to 360°.
Shapes and Their Properties
Activity: Drawing a Square
Let's draw a square using the Pen Extension. A square has 4 equal sides and 4 corners, each turning 90°.
- Open PictoBlox and create a New File.
- Add the Pen Extension from the Extensions menu.
- Place the sprite at the center of the Stage using the 'Go to x: 0 y: 0' block.
- Add the 'Erase All' block to clear any previous drawings.
- Add the 'Pen Down' block to start drawing.
- Use a 'Repeat 4' loop containing 'Move 100 steps' and 'Turn 90 degrees' to draw the square.
- Add the 'Pen Up' block at the end to stop drawing.
- Click the green flag to run the script and see your square!


Try changing the number of sides and the turning angle to draw different shapes like a triangle or hexagon!

.webp&w=3840&q=75)
.webp&w=3840&q=75)
.webp&w=3840&q=75)
.webp&w=3840&q=75)
.webp&w=3840&q=75)