Approximating a line with pixels.

This slide shows the principle of representing a line using pixels. In this and subsequent slides we represent the array of pixels on the surface of a display as a grid of square pixels. (Almost all modern raster displays have square pixels). If a pixel is lit up, we draw it in yellow. The open grid squares are pixels in the background color of the display.

Note that we always refer to a pixel by the coordinates of its center: by 'the pixel at (x,y)' we mean 'the pixel whose center lies on (x,y)'. On a raster display, every part of the image must be made of pixels. There is nothing else! Because the pixels are laid out in a fixed grid pattern, we can only approximate lines and curves on a raster display. The purpose of this set of slides is to describe an efficient method for choosing the best approximations. By 'best' we mean a choice of pixels which most closely matches the exact geometry we are trying to draw.

Back

Quit