0% found this document useful (0 votes)
51 views7 pages

Computer Graphics Chapter 1

Uploaded by

Rajam
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
51 views7 pages

Computer Graphics Chapter 1

Uploaded by

Rajam
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

CHAPTER 1

Introduction

Computer graphics is the application area of digital computers where information is


represented graphically or pictorially. The age we are living in is called the cyber age.
Computer and information have become part and parcel of human life. Information
may be presented in various different forms like plain text, cypher text, charts,
graphs, audio and video. Out of all such representations, the visual forms are most
suitable for faster realization. Grasping the inner meaning and significance of some
information and conveying it to others, in the most compact form, is only possible in
visual forms. Computer graphics deals with conversion of input data from real world
into graphical forms and presenting it to the users as output. Interactive advanced
graphical systems are able to extract information from graphical input, process them
and convert them into desired forms in real time. The secret of the ancient Chinese
proverb "a picture is worth ten thousand words" is essentially realized only when
computer graphics is used for processing, storage and presentation of textual data in
graphical forms. Some of the major advantages of computer graphics, thus, can be
enlisted as follows:

Information becomes more communicative when it is represented graphically.


Ahuge table of numbers may be replaced by a simple graph or chart diagram.
" Visual form of data may be more relevant to realize their characteristics.
. Creation of engineering designs and architectural blue-prints can be fuly auto
mated.
" Mathematical models of hyperspace objects can be easily realized using comput
ers.

" Using motion dynamics simulation experiments of moving objects can be


perforned.

1.1 Applications of Computer Graphics


Computer graphics is highly used in industry, business, government, education, enter
tainment etc. Some of the common applications are mentioned as follows:
Introduction
1. User interface design: In PCs or workstation or network server user interfaces
using desktop window system are developed to manage multiple simultaneous
events or activities. Principles of computer graphics are used in design and
operation of such user interfaces. Graphical User Inter faces (GUIs) are generally
controlled by a window manager that allows a number of user applications to be
activated on different windows. The task managers of different windows responed
to user commands provided in a graphical form. For this purpose a number of
gTaphical components like icons are used in each window. Icons are symbols that
represent tasks and their use eliminates the need to type awkward commands.
2. Plotting curves: In business, science or technical matters we need plotting 2D
or 3D curves or graphs of mathematical, physical or economic functions such
as histograms, bar and pie charts, scheduling charts, inventory management
diagrams and the like. These graphical forms of complex data facilitate decision
making.
3. Ofice automation and electronic publishing: Multimedia
documents can
be prepared and printed. These documents may contain text, tables, graphs,
charts drawn or scanned-in graphics.
4. CAD/CAM: CAD/CAM is the most important application area of computer
graphics. Interactive graphics is highly used to design components and systems
of mechanical, electrical, electronic devices
including
bridges, automobiles, airplanes, ship hulls, etc. Also structures
of buildings,
CAD/CAM is used in
VLSI chip design, optical systems and communication network design. Not only
engineering and architectural designs, but any other real life products are almost
always computer designed. Computer graphics is also used in textile designing.
In the majority of the applications, an
is created using absolute mathenatical wire-frame model of the target object
models can be very quickly produced andrepresentation. Since these wire-frame
easily updated or adjusted, they be
come a very useful tool for design purposes. These wire-frame
be stored in very small memory for models can also
future use. Using other geometrical and
graphical transforumations, these models are converted to
and appearance. produce real shape
5. Simulation and animation for experiments and
ulation experiments of moving objects can be effectivelyentertainment: Sim
models of fluid fow, nuclear and chemical reactions, done. Mathematical
organ functions, deformation of mechanical structuresphysiological
under loads,
systens and
etc. can be
visualized. Animation is mostly used in video games and cartoon films. But not
only in entertainment, application areas of animation are
much more wide. The
wire-frame models, described in the earlier paragraph, representing the shapes
of objects can be animated or testing purposes.
Since the wire-franes can be
1.2 Operations of Computer Graphics 3

designed in a modular fashion, individual comDonents and their interactions can


