Professional Documents
Culture Documents
CGR Notes Diploma
CGR Notes Diploma
Computer graphics displays information in the form of graphics objects as windows, graphs, diagrams
etc. Thus, computer graphics express data in pictorial form.
In computer graphics objects are represented as collection of pixels, where pixel is smallest
addressable point which can be displayed on screen. Pixel can be displayed on screen by setting its
intensity and color.
A broad classification of major subfields in computer graphics might be:
1. Geometry: Studies ways to represent and process surfaces.
2. Animation: Studies with ways to represent and manipulate motion.
3. Rendering: Studies algorithms to reproduce light transport.
4. Imaging: Studies image acquisition or image editing.
For example, if an has M rows and N columns, then its resolution can be defined as M X N.
Syntax – clrscr( );
4) gotoxy( ): It positions the cursor to the specified location on screen, where location is specified by x, y
co-ordinates of the point.
Syntax: deline( );
Syntax: inline( );
Example : gotoxy(8, 4);
inline( );
It inserts a line at 8th row.
9) textbackgroud( ): It changes background colour of text. The valid colour for CGA(Color Graphics
Adapter) are from 0 to 6. They are:
Constant Colour Name
0 BLACK
1 BLUE
2 GREEN
3 CYAN
4 RED
5 MAGENTA
6 BROWN
Syntax: textbackground(color);
Example : int col = 4
textbackground(col);
It sets text’s background colour to red
10) moveto( ): It moves cursor to the location specified by int(x, y) co- ordinates.
OR
Outtextxy(x, y, “sentence”)
Where, x, y gives co-ordinates of a point where from to display text.
It displays text within quotation mark at specified position and with latest setcolour style.
6. Bitmap and vector based Graphics
Computer graphics can be classified into two categories namely, Raster or Bitmap graphics and vector
graphics.
6.1.Bitmap Graphics(Raster Graphics):
It is pixel based graphics.
Bitmap images (also known as raster images) are made up of pixels in a grid. Pixels are picture
elements (tiny squares of individual color that make up what you see on your screen.). All these tiny
square of color come together to form the images you see.
Bitmap images are resolution dependent.
6.2.Vector based Graphics(Vector Graphics):
The images in vector Graphics are basically mathematically based images. Unlike bitmaps, vector
images are not based on pixel patterns, but instead use mathematical formulas to draw lines and curves
that can be combined to create an image.
Vector based images have smooth edges and therefore used to create curves and shapes. Vector images
are edited by manipulating the lines and curves that make up the image using a program.
7. Applications of computer graphics
Now a days computer Graphics is used in variety of field ranging from daily routing activities to very
high end specialized areas.
Some of major applications of computer graphics are listed below
1. Computer Aided Design/ Drafting(CAD/CADD)
2. Geographical information system(GIS).
3. Desktop publishing(DTP)
4. Graphical User Interface(GUI)
5. Digital Art.
6. Entertainment.
7. Image Processing
8. Education and training
9. Presentation Graphics, Scientific and Engineering Graphics
10. Medical applications.
11. Communication.
12. Simulation
8. Display devices:
Display device is a device used for presentation of information such as image or text for visual
purpose. i.e to display information.
8.1. Raster Scan Display:
In a raster scan system, the electron beam is swept across the screen, one row at a time from top to
bottom. As the electron beam moves across each row, the beam intensity is turned on and off to create a
pattern of illuminated spots.
Picture definition is stored in memory area called the Refresh Buffer or Frame Buffer. This memory
area holds the set of intensity values for all the screen points. Stored intensity values are then retrieved
from the refresh buffer and “painted” on the screen one row (scan line) at a time as shown in the
following illustration.
Each screen point is referred to as a pixel (picture element) or pel. At the end of each scan line, the
electron beam returns to the left side of the screen to begin displaying the next scan line.
A touch screen may contain pictures or words that the user can touch to interact with the device.
A touch has two main advantages
1. It allows users to interact directly with what is displayed.
2. It does not require the use of an intermediate device.
The three main technologies are explained below:
8.7.1. Resistive:
This screen has a thin metallic layer that is conductive and resistive, so that touching results in a
change in the electrical current sent to the controller.
8.7.2. Surface Acoustic Wave(SAW)
Ultrasonic waves pass over this screen. Touching it results in absorption of part of the wave,
registering the position of the touch, which is sent to the controller.
8.7.3. Capacitive
This screen is coated with an electrically charged material. Touching it causes a change in capacitance,
which allows the location to be determined and sent to the controller.’
9. Output Primitives
Graphics primitives are the functions that we use to draw actual lines and the characters that make up
the picture. These functions provide convenient method to application programmer for describing
pictures.
9.1. Point: Plots a single pixel on screen.
4. Applications
o Education
o Entertainment
o Industrial design and architecture
o Scientific visualization
o Medical field
2. Augmented Reality
Mixed Reality(Augmented Reality):
o The seamless merging of real space and virtual space.
o Integrate the computer generated virtual objects into the physical world
which become in a sense an equal part of our natural environment.
An AR system combined the real and the virtual in order to assist the user in
perform his task. So we can say that, an augmented(mixed) reality is a halfway
point between a non-immersive and fully immersive CR system.
Mobile devices like smartphones and tablets have put supercomputer power
in our hands and pockets. If we are wondering round the world, maybe visiting
a heritage site like the pyramids or a fascinating foreign city we have never
been to before, what we want is typically not virtual reality but an enhanced
experience of the exciting reality we can see in front of us. That’s the idea of
Augmented Reality(AR).