Information representation

Information representation

Vector graphics

Multimedia AS Level 17 min read

On this page
  1. What you need to be able to do
  2. How a vector graphic is encoded
  3. Bitmap or vector: the differences
  4. Justifying bitmap or vector for a task
  5. Mark-scheme focus
  6. Worked examples
  7. Summary
  8. Can I do this?
  9. Quiz

What you need to be able to do

Syllabus 1.2 Multimedia: graphics
  • 1.2Explain how a vector graphic is encoded, using the terms drawing object, property and drawing list.
  • 1.2Describe the differences between bitmap images and vector graphics, with the reason behind each.
  • 1.2Justify using a bitmap or a vector graphic for a given task.

You need: Bitmap images and file sizes. Next: Sound.

How a vector graphic is encoded

A vector graphic does not store pixels at all. It stores instructions to draw shapes: a list of objects such as lines, rectangles, circles, curves and text, each described by numbers. When the picture is shown, the computer calculates where the shapes go at the size needed, and only then turns them into pixels on the screen.

CS
This logo is drawn from the four rows of its drawing list below - nothing else is stored.
  1. The picture is made of drawing objects (here: a rectangle, a circle, a line, some text).
  2. Each object has properties: its position and size, and how it looks (line colour, line thickness, fill colour).
  3. The drawing list holds every object with its properties: the commands needed to draw the whole image.
Drawing objectProperties: geometryProperties: appearance
Rectanglex 20, y 40, width 170, height 80line: ink, 3 px; fill: none
Circlecentre (105, 80), radius 32line: none; fill: blue
Linestart (20, 140), end (190, 140)line: green, 4 px
Texttext “CS”, position (105, 88)font: bold, 22 pt; colour: card

The three terms, in mark-scheme words

TermCredited descriptionExample
Drawing objecta component (shape) in the graphic, created using a formula / mathematical definitiona circle; a rectangle; the letter R
Propertyan attribute of a drawing object // defines one aspect of the appearance of a drawing object // data about a shapethe circle's radius; the fill colour; the line thickness
Drawing listall the drawing objects in the image // a list that stores the commands / descriptions / equations required to draw each objectthe four rows above
Drawing list ≠ shape library. “All the shapes that can be used” describes the shapes a program offers; the drawing list is the objects that make up this image (June 2023 report). And a property belongs to an object: “a property is an aspect of the appearance of a drawing object” (November 2021).

Bitmap or vector: the differences

Bitmap circle, 12 × 12 pixels, enlarged: the pixels just get bigger, so the edge is a staircase.
Vector circle, enlarged: the shape is recalculated at the new size, so the edge stays smooth.
Bitmap imageVector graphic
Storesthe colour of every pixelinstructions / equations to draw each object
Enlargingthe pixels get bigger, so it pixelates (blocky)recalculated at the new size, so it does not pixelate / no loss of quality
File sizeusually larger: data for every pixelusually smaller: only the instructions for each shape
Editingchange pixels one by oneeach object can be edited on its own (move, resize, recolour one shape)
Compressioncompresses well (lots of repeated / similar pixels)compresses little: there is little redundant data
Good forphotographs, scanned images, anything with detail and gradual shadinglogos, diagrams, icons, fonts, plans, images that need resizing
The command word is usually “describe” (2 marks per difference). The November 2021 report: “bitmap images pixelate when enlarged, vector graphic images do not” is not enough - say why: a bitmap's pixels get bigger; a vector is recalculated.

Justifying bitmap or vector for a task

  1. Decide what the image is: a real-world scene (photo, scan) → bitmap; made of shapes / lines / text → vector.
  2. Ask whether it will be resized (a logo on a business card and on a billboard) → vector keeps its quality.
  3. Ask whether it will be edited object by object → vector.
  4. Give the reason in terms of how each one is stored (pixels vs drawing list).

1 A school logo

A school logo will be printed on letters, on a website and on a large banner. Bitmap or vector? Justify.

Askedchoice + reasonKnowsame logo, many sizesRouteresize → vector

  1. Vector
  2. It can be scaled to any size without pixelating because it is recalculated from the drawing list
  3. The file is small, and individual shapes can be edited (e.g. change one colour)

2 A holiday photograph

Photographs of holiday locations are shown on a website. Bitmap or vector? Justify.

Askedchoice + reasonKnowa real scene with fine detailRoutephoto → bitmap

  1. Bitmap
  2. A photograph has continuous detail and shading that can't be described by a few shapes
  3. Each pixel can store its own colour, so the scene is captured exactly as the camera saw it

3 A house plan

An architect draws a floor plan that will be zoomed into on screen. Bitmap or vector? Justify.

Askedchoice + reasonKnowlines, rooms, labels; zoomingRouteshapes + zoom → vector

  1. Vector
  2. The plan is made of lines and shapes; zooming in recalculates them, so lines stay sharp
  3. Each wall / door is a separate object that can be moved or edited

4 A scanned handwritten letter

A handwritten letter is scanned into a computer. What will it be stored as, and why?

