Sie sind auf Seite 1von 28

Question Bank for CGM & CG

1. What is mean by computer graphics? What are types of computer graphics? Explain
the various applications of computer graphics.
2. Write and explain DDA line algorithm. Consider the line from (0, 0) to (4, 6). Use
DDA line algorithm to rasterize this line. Evaluate and tabulate all the steps involved
with proper justification.
3. Explain Graphics standards with its need.
4. Explain Bresenhams circle generation algorithm.
5. Explain the working of CRT.
6. Explain any three input devices.
7. Differentiate between vector scan and raster scan display.
8. List and explain various character generation methods in brief.
9. Explain concept of color video monitors which define beam penetration and shadow
mask technique.

Solution of ISE 1
1. What is mean by computer graphics? What are types of computer graphics?
Explain the various applications of computer graphics.
Answer:
Computer Graphics:
1. Computer graphics is a study of technique to improve communication between
human and machine.
2. The term computer Graphics (CG) refers to creation, Storage and manipulation of
pictures and drawing using a digital computer.
3. It is Effective tool for presenting information.
4. Computer graphics is the use of computer to define, store, manipulate, interrogate
and present pictorial output.
5. Computer Graphics as the pictorial representation or graphical representation of a
computer.
6. Computer graphics is a sub-field of computer science which studies methods for
digitally synthesizing and manipulating visual content.
7. Computer Graphics (CG) is the field of visual computing, where one utilizes
computers both to generate visual images synthetically and to integrate or alter
visual and spatial information sampled from the real world.
8. Computer Graphics is the pictorial representation and manipulation of data by a
computer.
9. Figure:
Input (i/p)
Define
Store
manipulate
interrogate

COMPUTER

Output (o/p)
Pictorial
representation

Figure: Computer Graphics

Ms. Punam R. Patil

[Computer Graphics & Multimedia]

Page 2

10. Advantages of Computer Graphics:


i) It has an ability to show moving pictures and thus it is possible to produce
animations with computer graphics.
ii) The computer graphics provides tool called motion dynamics. With this tool user
can move and tumbles object with respect to stationary observer or he can make
objects stationary and the viewer moving around them.
iii) The computer graphics also provides facility called update dynamics. With this
tool it is possible to change the shape, color or other properties of the objects being
viewed.

Types of computer graphics:


There are mainly two types of computer graphics,
i) Raster graphics: Each pixel separately defined. e.g.- Microsoft Paint
ii) Vector graphics: Mathematical formulas used to draw lines & shapes and curves.
e.g.- Adobe Illustrator

Applications of computer graphics:


Now a day we use in different sectors that is the various applications of computer
graphics are as,
1. Computer Aided Design (CAD)
2. Presentation Graphics
3. Computer Art
4. Entertainment (animation, Games)
5. Education & Training
6. Image processing
7. Graphical User Interface (GUI)
8. Cartography
9. Computational physics
10. Information graphics
11. Visualization
1. Computer Aided Design (CAD):
Ms. Punam R. Patil

[Computer Graphics & Multimedia]

Page 3

i) Used in design of buildings, automobiles, aircraft, watercraft, spacecraft, computers,


textiles &many other products.
ii) Objects are displayed in wire frame outline form.
iii) Software packages provide multi-window environment.
2. Presentation Graphics:
i) Used to produce illustrations for reports or generate slides for used with projectors.
ii) Commonly used to summarize financial, statistical, mathematical, scientific,
economic data for research reports, managerial reports & customer information
bulletins.
iii) Examples: Bar charts, Line graphs, Pie charts, Surface graphs, Time chart.
3. Computer Art: Used in Fine art & commercial art,
i) Includes artists paintbrush programs, paint packages, CAD packages and animation
packages.
ii) These packages provide facilities for designing object shapes & specifying object
motions.
iii) Examples: Cartoon drawing, paintings, product advertisements, logo design.
4. Entertainment:
i) CG methods are now commonly used in making motion pictures, music videos and
television shows.
ii) Many TV series regularly employ computer graphics methods.
iii) Graphics objects can be combined with a live action.
5. Education and Training:
i) Computer generated models of physical, financial and economic systems are used as
education aids.
ii) Models of physical systems, physiological systems, population trends or equipment
such as color-coded diagram help trainees understand the operation of the system.
iii) For training applications, special systems are designed.
Ms. Punam R. Patil

