You are on page 1of 12

Introduction to Computer Graphics

Session - I

1. What are the applications of Computer Graphics? List them with brief note.

The application of Computer Graphics is enormous and is growing rapidly


as computers with graphics capability became commodity products. Some of the
sample applications are:
i) Design Simulation & User Interface.
ii) Display of information in Industry & Business.

Entertainment: Animation & Gaming represent major use in creation and


manipulation of pictures with the aid of a computer. Here, we can classify interactive and
non-interactive applications say titles shown in TV and other forms of computer art are
examples of non-interactive or passive computer graphics. The user has no control over
the Text/Image/Animation. We can give the user same control over the Image/Animation
by providing him with an input device such as, joystick etc…, so that he can signal his
requests to the computer and can get immediate response for that, i.e it involves two-way
communication between computer and user. Gaming is one of the familiar examples.

User Interface: Most applications of computer have user interface that rely on
desktop window systems to manage multiple simulation activities and on point & click
facilities to allow users to select menu items, icons, dialogue boxes and objects on screen.
Typing is necessary only to input the text to be stored and manipulated. Word processing,
spreadsheet, desktop-publishing programs are typical applications that take advantage of
such user-interface techniques.

Display of Information in Industry & Business: Creating 2D & 3D graphics of


mathematical, physical & economic functions, histograms bar and pie-charts, task
scheduling charts, inventory & production charts are used to present meaningfully and
consistently the trends and patterns gleaned from data. So, to clarify complex phenomena
and to facilitate informed decision making in industry and business it is been used.

Design: In Computer Aided Design(CAD), interactive graphics is used to design


components and systems of mechanical, electrical, electro-mechanics and electronic
devices including structures such as building automobile bodies, airplane & ship hulls,
VLSI chips etc.,

Sometimes, the user only wants to precise drawings of components and


assemblies, as for online drafting or architectural blue prints more frequently. However,
the emphasis is on interacting with a computer-based model of the component or system
being designed in order to test. For example, its structural, electrical or thermal properties

1
in this model is often interpreted by a simulator that feeds back the behavior of the
system to the user for further interactive design and fast cycles.
Simulation: Interactive computer graphics affects our lives in a number of indirect ways.
For example, it helps train the pilots of our airplanes. These pilots spend much of their
training in virtual environment (VE) (rather than in a real aircraft) on the ground at the
controls of a flight simulator. The flight simulator is a mock up of an aircraft flight deck
containing all the usual controls and surrounded by screens on, which are projected
computer-generated views of the terrain visible on takeoff and landing. As the trainee
pilot maneuvers his “Aircraft” these views change; as to maintain an accurate impression
of the planes motion.

Other than these few examples there are some other applications:

• Office automation & electronic publishing(DTP)


• Art & Commerce
• Process Control
• Cartography………etc.
• Virtual Reality – Augmented reality-Immersive & Non-Immersive
environment, Virtual Surgery, Virtual meeting etc

2. Explain the Interactive Graphics System with the help of an appropriate block
diagram.

Fig: 1.1 Interactive Graphics System

The High-level conceptual framework can be used to describe almost any Graphics
System. At the hardware level, a computer receives input from interaction devices, and
outputs images to a display device. The software has three components. The first is the
application program, which creates, stores into, and retrieves from the second
components, the application model, which represents the data or objects to be pictured on
the screen. The application program also handles user input. It produces views by sending
to the graphics system, the third component, a series of graphics output commands that
contain both the detailed geometric description of the thing to be viewed and the
attributes describing the way the objects should appear. It is responsible for actually
producing the picture from the picture from the detailed descriptions and for passing the
user’s input to the application program for processing.

2
The graphics system is thus an intermediary between the application program and
the display hardware that effects an output transformation from objects in the application
model to a view of the model. Symmetrically, it effects an input transformation from user
actions to inputs to the application program that will cause the application to make
changes in the model and/or picture. The fundamental task of the designer of an
interactive graphics application program is to specify the classes of data items or objects
that are to be generated and represented pictorially, and how the user and the application
program are to interact in order to create and modify the model and its visual
representation. Most of the programmer’s task concerns creation and editing of the model
and handling user interaction, not actually creating views, since the Graphics System
handles it.

3. Explain the working principles of CRT with the help of a neat diagram.

Fig 1.2: An Architectural View of a CRT.

An Interactive Computer Graphics demands display devices whose images can be


