Vector Graphics (SQA National 5 Computing Science): Revision Note
Exam code: X816 75
Vector graphics
What is a vector?
A vector image is created from mathematical equations and points
Only the instructions used to draw the image are stored
For example, a circle is defined by:
centre point [x, y]
radius
Typical examples of vector graphics include logos and clipart
Vector images are infinitely scalable
They can be resized without losing quality because the computer simply recalculates the mathematics
This makes them ideal when the same image must appear at many sizes, such as a logo printed on a pencil and also blown up for a billboard

Vector graphic attributes
These attributes apply across all vector shapes
Co-ordinates define exact positions on the canvas
Fill colour controls the internal colour of shapes
Line colour controls the outline colour for shapes and lines

The X value determines how far to the right the object should be placed
The Y value determines how far from the top the object should be placed
Common vector objects
Vector graphics use shapes that are described with co-ordinates and attributes
Rectangle
A rectangle is defined using a starting position and its size
Example attributes
Attribute | Example value | Meaning |
|---|---|---|
x-co-ordinate | 40 | Starting horizontal position |
y-co-ordinate | 120 | Starting vertical position |
width | 200 | Width of the rectangle |
height | 80 | Height of the rectangle |
fill colour | blue | Internal colour |
line colour | black | Outline colour |
Ellipse
An ellipse is drawn using a centre point and two radii
Example attributes
Attribute | Example value | Meaning |
|---|---|---|
centre x | 150 | Centre horizontal position |
centre y | 90 | Centre vertical position |
horizontal radius | 50 | Width from centre |
vertical radius | 25 | Height from centre |
fill colour | yellow | Internal colour |
line colour | red | Outline colour |
Line
A line uses two co-ordinates
Example attributes
Attribute | Example value | Meaning |
|---|---|---|
start x | 20 | Starting horizontal position |
start y | 30 | Starting vertical position |
end x | 200 | Ending horizontal position |
end y | 200 | Ending vertical position |
line colour | green | Colour of the line |
Lines do not have fill colour
Polygon
A polygon is any shape with three or more sides
It is drawn by joining multiple points in order
Example attributes
Attribute | Example value | Meaning |
|---|---|---|
co-ordinates | [20,30], [80,30], [60,70], [20,50] | The corner points of the shape |
fill colour | purple | Internal colour |
line colour | black | Outline colour |
Worked Example
A simple logo for a new "Secure Network" company is designed using vector graphics. The logo consists of a keyhole shape defined by a Polygon, which has been set with a grey fill.
(i) State two attributes of the keyhole object that a graphic designer can alter
[2]
(ii) The circular head of the key is defined by an Ellipse object. State one other object that is defined by the vector graphics method, other than the Polygon and the Ellipse
[1]
Answers
(i)
Line colour (or line thickness, if the outline is visible) [1 mark]
Co-ordinates (used to define the vertices/points of the polygon) [1 mark]
Fill colour (although specified as grey in the context, this is an attribute that can be altered) [1 mark]
Number of sides/vertices (for a polygon) [1 mark]
(ii)
Line [1 mark]
Rectangle [1 mark]
Text [1 mark]
Unlock more, it's free!
Did this page help you?