be tested by animating them separately, Such kind of animation can help in
creating a virtual reality environment to display the correlation between the op
erator and the device concerned. Animated displays are also very useful for real
view advertising purposes.
6. Art and commerce: Computer graphics is highly used in modern movies
and advertisements. Different kinds of software packages are now
commercially
available for creating easy drawing and composition. Computer drawing soft
ware is now part and parcel of many CAD packages, mathematical packages,
desktop publishing software and animation packages. In mathematical compu
tation software like MATLAB and Mathematica, computer graphics is used to
produce graphical views of output. Images can also be manipulated by such
types of software. This helps in doing mathematical and scientific computation
and research. Students of fine arts are now taking help of graphical software in
3D-modeling, texture mapping, image composing and background decoration,
etc.

7. Cartography: Computer graphics is used to produce both accurate and


schematic representations of geographical and other natural phenomena from
measurement data. Some examples include preparing geographical maps, maps
for exploration for drilling and mining, oceanographic charts, weather maps, etc.

1.2 Operations of Computer Graphics


Computer graphics deals with creation, manipulation, representation and production
graphical objects on output devices either in animated or in non-animated forms.
The basic operations thus can be listed as follows.
1. Creation of elementary objects: The fundamental element of any graphical
object is a pixel or picture element. It is a single isolated black or coloured dot.
some cases, the smallest elements are a line segment or a vector. A vector
size one nothing but a dot. However, pixels are the fundamental items in
a majority of the graphical output devices which are called raster scan devices.
The other devices are called vector scan devices.
2. Creating basic shapes: Basic shapes are components of object boundaries.
These can be defined by mathematical functions. Examples include line seg
ments, circles, ellipses, triangles, rectangles, parallelograns, etc. Curve segments
with a specific radius of curvature can also be defined. Using a sophisticated
mathematical tool, curves of any arbitrary shapes can also be approximated.
3. Creating solid objects: Solid boundaries in 2D or 3D can be produced by
combining above-mentioned components.
4 Introduction

4. Sizing and positioning: Using geometrical transformations, objects or their


parts can be resized, and their position and orientation can be changed. Geo
metrical operations include translation, rotation, scaling, refection, shearing,
etc.

5. Projection on 2D: Although the objects in real world are generally 3D in


nature, on computer screen we need to produce them using a 2D notation. Ac
tually, the projected views of 3D objects are produced on the sereen. Projection
is a speciñc transformation that converts 3D object description into its 2D rep
resentation.
6. Shading and colouring: To give a real look to the objects rendering processes
are applied. For black and white objects this method is called shading, and for
coloured objects it is called colouring and rendering. The physics of light and
colours is used for developing mathematical models of such processes.
7. Viewing and clipping: Sometimes only a part of the complete object(s) needs
to be viewed. This is done by viewing and clipping. Objects can be zoomed in
and zoomed out.
8. Hidden surface elimination: Real objects do not show their back surfaces.
So while producing object surfaces from their mathematical representations, we
need to eliminate the back surfaces.
9. Producing animated views: Using the physics of motion, graphical objects
can be animated according to user requirements. The concept of object segments
helps this operation to be simulated on a computer. Asegment can be considered
to be storing the description of a part of the object that can be animated at a
time.

1.3 Graphics Software Packages


