A-level Computing/AQA/Paper 2/Fundamentals of data representation/Vectors





Vector graphics are made up of objects and their properties. An object is a mathematical or geometrically defined construct such as a rectangle, line or circle. Each of these objects has properties to tell you the size, colour, position etc. Take a look at the next example to see how drawing lists are built from objects and properties.

There are several vector graphic formats out there, but an easy one to get started with is Scalable Vector Graphics (SVGs). SVGs are very easy to create and are supported by all modern major web browsers. To create an SVG, you need to add the tags  at the beginning and   at the end. Copy the following into a text file and save it as Once you have saved this, drag it into a browser window and you should see some shapes. SVGs are very powerful and you can attach code to their structure, making them interactive. If you want to learn more about how make SVGs take a look at w3schools

a set of commands used to define a vector image


 * Line
 * Text
 * Rectangle
 * Circle


 * x,y
 * width, height
 * fill
 * stroke (colour), stroke-width


 * x1,y1 - start coordinates
 * x2,y2 - end coordinates
 * width
 * fill
 * stroke (colour)

images defined using mathematics and geometry such as points, lines, curves, and shapes or polygon(s). Allowing for scalability

What would the following drawing list produce:



rect and line


 * Fill
 * Stroke
 * Stroke-width
 * Width
 * Height
 * X,Y