[Computer Graphics & Multimedia]

Page 4

iv) Example: Training of ship captains, aircraft pilots etc.


6. Image Processing:
i) CG-computer is used to create a picture.
ii) Image processing-applies techniques to modify or interpret existing pictures such as
photographs and TV scans.
iii) Medical applications:
picture enhancements
Tomography
Simulations of operations
Ultrasonic & nuclear medicine scanners
iv) 2 applications of Image processing
improving picture quality
Machine perception of visual information (Robotics)
7. Graphical User Interface: (GUI):
i) major component-window manager (multiple-window areas)
ii) To make a particular window active, click in that window ( using an interactive
pointing device)
iii) Interfaces display menus & icons
iv) Icons are graphical symbol designed to look like the processing option it represents.
v) Advantages of icons: less screen space, easily understood.
vi) Menus contain lists of textual descriptions & icons.
8. Cartography:
i) Computer graphics also used to represent geographic maps, weather maps,
oceanographic charts, contour maps, population density maps and so on.
9. Computational physics:

Ms. Punam R. Patil

[Computer Graphics & Multimedia]

Page 5

i) Computational physics is the study and implementation of numerical algorithm to


solve
problems in physics for which a quantitative theory already exists.
ii) It includes,

Solving differential equations.


Evaluating integrals.
Stochastic methods, especially Monte Carlo methods.
The pseudo-spectral method.

10. Information graphics:


i) Information graphics or info graphics are visual representations of information,
data or knowledge.
ii) These graphics are used where complex information needs to be explained quickly
and clearly, such as in signs, maps, journalism, technical writing, and education.
11. Visualization:
i) The numerical and scientific data are converted to a visual form for analysis and to
study the behaviour called visualization.
ii) Producing graphical representation for scientific data sets are called scientific
visualization.
iii) Business visualization is used to represent the data sets related to commerce and
industry.
iv) The visualization can be either 2D or 3D.

2. Write and explain DDA line drawing algorithm. Consider the line from (0, 0)
to (4, 6). Use DDA line algorithm to rasterize this line. Evaluate and tabulate
all the steps involved with proper justification.
Answer:
DDA Line Drawing algorithm:
1. DDA means Digital Differential Analyzer.
2. It is one of the line drawing algorithms.
Ms. Punam R. Patil

[Computer Graphics & Multimedia]

Page 6

3. One of the techniques for obtaining a rasterized straight line is to solve the
governing differential equation for straight line.
dy/dx=constant
OR
y/x=(y2-y1)/(x2-x1) (i)
4. The solution of finite difference approximation is,
yi+1=yi+y
=yi+[(y2-y1)/(x2-x1)*x]

. From (i)

xi+1=xi+x
=xi+[(x2-x1)/(y2-y1)*y]

. From (i)

&

5. Algorithm for DDA line drawing is as:


1.
2.

Read End Points of line (x1,y1) & (x2,y2).


dx = (x2-x1)
dy = (y2-y1)
3. If (dx>=dy) then
length=dx
else
length=dy
end if
4. dx = (x2-x1)/ length
//This makes either dx or dy equal to 1 i.e. Incremental
dy = (y2-y1)/ length
// value of x or y is 1.
5. x= x1+0.5*sign(dx)
.
y= y1+0.5*sign (dy)

6.

// Sign shows Algorithm work in all quadrant


