AQA A-Level Computer Science 7517
Fundamentals of Programming
Fundamentals of Data Structures
Fundamentals of Algorithms
Theory of Computation
Fundamentals of Data Representation
Fundamentals of Computer Systems
Fundamentals of Computer Organisation and Architecture
Fundamentals of Communication and Networking
Consequences of Uses of Computing
Systematic Approach to Problem Solving
Fundamentals of Databases
Big Data
Fundamentals of Data Representation
Vector graphics
- 2 things to know
- Paper 2
Overview
Recall questions on drawing primitives and their properties, describing a picture in vector terms, and why a vector image enlarges without loss of quality.
What you need to know
Answer each one before you reveal it.
State the advantages of bitmapped graphics over vector graphics.
Questions from this subtopic
Each one with the model answer underneath.
- 1
Explain how vector graphics represent an image.
Model answer
A vector graphic is stored as a list of the objects that make up the image. Each object is a geometric shape, and what is stored for it is not pixels but its properties — the values that define its geometry and appearance. To display the image, the software reads the list and draws each object in turn at the size required.
- 2
Name the drawing primitives typically available in a vector graphic.
Model answer
Point, straight line, rectangle, square, circle, ellipse, arc, polygon, curve and text. More complicated pictures are built by combining these primitives, and objects can be grouped and layered.
- 3
Give examples of typical properties stored for objects in a vector graphic.
Model answer
Geometric properties fixing where and how big the object is — the coordinates of a line's start and end points, the centre coordinates and radius of a circle, the coordinates, width and height of a rectangle, or the list of vertices of a polygon. Appearance properties — line colour, line thickness, line style such as dashed, and fill colour or fill style. Ordering properties such as the layer or z-order, which decides what is drawn on top of what.
- 4
List the properties that would be stored for a circle in a vector graphic.
Model answer
The x and y coordinates of the centre, the radius, the line colour, the line thickness, and the fill colour — plus its position in the drawing order. Those few values completely define the circle at any size.
- 5
Use vector graphic primitives to describe a simple picture of a house.
Model answer
Object 1, rectangle: x = 10, y = 40, width = 60, height = 40, line colour black, line thickness 2, fill colour white — the walls. Object 2, polygon: vertices (10, 40), (70, 40), (40, 10), line colour black, thickness 2, fill colour red — the roof. Object 3, rectangle: x = 35, y = 60, width = 10, height = 20, line colour black, thickness 1, fill colour brown — the door. Object 4, circle: centre (25, 50), radius 5, line colour black, thickness 1, fill colour blue — the window. The file is that list of four objects and their property values.
- 6
Explain why a vector graphic can be enlarged without any loss of quality.
Model answer
Nothing about the picture is tied to a pixel grid. The file holds the geometry of each object, so to display the image at a different size the software recalculates the coordinates and redraws every shape at the new scale. Lines and curves are therefore redrawn smoothly at whatever resolution the display or printer offers, instead of existing pixels being stretched.
Other ways to work this
The same content, four other ways.
What is inside Levo
Six ways to work the same material.
Every question in Fundamentals of Data Representation, on a schedule.
Attempt a question from memory, write the correct version, then attempt it again. Levo records the jump between your first attempt and your last, and brings each question back on the day you are due to forget it.
Or £46 a year, about £3.83 a month. Cancel anytime.