ArticleslgStudy

computer science

Rasterisation

Rasterisation is a computer science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Rasterisation rather than just read about it. In short: In computer graphics, rasterisation (British English) or rasterization (American English) is the task of taking an image described in a vector graphics format (shapes) and converting it into a raster image which represents the original image. The rasterized image may then be displayed on a computer display, video display, or printer, or stored in a bitmap file format.

Rasterisation — main illustration
Rasterisation — illustration

Key takeaways

  • Rasterisation belongs to computer science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Rasterisation to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Rasterisation from memory before moving on to harder problems.

Reference excerpt

In computer graphics, rasterisation (British English) or rasterization (American English) is the task of taking an image described in a vector graphics format (shapes) and converting it into a raster image which represents the original image. The rasterized image may then be displayed on a computer display, video display, or printer, or stored in a bitmap file format. Rasterization may refer to the technique of drawing 3D models, or to the conversion of 2D rendering primitives, such as polygons and line segments, into a rasterized format.

Etymology The term "rasterisation" comes from German Raster 'grid, pattern, schema' and Latin rāstrum 'scraper, rake'.

2D images

Line primitives

Bresenham's line algorithm is an example of an algorithm used to rasterize lines.

Circle primitives Algorithms such as the midpoint circle algorithm are used to render circles onto a pixelated canvas.

Triangle rasterization

Polygons are a common representation of digital 3D models. Before rasterization, individual polygons are triangulated - therefore, a typical problem to solve in 3D rasterization is rasterization of a triangle. Properties that are usually required from triangle rasterization algorithms are that rasterizing two adjacent triangles (i.e. those that share an edge) are:

it leaves no 'holes' (non-rasterized pixels) between the triangles, so that the rasterized area is completely filled (just as the surface of adjacent triangles) no pixel is rasterized more than once, i.e. the rasterized triangles don't overlap. This is to guarantee that the result doesn't depend on the order in which the triangles are rasterized. Overdrawing pixels can also mean wasting computing power on pixels that would be overwritten. This leads to establishing rasterization rules to guarantee the above conditions. One set of such rules is called a top-left rule, which states that a pixel is rasterized if and only if

its center lies completely inside the triangle, or its center lies exactly on the triangle edge (or multiple edges in case of corners) – that is (or, in case of corners, all are), either the top or left edge. A top edge is an edge that is exactly horizontal and lies above other edges, and a left edge is a non-horizontal edge that is on the left side of the triangle. This rule decides which triangle a pixel on a boundary belongs to. It is implemented by Direct3D and OpenGL (although the specification here only requires a consistent rule).

3D images Rasterization is one of the typical techniques of rendering 3D models. Compared with other rendering techniques such as ray tracing, rasterization is extremely fast and therefore used in most realtime 3D engines. However, rasterization is simply the process of computing the mapping from scene geometry to pixels and does not prescribe a particular way to compute the color of those pixels. The specific color of each pixel is assigned by a pixel shader (which in modern GPUs is completely programmable). Shading may take into account physical effects such as light position, their approximations or purely artistic intent. The process of rasterizing 3D models onto a 2D plane for display on a computer screen ("screen space") is often carried out by fixed function (non-programmable) hardware within the graphics pipeline. This is because there is no motivation for modifying the techniques for rasterization used at render time and a special-purpose system allows for high efficiency.

Quality

The quality of rasterization can be improved by antialiasing, which creates "smooth" edges. Sub-pixel precision is a method which takes into account positions on a finer scale than the pixel grid and can produce different results even if the endpoints of a primitive fall into same pixel coordinates, producing smoother movement animations. Simple or older hardware, such as PlayStation 1, lacked sub-pixel precision in 3D rasterization.

See also Font rasterization Sub-pixel resolution Image tracing Hidden-surface determination Bresenham's line algorithm for a typical method in rasterization Scanline rendering for line-by-line rasterization Rendering (computer graphics) for more general information Graphics pipeline for rasterization in commodity graphics hardware Raster image processor for 2D rasterization in printing systems Raster to vector for conversion in the opposite direction Triangulated irregular network, a vector source for topography data, often rasterized as a (raster) digital elevation model. Display list Spatial anti-aliasing

References

External links Michael Abrash’s articles on computer graphics Microsoft’s DirectX API OpenGL API Matrices (including transformation matrices) from MathWorld Rasterization, a Practical Implementation

Illustrations

Rasterisation: Raster graphic image
Raster graphic image
Rasterisation: Rasterizing triangles using the top-left rule
Rasterizing triangles using the top-left rule
Rasterisation: Pixel precision (left) vs sub-pixel precision (middle) vs anti-aliasing (right)
Pixel precision (left) vs sub-pixel precision (middle) vs anti-aliasing (right)

Worked examples

Example 1 — a first encounter with Rasterisation

Start with the simplest possible case. Write down what Rasterisation claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In computer science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Rasterisation before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Rasterisation ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Rasterisation

In research
Rasterisation appears in computer science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Rasterisation in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Rasterisation is common in secondary-school and first-year university syllabi. It links to neighbouring topics 3D computer graphics, Computer graphics, Shading, so understanding it makes those chapters shorter.
In everyday life
Look for Rasterisation outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.

Affiliate

Preply — study more efficiently by working with a personal tutor. 50% off.

How to study Rasterisation in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Rasterisation means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Rasterisation out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Rasterisation in simple terms?

In computer graphics, rasterisation (British English) or rasterization (American English) is the task of taking an image described in a vector graphics format (shapes) and converting it into a raster image which represents the original image. The rasterized image may then be displayed on a computer…

Why does Rasterisation matter?

Because it connects several computer science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Rasterisation?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Rasterisation.

Tags

  • 3D computer graphics
  • Computer graphics
  • Shading
  • Television terminology
  • Video
  • Video signal

Keep exploring