// 0.5 for Round up value in integer function.
i=1
// In this loop points are Plotted.
while (i<=length)
{
Plot (Integer(x), Integer(y)
// Use put pixel.
x=x +dx
y= y + dy
i=i+1
}

7. Stop

Ms. Punam R. Patil

[Computer Graphics & Multimedia]

Page 7

Advantages of DDA algorithm:


1. Simplest algorithm & not required special skill for implementation.
2. Faster method for calculating pixel position than using the equation y=mx+b. It
eliminates the multiplication in the equation by making use of raster characteristics,
so that appropriate increments are applied in the x or y direction to find the pixel
positions along the line path.
Disadvantages of DDA algorithm:
1. Floating point arithmetic in algorithm is still time consuming.
2. Precision loss because of rounding off.
3. As algorithm is orientation dependent so end point accuracy is poor.

Example: Consider the line from (0, 0) to (4, 6) by using DDA algorithm to rasterize
this line.
Solution: Evaluating steps 1 to 5 in DDA algorithm with,
x1=0
y1=0
x2=4
y2=6
As x2-x1=4-0=4 & y2-y1=6-0=6
length=y2-y1=6
x=x2-x1/length =4/6 =0.667
y=y2-y1/length=6/6=1
Initial value for,
x=x1+0.5*sign(x) = 0+0.5*sign(4/6)=0.5
y=y1+0.5*sign(y) = 0+0.5*sign(1)=0.5
Now,
Ms. Punam R. Patil

[Computer Graphics & Multimedia]

Page 8

Now,
By pictorial representation,

3. Explain Graphics standards with its need.


Answer:
Graphics standards:
1. Number of standards have been developed, which are differ in services and their
role in graphics system.
Ms. Punam R. Patil

[Computer Graphics & Multimedia]

Page 9

2. There are mainly Three types of graphics standards as,


i) Interface Standard
ii) Data Interface Standard
iii) Subroutine Interface Standard
i) Interface Standard: these standardize communication at an interface between two
parts of Hardware & Software system.
All standards are included in this standard.
ii) Data Interface Standard: they specify digital representation of graphical data. The
digital data is used to send Commands from computer display.
iii) Subroutine Interface Standard: these standards specify the behavior of set of subroutines that can be called to manipulate graphical data.
The figure 1 shows a Graphics standard used in application program is as below,

-Figure 1: Graphics Standards in Application Program-

Ms. Punam R. Patil

[Computer Graphics & Multimedia]

Page 10

IGES- Initial Graphics Exchange Specification


It defines format for engineering drawing read or write by applications and also
engineering databases to be transferred between applications.

GKS- Graphics Kernel System


It is a subroutine interface that application programmers used to manage graphical
Input or Output by ISO.

VDI-Virtual Device Independence


It defines a standard way for a program to drive a graphics device by ANSI. It is a
lower level standard which provide a device independent way to control Hardware.

VDM-Virtual Device Metafile


It is data format used to record pictures on disk. Metafile is nothing but permanent
picture storage. It is a way to communicate graphical data between programs or
between computers.

Advantages of Graphics Standards:

1.

2.

3.
4.

The ideal graphics standard has a perfect device independence which allows it to
operate all graphical input and output devices. Its organizing concepts are suitable
for all interactive graphics applications.
Its advantages are as follow,
The user can select graphics hardware according to the needs of cost, performance,
size or any other such other criteria. Thus user can upgrade the graphics eqipment
to fulfill the current demands.
Due to the property of device independence the application programs can address a
wider audience than the programs that depend on specific equipment. This is very
economical for both developer and the user.
The standard software packages that provide necessary facilities can be used. Thus
everytime development of new graphics routines can be avoided.
A standard programmining language and graphics standards facilitate the
transporting of an application program from one computer to another, having
compiler of the given programmining language and implementing same graphics
standard.

Hazards of Graphics Standards:


Ms. Punam R. Patil

[Computer Graphics & Multimedia]

Page 11

i) The device independence property is not met by every application. The given
application may not run equally well on wide variety of devices.
ii) Improper implementation or poor defination of a standard may lead to create
problems for users, who know nothing of the standard.
iii) Standards once defined may create difficulties in accomdating new needs. To avoid
this problem to some extend standards have to be made enough flexible to
accomdate new needs and conditions occurring due to the changing environment.
Need for Graphics Standards:
1. Now a days, improving technology and reducing costs have made graphics
affordable to more and more users. The growing popularity of the graphics created a
demand for standards to avoid duplication. It was also necessary to make
application programs portable to new machines and to built on work of others.
2. The standards govern the methods for connecting different grphics hardware to the
computer. It also deals with internal construction of the software.