changed quickly. The figure above shows an architectural view of a CRT. The electron
gun emits a stream of electrons, which accelerate towards the phosphor-coated screen by
a high positive voltage applied near the face of the tube. On the way to the screen, the
electrons are forced into a narrow beam by the forcing mechanism and are directed
toward a specific point on the screen by the magnetic field produced by the deflection
coils. When the electrons hit the screen, the phosphor emits a visible light. Since the
phosphor’s light output decays exponentially with time, the entire picture must be
refreshed cyclically, so that the viewer sees a still, un-flickering picture.

The refresh rate of a CRT is the number of times per second the image is redrawn.
As the refresh rate decreases, flicker develops because the eye can no longer integrate the
individual light impulses coming from a pixel. The refresh rate above, which a picture
stops to flicker, and fuses into a steady image is called the critical fusion frequency
(CFF). The process of fusion is familiar to us, as we know it occurs when we watch a
television or any motion pictures. A flicker-free picture appears still or steady to the
viewer, irrespective of any given point being “OFF” much longer than “ON”. The refresh
rate of a Raster-Scan Display is usually at least 60 frames per second, which is

3
independent of picture complexity. The refresh rate for vector systems depends directly
on picture complexity.

Any given phosphor has various quantum levels to which electrons can be excited,
each corresponding to a color associated with the return to an unexcited state. Further,
electrons on some levels are less stable and return to the unexcited state more rapidly
than others. A phosphor’s fluorescence is the light emitted as these very unstable
electrons lose their excess energy while electrons are striking the phosphor. A phosphor’s
persistence is defined as the time from the removal of excitation to the movement when
phosphorescence has decayed to 10% of the initial light output. The range of persistence
of different phosphors can reach many seconds, but it is usually 10 to 60 microseconds
for most phosphors used in graphics equipments. This light output decays exponentially
with time.

4. Explain the working principles of shadow-Mask CRT with the help of a neat
diagram.

Here, just behind the phosphorus coated face of the CRT, there is a metal plate.
The shadow-mask is pierced with small round holes in a triangular pattern. In place of the
usual electron gun the shadow-mask tube uses three guns, grouped in a triangle or delta.
These three guns are responsible for red, green and blue components of the light output of
the CRT.

The deflection system of the CRT operates on all three electron beams
simultaneously, bringing all three to the same point of focus on the shadow-mask. Where
the three beams encounter holes in the mask, they pass through and strike the phosphor.
Since they originate at three different points, however, they strike the phosphor in three
slightly different spots. The phosphor of the shadow-mask tube is therefore laid down
very carefully in groups of three spots- one red, one green and one blue- under each hole
in the mask, in such a way that each spot is stuck only by electrons from the appropriate
gun. The effect of the mask is thus to “shadow” the spots of red phosphor from all but the
red beam, and likewise for the green and blue phosphor spots. We can therefore control
the light output in each of the three component colors by modulating the beam current of
the corresponding gun.

4
Fig 1.3: Shadow-mask CRT

5
SESSION - II

1. Explain the object representation by means of geometry (wire frame)


modeling and topology (connectivity) with the help of modeling of a cube as
an example using appropriate data structures.

Concept:

Any polyhedron such as cubes, tetrahedral etc should satisfy the Eulers
formula; V-E+F=2

where, V= no of vertices
E= no of edges
F= no of faces.
The appropriate data structures is as shown in the figure, it is self explanatory like
how it links in the hierarchical order such as object list, polygon list (face list),
edge list, vertex list and vertices.

A 0 X0, Y0, Z0
Cube
X1, Y1, Z1
B 3

C 2 X2, Y2, Z2

D 1
X3, Y3, Z3
E
X4, Y4, Z4
F
X5, Y5, Z5
3
X6, Y6, Z6
7
X7, Y7, Z7

Fig 2.1(a) Vertex list representation of a cube

6
A cube

Vertices: Normals Faces ((vert,norm), …):


(1,1,1) (1,0,0) ((0,4),(1,4),(2,4),(3,4))
(-1,1,1) (-1,0,0) ((0,0),(3,0),(7,0),(4,0))
(-1,-1,1) (0,1,0) ((0,2),(4,2),(5,2),(1,2))
(1,-1,1) (0,-1,0) ((2,1),(1,1),(5,1),(6,1))
(1,1,-1) (0,0,1) ((3,3),(2,3),(6,3),(7,3))
(-1,1,-1) (0,0,-1) ((7,5),(6,5),(5,5),(4,5))
(-1,-1,-1)
(1,-1,-1)

Draw cubes from faces


