Tutorials index

Blockly Picture Tasks

The Blockly picture tasks provide an alternative way of programming and drawing images to the turtle tasks. This method of drawing shapes and graphics on a canvas is more like the way graphics are created in traditional text-based programming languages.

In this module images are created by placing shapes and lines on the canvas using x,y coordinates that start from (0,0) in the top left hand corner of the canvas. This module requires you to think about precedence and also naming of objects: Shapes at the top of your block stack are implemented first. Those afterwards are placed on top of what is already on the canvas.

Watch out:
If you just duplicate a block and do not change its name, then the shape gets evaluated once and then re-evaluated a second time removing the first instance. Don't forget to name your shapes individually!

Naming shapes gives you the opportunity to use code that then refers to individual shapes by name.

Activity:
Open the shape category below and look at what blocks are available:

Try this out in a new window ...

This module usually presents you with an image to try and produce (shown as a shadow).

Task:

Try and produce the the image provided so that you can get used to the Picture module blocks:

Try this out in a new window ...


The Picture tasks are relatively simple once you get used to two things:

The Shape blocks are taken to a new level when used in the Movie module. That might be where to go next.

Blockly Movie Task Tutorial >>

Tutorials index



Did you know the UK Bebras Challenge is run by the Raspberry Pi Foundation? Discover free teaching resources, tools, and expert support for computing education at raspberrypi.org.