4. Explain Bresenhams circle generation algorithm.


Answer:
1. The Bresenhams circle drawing algorithm considers the eight way symmetry of the
circle to generate it. It plots 1/8 th part of the circle, i.e. from 90 to 45, as shown in
figure as,

-Figure1: 1/8 part of circle2. As circle is drawn from 90 to 45, the x moves in positive direction and y moves in
the negative direction.

Ms. Punam R. Patil

[Computer Graphics & Multimedia]

Page 12

3. To achieve best approximation to the true circle we have to select those pixels in the
raster that fall the least distance from the true circle.
4. As in below figure, let us observe the 90 to 45portion of the circle. It can be noticed
that if points are generated from 90 to 45, each new point closest to the true circle
can be found by applying either of two options as,
i) Increment in positive x direction by one unit or
ii) Increment in positive x direction and negative y direction both by one unit

iii)
-Figure 2: Scan conversion with Bresenhams algorithm5. The distance of pixels A and B from the origin are as,

6. The distances of pixels A and B from the true circle are as,

7. To avoid square root term in derivation of decision variable i.e to simplify


computation and to make algorithm to more efficient the A and B are defined as,

from figure 2 observe that, A always positive and B is always negative.

Ms. Punam R. Patil

[Computer Graphics & Multimedia]

Page 13

8. Decision variable is di as,

And we say that di <0 i.e. A < B then only x is incremented; otherwise x is
incremented in positive direction and y is incremented in negative direction.
9. Therefore, we can write,

10. The equation for starting point i.e at x=0 and y=r can be as,

Also, equations for di+1 for both the cases as,

The remaining part of circle can be drawn by reflecting point about y-axis, x-axis and about
origin as shown below,

-Figure: Eight way symmetry of the circleMs. Punam R. Patil

[Computer Graphics & Multimedia]

Page 14

Therefore by adding seven more plot commands after the plot command, in the step 4 of
the algorithm, the circle can be plotted. The remaining seven plot commands are,

Algorithm:

5. Explain the working of CRT.


Answer:
CRT (Cathode Ray Tube):
Ms. Punam R. Patil

[Computer Graphics & Multimedia]

Page 15

1. CRT is one of the important output devices.


2. Figure below shows basic operation of CRT

Figure: Structure of CRT

Ms. Punam R. Patil

[Computer Graphics & Multimedia]

Page 16

Figure: Color CRT

Figure: Electron Gun in a Color CRT

BASIC OPERATION- A beam of electrons (i.e. cathode rays) is emitted by the


electron gun, it passes through focusing and deflection systems that direct the beam
towards the specified position on the phosphor screen. The phosphor then emits a
small spot of light at every position contacted by the electron beam. Since light
emitted by the phosphor fades very quickly some method is needed for maintaining
the screen picture. One of the simplest way to maintain pictures on the screen is to
redraw the image rapidly. This type of display is called Refresh CRT.
Primary components of CRT are as follows:-

Ms. Punam R. Patil

[Computer Graphics & Multimedia]

Page 17

1 HEATER ELEMENT AND CATHODE- Heat is supplied to the cathode by passing


current through heater element. Cathode is cylindrical metallic structure which is
rich in electrons. On heating the electrons are released from cathode surface.
2 CONTROL GRID- It is the next element which follows cathode. It almost covers
cathode leaving small opening for electrons to come out. Intensity of the electron
beam is controlled by setting voltage levels on the control grid. A high negative
cottage applied to the control grid will shut off the beam by repelling electrons and
stopping them from passing through the small hole at the end of control grid
structure. A smaller negative voltage on the control grid will simply decrease the
number of electrons passing through. Thus we can control the brightness of a
display by varying the voltage on the control grid.
3 ACCELERATING ANODE- They are positively charged anodes who accelerate the
electrons towards phosphor screen.
4 FOCUSING & DEFLECTION COILS- They are together needed to force the electron
beam to converge into a small spot as it strikes the screen otherwise the electrons
would repel each other and the beam would spread out as it approaches the screen.
Electrostatic focusing is commonly used in television and computer graphics
monitor.
5 PHOSPHOR COATING- When the accelerating electron beam (collides) is incident
on the phosphor cooling, a part of Kinetic Energy is converted into light and heat.
When the electrons in the beam collide with the phosphor coating they are stopped
and their kinetic energy is absorbed by the phosphor.

