← Analysing an area of computer science

Computer graphics

Offered 3 of the last 4 years (2022, 2023, 2025) — statistically the safest insurance area if you are not certain which will appear.

The foundations to define precisely

  • A screen is a discrete grid of pixels, not a continuous plane — this single fact is the reason most graphics algorithms exist at all.
  • Homogeneous coordinates add an extra coordinate so translation, scaling AND rotation can all be expressed as matrix multiplication, letting several transformations combine into one matrix applied once.
  • The three basic transformations: translation (move), scaling (resize), rotation (turn) — each a distinct matrix.
Worked example Why Bresenham beats y = mx + b Explain, with reasoning, why Bresenham's algorithm is preferred over the y = mx + b formula for drawing a line on a screen. y = mx + b gives a FRACTIONAL y for most integer x values on a screen, since the line rarely passes exactly through pixel centres. Those fractional values must be rounded to the nearest pixel, and that rounding needs floating-point arithmetic recalculated at every single pixel. Floating-point rounding drifts and produces visibly uneven, gappy lines, especially on steep lines. Bresenham's algorithm instead uses only integer addition and subtraction, deciding at each step whether to move straight or diagonally by tracking accumulated error as a whole number. The result: faster (integer-only arithmetic), and with no rounding drift, producing a smooth, consistent line. ✓ Bresenham trades floating-point rounding for integer-only decisions, which is both faster on hardware and free of the drift that produces gappy lines. ✕

Naming the transformation is not the same as explaining its use

Stating "translation moves an object" describes the definition. The mark is in an EXAMPLE tied to a real graphics use — e.g. translating a sprite to animate movement, or combining rotation and scaling matrices to make a car icon on a map both turn and shrink with zoom level. A definition with no applied example under-answers the question. ✓

Combining transformations is why matrices are used at all

Multiplying the translation, scaling and rotation matrices together ONCE, then applying that single combined matrix to every vertex of an object, is far cheaper than applying three separate passes over the geometry. This composability is the actual reason matrices are the standard tool in graphics, not just a mathematical convenience.

Practise just this