void colorcube( )
{
polygon(0,3,2,1); 5 6
polygon(2,3,7,6);
polygon(0,4,7,3);
polygon(1,2,6,5); 1
polygon(4,5,6,7); 2
polygon(0,1,5,4); 4 7
}

0 3

Fig: 2.1(b) drawing cube from faces

2. Distinguish between convex and non convex polygons.

Take any two random points inside the polygon and join them. If all the
points lying on the line falls inside the polygon it is called as convex as shown in
the figure. Or if some of the point’s lies outside the polygon it is said to be non-
convex.
P
P

Q Q

Fig 2.2: Convex and non-convex

7
3. Explain the technique of data representation to distinguish front and back
face of a given polygon. (Inward and outward pointing faces).

We call a face outward facing if the vertices are traversed in a


counterclockwise order when the face is viewed from the outside. This method is
also known as the right-hand rule because, if we orient the fingers of our right
hand in the direction the vertices are traversed, the thumb points outward.

Fig 2.3 : Traversal of the edges of a polygon

In the example shown it is important to have defined the order as 0, 3, 2, 1,


rather than as 0, 1, 2, 3, so that we could define the outer side of the back of the
cube correctly.
Back here means as seen from the positive z direction. However, each face of an
enclosed object, such as our cube, is an inside or outside face, regardless of from
where we view it, as long as we view the face from outside the object.

4. Distinguish between raster text and stroke text generation.

In the raster scan display if the characters are drawn from top-down
approach (i.e line by line) in matrix format is called as raster text. Here, BMP and
dot matrix are the best example of raster text.

Similarly if the characters are drawn using vector generation algorithm similar to
the stroke of a pen as well as pen-up and pen-down it is called as stroke text
generation. Random scan display devices were used to be more suitable for stroke
text generation.

Assignment: Write an algorithm for automatic mesh generation such as co-ordinate


generation and connectivity matrix (topology) for a rectangular plane.

Hint: Consider the mesh shown below

8
e2 v5
v6 e3
e8 v8 e9
e1 v4
e11 e10
e7 v 7 e4
v1
v2 e12
e6 e5 v3

There are 8 nodes and 12 edges


5 interior polygons
6 interior (shared) edges
Each vertex has a location vi = (xi yi zi)

Geometry vs Topology

Generally it is a good idea to look for data structures that separate the geometry from
the topology
Geometry: locations of the vertices
Topology: organization of the vertices and edges
Example: a polygon is an ordered list of vertices with an edge connecting
successive pairs of vertices and the last to the first
Topology holds even if geometry changes

Vertex Lists

Put the geometry in an array


Use pointers from the vertices into this array
Introduce a polygon list

9
x1 y 1 z 1
v1 x2 y 2 z 2
P1
v7 x3 y 3 z 3
P2
P3 v6 x4 y 4 z 4
P4 x5 y5 z5.
v8
P5 x6 y 6 z 6
v5 x7 y 7 z 7
v6 x8 y 8 z 8
topology geometry

SESSION – III
1. Explain the modeling of CIE standard with respect to human visual system.

Matching and therefore defining a colored light with a mixture of three fixed primaries is
a desirable approach to specify color. In 1931, the commission Internationale de l’
eclairage (CIE) defined three standard primaries, called X, Y, and Z, to replace red,
green, and blue in this matching process. The three corresponding color-matching
functions are shown in the figure below. The primaries can be used to match, with only
positive weights, all the colors we can see. The Y primary was intentionally defined to
have a color-matching function that exactly matches the luminous-efficiency function.
Note that the spectral distributions of the X, Y, and Z colors are not the spectral
distributions of the red, green, and blue. They are merely auxiliary functions used to
compute how much of X, Y, and Z should be mixed together to generate a metamer of
any visible color.

10
Fig 3.1: Color-matching functions

2. Explain the RGB color model with the help of color formation such as additive
color and subtractive color.

The red, green and blue (RGB) color model used in color CRT monitors and color
raster graphics employs a Cartesian coordinate system. The RGB primitives are additive
primitives; that is, the individual contributions of each primary are added together to
yield the result. The subset of interest is the unit cube shown in the figure below. The
main diagonal of the cube, with equal amounts of each primary, represents the gray
levels: black is (0,0,0); white is (1,1,1).

Blue= (0, 0, 1) Cyan= (0, 1, 1)

11
Magenta= (1, 0, 1) White= (1, 1, 1)

Black= (0, 0, 0) Green (0, 1, 0)

Red= (1, 0, 0) Yellow= (1, 1, 0)

Fig 3.2: The RGB Cube

12

You might also like