6. Explain any three input devices.


Answer:
Input devices:
Transforms data from the user into a form that a computer system can process together
with appropriate software (device drivers).
Examples of Input devices:
1. keyboard
2. scanner
3. mouse
Ms. Punam R. Patil

[Computer Graphics & Multimedia]

Page 18

4. microphone
5. joystick
6. Trackball
Keyboard:
1. The keyboard is a primary input device for any graphics system.
2. The keyboard is the most common input device for entering numeric and alphabetic
data in to a computer system by pressing a set of keys which are mounted on the
keyboard, which is connected to computer system.
3. It is used for entering text and numbers i.e. on graphics data associated with
pictures like x,y co-ordinates.
4. Figure: below diagram shows how keyboard process performed,

5. Keyboards are available in various sizes,shapes and styles.


6. Figure: figure of keyboard is as shown below,

Ms. Punam R. Patil

[Computer Graphics & Multimedia]

Page 19

-Figure: Keyboard5. It consist of,


i) Alphanumeric keys: - letters and numbers.
ii) Function keys
iii) Modifier keys
iv) Numeric keypad
v) Cursor movement keys
vi) Punctuation keys: - comma, period, semicolon, and so on.
6. When we press a key on the keyboard,keyboard controller places a code
corresponding to key pressed into a part of its memory called as keyboard buffer.
This code is called as scan code. The keyboard controller informs CPU of the
computer about the key press with the help of an interrupt signal. The CPU then
reads the scan code from keyboard buffer.
Trackball:
1. It is one of the input devices.
2. The trackball is a two dimensional positioning device wheras spaceball provides six
degree of freedom.
3. It does not actually move. It consist of strain guages which measure the amount of
pressure applied to the spaceball to provide input for spatial positioning and
orientation as the ball is pushed or pulled in various directions.
4. It is usually used in three dimentional positioning and selecting operations in
virtual-reality systems.

Ms. Punam R. Patil

[Computer Graphics & Multimedia]

Page 20

5. Figure:

- Figure: Trackball-

Mouse:
1. It is one of the input devices.
2. Mouse is a palm sized box used to position the screen cursor.
3. It consists of ball on the bottom connected to wheels or rollers to provide the
amount and direction of movement.
4. One, two or three buttons are usually included on the top of mouse for signalling the
execution of some portion.
5. Now a days mouse consists of one more wheel on the top to scroll the screen pages.
6. Figure:

7. As shown in above figure, mouse pointer is an on-screen object. It can be used to

Select text
Access menu
Interact with programs, files or data that appear on the screen.

Ms. Punam R. Patil

[Computer Graphics & Multimedia]

Page 21

7. Differentiate between vector scan and raster scan display.


Answer:
Vector scan display

Raster scan display

1. In vector scan display the beam


is moved between the end
points of the graphics
primitives.

1. In raster scan display the beam


is moved all over the screen one
scan line at a time, from top to
bottom and then back to top.

2. Scan conversion is not required.

2. Graphics primitives are


specified in terms of their
endpoints and must be scan
converted into their
corresponding pixels in the
frame buffer.

3. Vector displays flickers when


the number of primitives in the
buffer becomes too large.

3. In raster display, the refresh


process is independent of the
complexity of the image.

4. Scan conversion hardware is not


required.

4. Because each primitive must be


scan converted, real time
dynamics is far more
computational and requires
separate scan conversion
hardware.

5. Cost is more.

5. Cost is low.

6. Vector displays draws a


continuous and smooth lines.

6. Raster display can display


mathematically smooth lines.

7. Vector display only draws a line


and characters.

7. Raster display has ability to


display areas filled with solid
colors or patterns.

8. Figure:

Ms. Punam R. Patil

[Computer Graphics & Multimedia]

Page 22

8. List and explain various character generation methods in brief.


