Computer Graphics Fundamentals II
What makes up a computer-drawn image? Images are composed of basic objects called output primitives. Examples include: polylines, filled regions, and raster images.
Polylines
A polyline is a connected sequence of straight lines. Shown in Figure 1, a polyline may appear as a smooth curve but when blown up (zoomed in), its underlying short line segments can be revealed. Our eyes apparently blends them into a smooth curve.

The simplest polyline is a line segment. A line segment is specified by its two end points say, (x1,y1) and (x2,y2). Refer to Figure 2: each straight line in a polyline is called an edge. The intersections of these edges are called vertices. Polylines are specified as a list of vertices, each given by a coordinate pair.

A polyline doesn’t need to form a closed figure. However, if the first and last vertices are connected by an edge, the polyline is a polygon. In addition, if no two edges cross, the polygon is simple.
Filled Regions
A filled region (sometimes called filled area) is a shape filled with some color or pattern. It is usually bounded by a polygon. As we will learn in the future, filled regions can be used to shade different faces (sides) of a 3D object.
Raster Images
When an image is blown up, small squares can be revealed in different colors. These individual squares are called pixels (short for picture elements). Normally, our eyes can’t see the individual squares, especially when the resolution of the image is high.
A raster image is stored in a computer as a matrix of numerical values. The resolution of a raster image is defined by the number of rows and columns. For example, an image that has a resolution of 17x18 means that the image is stored as a matrix with 17 rows and 18 columns.
An important aspect of a raster image is the manner in which the various colors are represented. We briefly discuss grayscale raster images and color raster images.
In a grayscale raster image, the value of each pixel only has a single sample, that is, it carries only intensity information. It is also known as a black-and-white image. It is composed exclusively shades of gray, varying from black at the weakest intensity to white at the highest intensity.

As compared to a grayscale raster image, color raster images are more desirable because they match our daily lives more closely. For visually acceptable results, color images provide three samples for each pixel. The RGB (red green blue) color space is commonly used in computer displays.

I’m Ryan. This is one of many stories about the fundamentals in the field of computer graphics. I am relatively new in the field. As I continuously learn, I would like to share my knowledge. I hope this would also serve as an inspiration to other people. Please follow, recommend, or add your thoughts in a response. Thank you.