Askedtype + reasonKnowa scanner samples the pageRoutescan → bitmap

  1. Bitmap
  2. A scanner records the colour of each tiny area of the page as a pixel; it does not know which shapes are on it

Even a drawing becomes a bitmap when scanned; turning it into a vector needs extra software that traces the shapes.

Mark-scheme focus

Define property and drawing list (2 marks)

9618/12/O/N/24 Q7Paper 1 · Theory fundamentalsPart (b)2 marksFull size
(b) The student draws a picture on paper that is scanned into the computer and saved as a vector graphic. Define the vector graphic terms property and drawing list. [2]
Credited
  • Property: an attribute of a drawing object // data about a shape // defines one aspect of the appearance of a drawing object B1
  • Drawing list: all the drawing objects / shapes in an image // stores the commands / descriptions / mathematical equations required to draw each object B1
Not credited
  • Property: “what the image looks like” (not linked to an object)
  • Drawing list: “a list of drawings” / “the shapes you can use”
Why

Each definition must be anchored: a property belongs to an object; the drawing list covers every object in this image.

From: 9618/12/O/N/24 Q7(b)

“State two benefits of creating a vector graphic instead of a bitmap image” (2 marks)

9618/12/O/N/22 Q8Paper 1 · Theory fundamentalsPart (b)2 marksFull size
A bitmap image (4096 × 4096 pixels, 24-bit colour) is shown with a rectangle and arrows. (b) State two benefits of creating a vector graphic instead of a bitmap image. [2]
Credited
  • Can be enlarged without pixelation / loss of quality B1
  • Individual components of the image can be edited B1
  • Generally a smaller file size B1 (max 2)
Not credited
  • “Better quality” (no reason)
  • “Takes less space” without saying file size
  • Two benefits that are the same idea
Why

The report: almost all candidates knew the enlarging and file-size differences; make each benefit a different idea.

