Vector Drawing Puzzles

Follow the instructions to create pictures from shapes and learn about vector graphics. 

There are two main ways of representing images: bitmap images and vector images. In bitmap images you store the colour of very individual pixel or square in the image. (See our pixel puzzles for more on bitmap images). In vector images you store instructions of the lines or shapes to draw and order to draw them in. It is a way of representing an image as an algorithm that draws it. These puzzles involve following a simplified form of vector drawing instructions to create a picture.

Draw the pictures on the square grid provided – or cut out and glue on shapes. You could also draw the pictures in a drawing package. Turn a class full of images in to bunting by stringing them together.

Learn about:vectorchristmastree

  • algorithms
  • representation of images
  • vector graphics
  • data representation
  • computational thinking
  • coordinate systems
  • mathematical scaling

Also for younger children:

  • numeracy
  • counting
  • colour

Teach as part of:

  • computing
  • IT
  • maths
  • art

Instructions: Vector Drawing Puzzles

For example the following vector drawing instructions draw the picture of a christmas tree above. If drawing it may be easier to lightly draw the bounding box for each shape first, then the shape outline, then colour it in. Use strong colours so the colours overwrite those underneath. Notice that the order the instructions are followed matters. If you were to draw the circles first then they would be covered by the later triangles.

ChristmasTree

  1. Rectangle Brown SIZE (4,4) AT (4,0)
  2. Triangle Green SIZE (12, 4) AT (0,4)
  3. Triangle Green SIZE (12, 4) AT (0, 6)
  4. Triangle Green SIZE (12, 4) AT (0, 8)
  5. Triangle Green SIZE (10, 4) AT (1,10)
  6. Triangle Green SIZE (8, 4) AT (2, 12)
  7. Triangle Green SIZE (6, 4) AT (3, 14)
  8. Star Yellow SIZE (3,3) AT (4.5, 17)
  9. Circle Red SIZE (1,1) AT (0,5)
  10. Circle Red SIZE (1,1) AT (3,9)
  11. Circle Red SIZE (1,1) AT (4,6)
  12. Circle Red SIZE (1,1) AT (6,10)
  13. Circle Red SIZE (1,1) AT (11,5)
  14. Circle Red SIZE (1,1) AT (7,12)
  15. Circle Red SIZE (1,1) AT (4,14)
  16. Circle Blue SIZE (1,1) AT (3,4)
  17. Circle Blue SIZE (1,1) AT (6,5)
  18. Circle Blue SIZE (1,1) AT (0,7)
  19. Circle Blue SIZE (1,1) AT (7,8)
  20. Circle Blue SIZE (1,1) AT (10,7)
  21. Circle Blue SIZE (1,1) AT (9,10)
  22. Circle Blue SIZE (1,1) AT (4,11)
  23. Circle Blue SIZE (1,1) AT (7,15)
  24. Circle Blue SIZE (1,1) AT (5,16)

The bounding box of a shape is the smallest rectangle the shape fits in. The size given for each shape is the size of its bounding box. The position is the bottom, left corner of its bounding box. Triangles in this puzzle are isosceles triangles with the base at the bottom. Sizes are given as (width, height). Positions are given as (x,y).

Once you have instructions like those above you can package them as a new instruction called ChristmasTree to be used in more complex pictures. This form of abstraction is a powerful feature of vector images. It allows pictures to be drawn using decomposition, breaking the picture down hierarchically into components. For example, for the christmas tree we could have first created instructions for an undecorated christmas tree, allowing it to be used for different trees with different decorations.

Scaling

These puzzles demonstrate a practical use of mathematical scaling. One of the advantages of the vector image representation is that you can create larger or smaller versions that do not lose accuracy. Having drawn a picture, draw it again twice as large, by scaling the vector drawing instructions by a factor of 2. To scale a vector image (make a bigger or smaller version), multiply all numbers in the instructions with the scaling factor. For example to draw the image twice as big, first multiply all the numbers in the instructions by 2.

Resources: Vector Drawing Puzzles

Here are Vector Drawing Puzzle Picture sheets and solutions that you can download.

Christmas Pictures

There are more christmas computing ideas here.

Teaching London Computing is funded by the Mayor of London, with further support from the British Computer Society, the Department for Education. It is a joint project between Queen Mary University of London and King’s College London.