Professional Documents
Culture Documents
1.0 INTRODUCTION
Computer graphics may be defined as the process of creation, storage and
manipulation of drawings and pictures with the aid of a computer. It is an extremely
effective medium for communication between users and computers.
There are two types of computer graphics.
1. Passive computer graphics.
2. Interactive computer graphics.
v In passive computer graphics, the user has no control over the images occurred
in display device. Just we can watch the graphic images.
v In interactive computer graphics (ICG), the user may interact with the graphics
and with the program generating them. The user can create, edit, and modify
the images according to his needs. The images created by using computer can
be modified, enlarged, reduced in size, moved to another location on the
screen, rotated and transformed. The concept of interactive computer graphics
is shown in fig. 1.1.
The user can communicate the data with computer through a keyboard and computer
can communicate with user through CRT (Cathode Ray Tube) i.e., monitor of
computer.
The following are the functions of the IGC.
(i) Modeling:
It is the process of creating an object in computer by using basic primitives like
points, lines, arc, circle, edges, areas, surfaces and volumes.
Since P(u) is a position vector, each of the components of P(u) has a parametric
representation x(u) and y(u) between P1 and P2 Therefore,
v Where the parameter u varies from 0 to1. If u is incremented by, say 0.2, then
the DDA will generate 4 points in between the two ends of the line.
v A pixel however can have only integer co-ordinates. Therefore, hardware is
unusually provided that converts each fractional co-ordinate into the nearest
integer. Thus 9.7 is rounded up to 10, and 9.2 is rounded down to 9.
v Once the address of all the pixels is determined these are stored in a frame
buffer.
v The display driver reads the array of addresses and illuminates the
corresponding pixels. In order to look a line continuous manner, it is necessary
to increment the parameter u according to the resolution of the display device.
If too large increment is selected, the line may appear to be discontinuous.
Fig.1.8 Reflection
(v) Zooming:
v Zooming transformation is useful for getting magnified view or enlarged view
of particular part of the drawing.
v Zooming = Scaling + translation + Clipping
Fig.1.9 Zooming
(iv) Panning:
The panning transformation is used to move the screen across the work page. i.e. it is
used to shift a drawing across the screen as if it were moving window.
(vii) Transmitting information on a network:
It is used to transfer the data from one device to another. For this purpose the data
must be encoded using a protocol. Protocol is a set of rules that control the exchange
of data between the communicating devices.
(viii) Graphics libraries:
These graphic libraries are used to avoid unnecessary repeated programs when
programming the operation described above.
Fig.1.10 Translation
(ii) Scaling:
v Scaling is the transformation applied to change the scale of an entity.
v This is done by increasing the distance between the points of the drawing.
That means, this can be done by multiplying the co-ordinates of the drawing
by an enlargement or reduction factor called scaling factor.
v The size of the entity altered by the application of scaling factor is shown in
fig. 1.11.
Fig.1.11 Scaling
Example:
5.1 CLIPPING
Cohen sutherlan clipping algorithm:
v In this method all the lines are classified to see if they are in, out or partially
inside the window by doing an edge test.
v The four digits binary code is used to identity the end points of the line with
reference to the window.
v The code is known as TBRL.
v The code is identified as follows.
If the point is above top of window T = 1 otherwise T= 0
If the point is above below of window B = 1 otherwise B = 0
If the point is above right of window R = 1 otherwise R = 0
If the point is above left of window L = 1 otherwise L = 0
Where, T= Top, B = Bottom, R = Right and L = Left.
For example consider the object shown in fig. 1.17 within the window. The full 4 digit
codes of the line end points with reference to the window are shown in fig. 1.17.
Fig.1.17
v After assigned the 4digit code, the system first examine whether the line is
fully in or out of the window by the following conditions.
v The line is inside the window if both the end points are equal to “0000”.
v The line is outside the window if both the end points are not equal to “0000”.
v For those lines which are partly inside the window, they are split at the
window edge and discard the line segment outside the window.
5.2 HIDDEN LINE ELIMINATION
v Since the early development of computer graphics, there is always a demand
for clear and more realistic images by removing the hidden lines and surfaces.
v The determination of hidden edges and surfaces is considered one of the most
challenging problems in computer graphics.
v The development of hidden line removal algorithm is influenced by the types
of graphic display devices they support and by the type of data structure they
operate on.
v The hidden line elimination can be stated as, “For a given three dimensional
scene, a given viewing point and a given direction, eliminate from an
appropriate two dimensional projection of the edges and faces which the
observer can not see”.
The surface test to eliminate the back faces is usually sufficient to solve hidden line if
the image has no holes.
Otherwise, a combination of techniques is required. In order to apply the visibility
technique to the image data, the sorting of this data is required.
v Bezier used a control polygon for curves, in place of points and tangent
vectors as in case of cubic splines.
v The Bezier curve is defined in terms of the locations of n+l points. These
points are called control points. They form vertices of control polygon which
uniquely defines the curves shape.
v Fig.1.20. shows a Bezier curve which has tour control points. Only first and
last control points or vertices of the polygon actually lie on the curve.
v The other two vertices define the order derivates and shape of the curve. The
curve is always tangent to first and last polygon segments.
v Several four point Bazier polygon and the resulting cubic curves are shown in
fig. 1.21.
Fig 1.21. Cubic bezier curve
Where the B, are the position vectors of the n+l defining polygon vertices and the N
are the normalized B-spline basis functions.
6.3 Characteristics of the B-spline curves:
1. The local control of the curve can be achieved by changing the position of a control
point or using multiple control points by placing several points at the same location.
5. If K equals the number of control points (n+l), then the resulting B-spline curve
becomes a Bezier curve as shown in fig.1.24.
v Fig. 1.30 shows the concept of data bank. It describes how a typical
manufacturing firm’ s information files can be integrated into the central
database.
v In general data base system, the following major information sub systems are
required to run the business.
General accounting files
Inventory file
Customer and sales file
Vendor file
Personnel file
v The database should satisfy the requirements of the user, otherwise he will
continue to maintain his own system.
v The purpose of the central data base system may not be useful. The key
element in this concept is that each subsystem utilizes the same database in the
satisfaction of its information needs. This will yield an advantage of
integration of departments and functions.
v Each department/sections of an organization is integrated into a whole through
its access and interface with central database of the organization and thereby,
gains a greater understanding and application of how its actions and plans
affect others throughout the organization.
Important problems surrounding database are:
1. There is possibility of invalid input information by a unit wishing to maintain
information security.
2. If anybody enters the ‘ error’ data, it affects other departments immediately and
produces “multiplier effect”.
3. The interdepartmental agreement required concerning the degree of detail to be
included in data elements of the database.
v If there is no common ground for agreement and solution of these problems,
organisational units tend to maintain their own system for their peculiar needs.
This will also defeats the purpose of central database.
v A good data base system should have the following features:
Ø Satisfy current and future application needs.
Ø Utilized in the best possible way according to the user requirement.
Ø Validate data before storage.
Ø Be easy to modify with changes.
Ø Be expandable with the growth and changes.
Ø Allows access for the data only to authorized persons.
11.0 DATA LIFE CYCLE
Data within a system have their own life cycle. Fig. 1.31 shows three aspects of this
life cycle which are particularly important in development, design and operation of
systems.
The three aspects are:
(i) We need to know how data are generated i.e. how they are born.
(ii) We need to know what manipulation or processing of data is carned out.
(iii)We need to know how certain types of information processing are carried out,
particularly the transmission of data and communication of information and
storing/retrieving of data. The reproduction of data may occur at various stages in the
life cycle.
Fig. 1.31. Data Life Cycle
PART-B questions
1. Explain briefly the creation of graphic primitives both in 2D and 3D.
2. Determine the parametric representation of the line segment between
two points (10.5) and (2,9). Determine the slope of the segment and
explain DDA algorithm
3. Write short notes on the following terms:
i. Pointing
ii. Clipping transformation
iii. Transmitting information
iv. Perspective projection
v. Hidden surface removal
4. What is meant by concatenation? Explain.
5. Describe clearly hidden line elimination.
6. Explain curve generation techniques.
7. Differentiate Bezier curve and cubic spline curve
8. Write sort notes on “rational curves, model storage and data structure”.
9. Explain database management system, data bank information storage
and data life cycle.
10. Describe information system.
11. Explain engineering data management system.
12. Explain the various types of data structure organization.
13. What are the 2 —D transformation? Explain each.