From: 9618/12/O/N/22 Q8(b)

  • Vector terms: define or match drawing object / property / drawing list (2-4 marks), sometimes with an example from a given picture.
  • Differences / benefits: 2-4 marks; each difference compares both types and gives the reason.
  • Lost marks: confusing drawing list with drawing object; generic examples when the question shows a picture (use the picture's own shapes).

Worked examples

Example 1 · Matching vector terms (Paper 1, 2 marks) ★ Easy
9618/11/O/N/23 Q1Paper 1 · Theory fundamentalsPart (a)2 marksFull size
(a) Draw one line from each vector graphic term (drawing list, drawing object, property) to its most appropriate description: a component created using a formula; defines one characteristic of a component; data required to create all components in the graphic. [2]
1 Read it with me what is actually happening?

Three terms, three descriptions. Look for the key word in each description: all components, one component, one characteristic.

  • component= a drawing object
  • characteristic= a property
  • all components= the whole drawing list
2 What is it asking for? the target, part by part
  • (a)three lines2 marks: all 3 = 2, 1 correct = 1
3 What do we know? everything the question gives us
  • drawing list, drawing object, property
4 Plan the route work backwards from what we want
FindKey ideaAlready have itWork out firstTrap
  • Match
    • Scopeall → list; one → object; one feature → property
Which description talks about the whole graphic?

“Data required to create all components” - the drawing list.

5 Now solve it have a go on paper first, then open the worked solution
  1. drawing list → data required to create all components in the graphic
  2. drawing object → a component created using a formula
  3. property → defines one characteristic of a component B2
6 Check it does the answer make sense?

Each description is used once and each scope (whole / object / feature) has one term ✓.

Example 2 · Terms with examples from a logo, then two differences (Paper 1, 8 marks) ★★ Medium
9618/12/O/N/21 Q5Paper 1 · Theory fundamentalsParts (a) and (b)(i)8 marksFull size
Riya has created a logo as a vector graphic: a rectangle outline behind a black triangle containing a white letter R. (a) Complete the table by writing a description of each vector graphic term and give an example for this logo: Property, Drawing list. [4] (b) Riya takes a photograph stored as a bitmap image. (i) Describe two differences between a vector graphic and a bitmap image. [4]
1 Read it with me what is actually happening?

(a): describe each term AND give an example taken from this logo (a rectangle, a triangle, the letter R, black fill …). (b)(i): “describe” two differences = 4 marks, so each difference needs both sides and the reason.

  • example for this logouse the logo's own shapes / colours, not generic ones
  • describe two differences2 marks each: what each stores / does, and why
2 What is it asking for? the target, part by part
  • (a)description + example × 24
  • (b)(i)two described differences4
3 What do we know? everything the question gives us
  • logo: rectangle, triangle, letter R
  • photo: bitmap
4 Plan the route work backwards from what we want
FindKey ideaAlready have itWork out firstTrap
  • (a)
    • Propertye.g. black fill of the triangle
    • Drawing liste.g. triangle, rectangle, letter R
  • (b)(i)
    • Difference 1pixels vs instructions
    • Difference 2enlarging: pixelates vs recalculated
    • Trapone-sided statements
Why does a bitmap pixelate?

Its pixels get bigger when enlarged.

Why doesn't a vector?

It is recalculated from the drawing list at the new size.

5 Now solve it have a go on paper first, then open the worked solution
  1. (a) Property: defines one aspect of the appearance of a drawing object / data about the shapes B1; example: black fill // white letter // solid black line // font of the letter B1
  2. Drawing list: the list of shapes in the image / stores the command to draw each object B1; example: triangle, rectangle, capital letter R B1
  3. (b)(i) Bitmap is made of pixels / colours stored for individual pixels B1; vector stores a set of instructions about how to draw the shapes B1
  4. When a bitmap is enlarged the pixels get bigger and it pixelates B1; a vector is recalculated and does not pixelate B1
6 Check it does the answer make sense?

Each difference states both types and the reason. Other accepted pairs: bitmap files usually bigger (data for every pixel) vs vector smaller (just instructions); bitmaps compress well vs vectors have little redundant data.

Example 3 · What is in a drawing list? (Paper 1, 2 marks) ★ Easy
9618/12/M/J/24 Q2Paper 1 · Theory fundamentalsPart (d)(ii)2 marksFull size
(d) The computer can transmit a video made from bitmap images and vector graphic animations to the VR headset. (ii) Describe the contents of a vector graphic drawing list. [2]
1 Read it with me what is actually happening?

“Describe the contents”: what is stored in the list, not what a vector graphic is in general.

  • contentswhat the list holds
2 What is it asking for? the target, part by part
  • (d)(ii)two points about the contents2
3 What do we know? everything the question gives us
    4 Plan the route work backwards from what we want
    FindKey ideaAlready have itWork out firstTrap
    • Contents
      • Objectsevery object in the drawing
      • How to drawcommands / equations
      • Propertiesfill, line colour …
    Is “a list of pixels” right?

    No: a vector graphic stores no pixels.

    5 Now solve it have a go on paper first, then open the worked solution
    1. A list of the objects in the drawing B1
    2. The command / description / equation required to draw each object // the properties of each object, e.g. fill colour, line weight B1
    6 Check it does the answer make sense?

    Our logo's table above is exactly such a list: objects + their properties ✓.

    Summary

    • Vector graphic = a drawing list of drawing objects, each defined by a formula and its properties.
    • Bitmap = the colour of every pixel. Enlarged: bitmap pixelates; vector is recalculated and stays sharp.
    • Vectors: usually smaller, editable per object, ideal for logos/diagrams/fonts. Bitmaps: photos and scans.
    • Justify a choice from what the image is made of and whether it will be resized or edited.
    If you see…do this
    “define property”an attribute / aspect of the appearance of a drawing object
    “define drawing list”all the drawing objects in the image + the commands to draw each
    “example from the logo / image”name a shape or colour you can actually see in it
    “describe differences”both sides + the reason (pixels vs instructions, enlarge, size)
    “which type for …”photo/scan → bitmap; shapes/resizing/editing → vector, with the reason

    Can I do this?

    Anything unticked: revise that section first. All ticked: take the quiz.

    Quiz

    The multiple-choice and guided questions need JavaScript. The concept checks and exam practice below work without it.

    Concept checks

    Answer each one in your head first, then open it.

    1Why can't a vector graphic be displayed without being turned into pixels?Show answer

    A screen is a grid of pixels. The computer calculates which pixels each object covers at the current size - but that happens only when it is shown, so the stored file never pixelates.

    2Why do fonts use vectors?Show answer

    Text must look sharp at every size, from footnotes to headlines; each letter is stored as curves and recalculated for each size.

    3Could a vector graphic ever be bigger than a bitmap of the same picture?Show answer

    Yes: an image with thousands of tiny objects (e.g. a traced photograph) can need more data than a small bitmap.

    Exam-style practice

    New questions, not used above. Do them on paper, then mark your work against the official mark scheme.

    Q1Past-paper style3 marks

    A designer creates a poster.

    1. (a)
      The poster includes a star shape drawn as a vector graphic. Give two properties that could be stored for the star.
      [2]
    2. (b)
      State what is meant by a drawing object.
      [1]
    Show the mark scheme
    PartAnswer / workingMarksGuidance
    (a)Any two, e.g. fill colour; line / outline colour; line thickness; position / coordinates of its points; sizeB2properties of the star, not of the poster
    (b)A component / shape in a vector graphic, defined by a formula (and its properties)B1
    Total: 3 marks
    Q2Past-paper style4 marks

    A museum stores (i) scanned images of old paintings and (ii) maps of its floors that visitors zoom into on a touchscreen.

    Justify whether each should be stored as a bitmap image or a vector graphic.

    1. [4]
    Show the mark scheme
    PartAnswer / workingMarksGuidance
    (i)BitmapB1no mark without a justification in some schemes - give both
    A scan records the colour of every tiny area as pixels // paintings have fine detail and shadingB1
    (ii)VectorB1
    Zooming recalculates the shapes so lines / text stay sharp, no pixelation // rooms can be edited as separate objectsB1
    Total: 4 marks

    Your progress on this note is saved when JavaScript is on.