Many graphical software packages have been developed which use different notations
for fundamnental or primitive operations or functions accomplishing the same job. To
remove this diversity of notations, some standards have been maintained. Some stan
dard graphics systems are as follows:
1. cORE (Core of a Graphics Systems): Developed by the graphics standard
planning committee of the Association for Computing Machinery (ACM). CORE
is also ter1ned SIGGRAPH-Special Interest Group on Graphics (of ACM).
2. GKS (Graphics Kernel System): It is developed by ANSI and ISO. Both the
above systems contain specification of 2D and 3D graphics.
3. PHIGS (Programner's Hierarchical Interactive Graphics System): It is devel
oped by ANSI and more complex and richer than GKS.
1.4 Requirements of a Graphical System 5

Commonly used graphical packages include Autocad, Paint, Photoshop.


Coreldraw, etc. for Windows,
and Xig, Xpaint, etc. for Unix or Linux. These
use primitive notations from some of the above standards. The standardization is
required to solve the problens of portability, i.e. to make device-dependent graphics
into device-independent graphics and thus isolating the programmer from the machine.

1.4 Requirements of a Graphical System


The objective of a graphical system is to produce high quality graphics on a display
or output device in real time. Hence, we can shortlist the basic requirements of such
a system as follows:

" Display of required resolution


" Powerful processor to perform primitive graphical operations
" Adapter card and graph driver

The adapter card is the display controller. It gets display information from the proces
sor and converts it into electrical signals that generate gray colour pixel on the moni
tor. The driver software can be run in different modes. It checks the status of display
unit and makes it ready for operation in certain mode. Pixel resolution and number
of colours, etc. are determined by this driver. Some common display adapter cards
are listed as follows:

" MDA (Monochrome Display Adapter) 320 x 200 low resolution


CGA (Colour Graphics Adapter) 640 x 200 high resolution
EGA (Extended Graphics Adapter) 640 x 200
640 x 350 16 colours
HGA (Herculean Graphics Adapter) 720 x 348 monochrome
VGA (Video Graphics Adapter) 640 x 200 low
MCGA (Multicolour Graphics Adapter) 640 x 350 medium
640 x 480 high:16 colours
320 x 200 256 colours
" PGC (Professional Graphics Controller) 640 x 480 256 colours
PC3270 720 x 350
IBM 8514 640 x 480 256 colours
Extended VGA or XGA 1024 x 768 256 colours
SVGA (Super Video Graphics Array) 1250 x 1024 256 colours

But only high resolution is not sufficient for a good graphical system. For fast
generation of graphical objects special graphic co-processors and graphic accelerators
are added in modern graphic workstations. The co-processors is programmable and
Introduction
can execute a high level instruction. The accelerator can perforin only specific graphic
function built in its hardware at a very high speed. Interactive graphic systems gener
ally contain another processor called display processor. This special processor interacts
with the CPU and control the operation of the display device. The major function of
this processor is to convert the digital values from the CPU into corresponding voltage
values needed by the display device. Different display processors may be employed to
implement different display functions using special hardware.

1.5 Graphical User Interfaces


Graphical User Interfaces (GUls) are, nowadays, very popular for graphical application
development. These provide an iconic interaction language. Interactive input devices
ike mouse are used to convey any graphical command to the system. At the back
ground, of course, there is a general purpose language for developing applications. In
the Windows environment, generally Visual C++, Visual Basic, Java, etc. languages
are used. Visual C++, Visual Basic and Java are not only simply
language compil
ers, but also they provide a complete programming environment with inbuilt GUIs.
However, these GUls and the graphical primitives that these languages support do not
provide general portability across different Operating Systems. But we have another
interface which can be used commonly any platform when used with suitable
graph
drivers. This is the X-window interface. Since the language support of X-windows,
ie. Motif is commonly supplied with Unix, the latter has achieved a high degree
of
portability. Using the X, one can develop graphical application that runs over a wide
range of Unix systems.
The basis of all Motif programming is based on the building a shell widget which
is synonynous to the top level window (first child of the default root window) in Xlib.
The widget which is in the top of the widget hierarchy of the above
graphical user in
terface, is the session widget class. This class can contain at most one child. So under
this class the widget created is of
xmMainWindowWidget clasS. This class of widget
can hold at most four child widgets, viz. menubar
drawingarea widget (xmDrawingArea Widget class), widget(xmMenubarWidget
class),
verticalscrollbar widget and hor
izontalscrollbar widget (xnScrollBarWidget class for both of the above widgets).

1.6 QUESTIONS
1.1 What is conputer graplhics? Write down five different applications of it.
1.2 What do you nean by graphics adapter cards? Name some
graphics adapter
cards along with their characteristic features,
1.3 Name some standard graphical packauges and their developers.
1.6 Questions
7

1.4 Write down the


1.5 What hardware importance computer graphics in software developnent.
of

outputs? components must be used in graphical system for real-time


1.6 Describe the roles of display
1.7 Write down brief notes on controller producing monitor outputs.
in
MDA, CGA, VGA and SVGA. (Hint:
graphics meta files in your system for relevant data.) search the

You might also like