Computer graphics is a branch of computer science that studies technologies for processing graphic images using computer equipment.

The main object of computer graphics is a graphic image. It can be a drawing or photograph, a chart or graph, a diagram or technical drawing, an architectural sketch or an advertising poster, a frame from a cartoon or video, etc. Graphics are used to visualize data and improve its perception.

Depending on the way a graphic image is constructed, there are raster and vector graphic images. Accordingly, the sections of computer graphics that study technologies for processing such images are called raster and vector graphics.

A raster graphic image consists of individual small rectangles – pixels. They are arranged in rows and columns, forming a grid called a raster (Latin rastrum – rake). Such an image is similar to a mosaic made of objects of the same size (stones, glass, etc.).

When you view a raster image at a normal scale, the pixel sizes are so small that the image appears to be solid. However, when you zoom in on a graphic image or increase its size, the grain structure of the image becomes visible.

A pixel is the smallest object in a raster image and has the following properties: location, which indicates the pixel’s location in the raster, and color.

The values of the properties of each pixel are encoded in binary code and stored in the computer’s video memory, and when the image is stored on an external medium, in the corresponding file. Due to the large number of pixels in an image and the corresponding amount of data stored in the file, the size of raster image files is quite large.

Raster images can be created by scanning drawings or photographs, taking pictures of objects with a digital camera or digital video camera, or creating drawings using a graphics tablet or a special program.

A vector image is built from separate basic objects – graphic primitives: segments, curves, rectangles, ovals, triangles, etc. This image resembles an application.

Graphic primitives are characterized by their properties: the color and thickness of the outline, the color and method of filling the inner area, etc.

The complexity of a vector image is determined by the number of graphic primitives from which it is created. When you save such an image, the file contains a list of image objects and their property values. Therefore, the more objects there are, the larger the file size of the image. However, even for complex vector images, their file sizes are usually smaller than those of similar raster images.

The quality of an image in vector graphics does not depend on the scale of its viewing. This is due to the fact that although all images on the monitor screen and on the printer are reproduced in raster form, special formulas are used to display vector drawings on them, by which the vector representation of objects is converted into a raster image.

Vector graphic images are created with the help of special programs and are widely used in cartography, animation, engineering graphics, logos, diagrams, charts – wherever the clarity of contours and the ability to zoom in without losing quality are important.