Computer Graphics

 Computer Graphics

Published by: Nuru

Published date: 21 Jun 2021

 Computer Graphics Photo

 Computer Graphics

Graphics is the art of drawing pictures, lines, charts, etc. using computers with the help of programming. Computer graphics are made up of a number of pixels.

Pixels

A pixel is a single point in the screen. If all pictures are built by the concept of pixel then wondering how each picture differ that is how some picture appear brighter while some others have a shady effect. All this is by the concept or technical terminology called resolution.

Resolution

Resolution is the number of rows that appear from top to bottom of a screen and in turn the number of pixels or pixel elements that appear from left to right on each scan line. Based on this resolution only the effect of the picture appears on the screen. In other words, the greater the resolution greater will be the clarity of the picture. This is because the greater the number of dots greater will be the sharpness of the picture. That is resolution value is directly proportional to the clarity of the picture.

Graphic modes

There are generally two modes available namely text and graphics. In a graphics mode we have generally the following adapters namely CGA called Color Graphics Adapter, EGA, and VGA. Each adapter differs in the way of generating colors and also in the number of colors produced by each adapter. Pixel being a picture element when we consider the graphics mode each pixel has a color associated with it. But the way these colors are used depends on adapters because each adapter differs in the way they handle colors and also in the number of colors supported.

Having known about adapters now let us start knowing how to start switching to graphics mode from text mode. In other words how to start using pixel and resolution concepts.

This is done by a function called intigraph( ). This intigraph( ) takes in it 2 main arguments as input namely gd and gm.

In this gd has the number of modes which has the best resolution. This is very vital for graphics since the best resolution only gives a sharper picture as we have seen before. This value is obtained by using the function called as getgraphmode ( ) in C graphics.

The other argument gm gives insight about the monitor used, the corresponding resolution of that, the colors that are available since this varies based
on adapters supported. This value is obtained by using the function named getmodename ( ) in C graphics.