Graphics in C Tutorial

Introduction

C language is a popular programming language by which we can develop the programs to represent the objects in the graphical format means using the C language, we can perform the graphics for better representation which makes the better visualization in front of the users. Here eitworld.com provides the easiest way to learn the C Graphics Programming Tutorial For Beginners in the easiest way at the one click.

Here we provide the better way to learn so that students can easily understand the concepts related to computer graphics programming. Eitworld.com provides the basic C Graphics Programming Tutorial With Examples learning in the simple way and form basic to advance level. Here computer graphics tutorial with C is provided for easy deal. In current era, we see something graphical effects on the console screen means rotation, scaling, transformation of the objects; we think how it is possible to make them so effectively. But by using C language with graphics, we can perform any mentioned operation in the easy and simple way by using the tutorial of eitworld.com because this site provides the simple and easy learning to perform the graphics programming.

In Computer graphics, using this Graphics In C Language Tutorial we can develop the graphics program for the several algorithms such as line algorithm, circle algorithm, ellipse algorithm, using the C graphics programming tutorial, we can deal with all the operation which is available on the Eitworld. Using the graphics programming with C, we can easily perform the rotation of several objects to manipulate the several operations such as when we need the some object with 45 degree rotation then we can do this easily by using the C graphics programming with tutorials available on the eitworld.com.

Here eitworld.com provides the better way to learn the C Tutorial with graphics programming in the easy and smart way, here all the concepts are well explained with examples so that students can feel the better experience with great happiness to learn with one click.

What is C Graphics ?

  • Computer graphics is a powerful and interesting feature of the any computer system. Use of graphics makes the computer applications beautiful and effective.
  • In this tutorial we are going to learn about the c graphics programming.
  • Graphics programming in C is very simple and interesting. It is mainly used to develop games, create projects and for putting the animation..
  • Before going further it is necessary to get familiar about some of the basic terms of graphics which are as follows:
    • Pixels
    • Resolution
    • Video Display Unit
    • Display Screens (Monitors)

Pixels

  • Pixel is a basic unit of any image in computer graphics. In other words one can say images are made up of small dots or squares which are termed as picture elements or pixels.
  • Pixels are generally used for the representation of any picture in computer's memory.

Resolution

  • Resolution is number of distinct pixels present in one dimension that can be displayed.
  • Screen resolution is the number of pixels present on the screen.
  • The display resolution is defined by the number of rows called scan lines from top to bottom (Y-axis) and number of pixels from left to right (X-axis).
  • For example if an image has a resolution of 640*480 on the screen it means that 640*480 screen is capable of displaying distinct dots on 480 scan lines and about 300,000 pixels.

Video Display Unit

Video Display Unit is used to provide the interface between computer and user. User can operate on the computer system without printer, disk driver but without VDU he would be operate blind means it is impossible to operate on the computer system without video display unit. Video display unit is a combination of two components:

  • Video screen
  • Video display adapter
  • Video screen
  • is the screen on which we actually see the images in either text or graphics.

  • Video display adapter
  • is a special printed circuit board that plugs into the one of the several expansion slots present on the mother board of a computer system.

How are the images either text or graphics, produced on the screen?

This Task is done by the display adapter because it is not possible for the microprocessor to send signal necessary to produce the image on the screen. So in this case display adapter acts as an agent between the video screen and the microprocessor.

Video display adapter done this work with the help of following components:
  • VDU memory on which microprocessor writes the information to be produced on the screen.
  • Display Adapter circuitry which transfers the information from video memory to screen.
  • In this way image is produced on the screen. There are various types of Display adapters which are supported by 8086 microprocessor family:
    • Monochrome display adapter (MA)
    • Hercules display adapter
    • Color Graphics adapter (CGA)
    • Enhanced Graphics Adapter (EGA)
    • Multicolor Graphics Adapter (MCGA)
    • Video Graphics Adapter (VGA)
    • Super Video Graphics Adapter (SVGA)
    • Extended Graphics Adapter (XGA)
    • Monochrome display adaptor (MA)
    • was the first display adapter. This is a simple adapter which can only operates on text mode. It has no capability to operates on the Graphics mode.
    • Hercules Display Adapter
    • is an advance version of the MA. It has all the features of the MA but in additionally it can also operate in Graphics mode.
    • Color Graphics Adapter (CGA)
    • was in demand for several years but for today's perspectives it has very limited qualities. This adapter can also operate on both text and graphics mode like Hercules Display Adapter. In text mode it operates in 25 rows by 80 columns mode with 16 colors. In Graphics mode two resolutions are available medium resolutions graphics mode (320*200) with forr colors available from a palette of 16 and two colors mode (640*200).
    • Multicolor Graphics Adapter (MCGA)
    • This display adapter is an advance version of the EGA. It also includes all the functionality and display modes of MA, CGA and EGA. It additionally includes two more graphics modes one is 640*480 pixel mode in 2 colors and second is 320*200 pixel mode in 256 color.
    • Video Graphics Array (VGA)
    • The VGA supports all the display modes of MA, CGA, EGA and MCGA. In addition it also supports the graphics mode of resolution 640*480 in 16 colors. SVGA and XGA are also includes all the functions and display modes of all already discussed display adapters. SVGA includes two more display modes of resolution 800*600 and 1024*768 and XGA also includes two new modes: 640*480 pixel mode with 65536 colors and 1024*768 pixel mode with 256 color. Any graphical image is also influenced by the Display screen or monitor. Many monitors cannot produce color or graphics, some produce poor quality of images and some are also there to produce good quality of images. Each display adapter supports certain type of monitors. There are various monitor used with the 8086 microprocessor based computer system which are mentioned below:
    • Monochrome monitors
    • Composite monochrome monitors
    • Composite color monitors
    • TV sets
    • RGB monitors
    • VGA monitors
    • VGA color monitors
    • Monochrome monitors
    • use to display high resolution text, but these monitors have not any ability to display graphics. These types of monitors can only work with the Monochrome Adapter (MA).
    • Composite monochrome monitors
    • work with the Color Graphics Adapter (CGA). These monitors provide a fairly good one color image. These types of monitors can display text or graphics but not able to generate colors.
    • Composite color monitors
    • produce not only text and graphics but also colors. The demerit of these types of monitors is that these have some serious limitations like a 80-column display is often unreadable and these have very short number of color combinations and images produce through these type of system are not good in quality and resolutions.
    • TV SETS
    • are almost same as the composite color monitor technically. These types of monitor produce very low quality of images. "Text displays must be in 40 column or 20 colors mode to ensure that text is readable".
    • RGB Monitors
    • are the best monitors among the all types of monitors. These monitors produce high quality of text as well as images of high quality and high resolution with a big number of color combinations. These monitors operate on three input signal to encode the primary colors Red, Green, Blue.
    • VGA Mono Monitors
    • are used to produces output on VGA or MCGA system. VGA Color Monitors are typically used in computers equipped with VGA card.