Answer:
There are mainly three types of methods for character generations are,
1. Stroke Method
2. Starburst Method
3. Bitmap Method
Stroke Method:
This method uses small line segments to generate a character.
The small series of line segments are drawn like a strokes of a pen to form a
character
Line drawing algorithm used to generate line segments.
Figure:

Figure: Stroke method for Character A generation


Ms. Punam R. Patil

[Computer Graphics & Multimedia]

Page 23

Starburst Method:
In this method, fix pattern of line segments are used to generate characters.
As shown in figure, there are 24 line segment, segments required to display for
particular character are highlighted.
In this method , the Data stored in 24 bit code format.

Figure: Starburst method


Figure below shows starburst pattern for character A and M,

Figure: Starburst pattern for character A and M


Ms. Punam R. Patil

[Computer Graphics & Multimedia]

Page 24

A=> 0011 0000 0011 1100 1110 0001


M=> 0000 0011 0000 1100 1111 0011
Pattern for particular character are stored in the form of 24 bit code, each bit
representing one line segment. The bit is set to one to highlight the line segment
otherwise it is set to zero
Disadvantages:
1. more memory required
2. character quality poor
Bitmap Method:
This method also called dot matrix because characters are represented by an array
of dots in the matrix form.
5 x 7 array commonly used to represent character as shown in figure below,

-Figure: Bitmap method 7 x 9 and 9 x 13 arrays also used.


Higher resolution devices such as laser printer or inject printer, may use character
arrays that are over 100 x 100.
Each dot in the matrix is a pixel.
Character is placed on the screen by copying pixel values from the character array
into some portion of the screens frame buffer.
Value of pixel controls the intensity of the pixel.

Ms. Punam R. Patil

[Computer Graphics & Multimedia]

Page 25

9. Explain concept of color video monitors which define beam penetration and
shadow mask technique.
Answer:

Beam penetration technique:


1. This technique is used in Random Scan Monitors.
2. In this technique, the inside of CRT is coated with two layers of phosphor, usually
red & green.
3. The displayed color depends on how far the electron beam penetrates into the
phosphor layers.
4. The outer layer is of red phosphor and inner layer is of green phosphor.
5. A beam of slow electrons excites only the outer red layer.
6. A beam of fast electrons penetrates the outer red layer and excites the inner green
layer.
7. At intermediate beam speeds, combinations of red and green light are emitted and
two additional colors orange and yellow are displayed.
8. The beam acceleration voltage controls the speed of the electrons and hence the
screen color at any point on the screen.
Merits:
1. It is at half cost of shadow mask and its resolution is better.
Demerits:
1. It is an expensive technique to produce in random scan monitors.
2. It can display only four colors.
3. The quality of picture produced by this technique is not as good as compared to
other techniques.
Ms. Punam R. Patil

[Computer Graphics & Multimedia]

Page 26

Shadow mask technique:


1. The shadow mask technique produces a much wider range of colors than the beam
penetration technique.
2. Hence this technique is commonly used in raster scan displays including color T.V.
3. In shadow mask technique, the CRT screen has three phosphor color dots at each
pixel position. One phosphor dot emits red light, another emits a green light and the
third one emits a blue light.
4. The CRT has three electron guns one for each dot, a shadow mask grid just behind
the phosphor coated screen.
5. Figure:

OR

Ms. Punam R. Patil

[Computer Graphics & Multimedia]

Page 27

6. The shadow mask grid consists of series of holes aligned with the phosphor dot
patterns.
7. As shown in figure, the three electron beams are deflected and focused as a group
onto the shadow mask and when they pass through a hole onto a shadow mask they
excite a dot triangle.
8. A dot triangle consists of 3 small phosphor dots of red, green and blue color. These
phosphor dots are arranged so that each electron beam can activate only its
corresponding color dot when it passes through the shadow mask.
9. A dot triangle when activated appears as a small dot on the screen which has color
combination of three small dots in the dot triangle.
10. By varying the intensity of the three electron beams we can obtain different colors
in the shadow mask CRT.

Ms. Punam R. Patil

[Computer Graphics & Multimedia]

Page 28

Das könnte Ihnen auch gefallen