Chapter 1n2 - Computer Graphics - New
Chapter 1n2 - Computer Graphics - New
Chapter 1
1.0 Introduction:
Computer graphics is one of the most exciting and rapidly growing computer fields. The computer graphics field
is related to the generation of graphics using computers. It includes the creation, Storage, and manipulation of
image objects. These objects come from diverse fields such as physical, mathematical, engineering,
architectural, abstract structures and natural phenomenon. Computer graphics today is largely interactive that
is, the user controls the contents, structure, and appearance of images of the objects by using input devices.
Such as a keyboard, mouse, or touch sensitive panel on the screen.
Until 1980’s computer graphics was a small specialized field, largely because the hardware was
expensive and graphics-based application programs that were easy to use and cost-effective were few. Then,
PC (Personal computers) with build in raster graphics displays such as the Xerox Star Apple Macintosh and
IBM PC-popularized the use of bitmap graphics for users computer interactions. A bitmap is ones (1) and zeros
(0) representation of the rectangular array points on the screen. Each point is called Pixel or Pel (shortened
forms of Picture Elements). Once bitmap graphics became affordable, an explosion of easy to use and
inexpensive graphics based applications soon followed. Graphics-based user interfaces allowed millions of new
users to control simple, low-cost application programs, such as word processors, spreadsheets, and drawing
programs.
The concept of a “desktop” now became a popular metaphor for organizing screen space. By means of
a window manager, the user could create, position, and resize rectangular screen areas called windows. This
allows user to switch among multiple activities just by pointing and clicking at the desired window, typically with
a mouse. Besides windows, icons which represent data files, application program, file cabinets, mailboxes,
printers, recycle bin, and so on, made the user computer interaction more effective. By pointing and clicking
icons, user could activate the corresponding programs or objectives, which replace much of the typing of the
commands, used in earlier operating systems and computer applications. Today, almost all interactive
application programs, even those for manipulating text (e.g. word processor) or numerical data (e.g.
spreadsheet programs) use graphics extensively in the user interface and for visualizing and manipulating the
application-specified objects.
Even people who do not use computers encounter computer graphics in TV commercial and cinematic
special effects. Thus computer graphics is an integral part of all computer user interfaces, and is indispensable
for visualizing 2D, 3D objects in almost all areas such as education, science, engineering, medicine, commerce,
the military, research, advertising and entertainment. The theme is that learning how to program and use
computers now includes learning how to use simple 2D graphics.
At the same time, it was becoming clear to computer, automobile, and aerospace manufactures that CAD
(Computer-Aided Design) and CAM (Computer-Aided Manufacturing) activities had enormous potential for
automating drafting and other drawing-intensive activities. The General Motors DAC system for automobile
designs and the Itek-Digitek System for lens designs were pioneering efforts that showed the utility of graphical
1
Milan Chikanbanjar Computer Department Computer Graphics
interaction in the iterative design cycles common in engineering. By the mid-60s, a number of commercial
products using these systems had appeared.
At that time only the most technology-intensive organizations could use the interactive computer
graphics whereas others used punch cards, a non-interactive system.
1. User Interface.
Most applications have user interfaces that rely on desktop window systems to manage multiple simultaneous
activities, and on point-and-click facilities to allow user to select menu items, icons, and objects on the screen.
These activities fall under computer graphics. Typing is necessary only input text to be stored and manipulated.
For example Word processor, Spreadsheet, and desktop-publishing programs are the typical examples where
user-interface techniques are implemented.
2. Plotting
Plotting 2D, 3D graphics of mathematical, physical and economics functions use computer graphics
extensively. The histogram, bar, and pi-chart; the task-scheduling charts are the most commonly used plotting.
These all are used to present meaningful and concisely the trends and patterns of complex data.
6. Simulation
Simulation is the imitation of the conditions like those, which is encountered in real life. Simulation thus helps to
learn or feel the conditions; one might have to face in near future without being danger at the beginning of the
course. For example, astronauts can exercise the feeling of weightlessness in a simulator. Similarly a pilot
training can be conducted in a flight simulator. The military tank simulator, the naval simulator, driving simulator,
2
Milan Chikanbanjar Computer Department Computer Graphics
air traffic control simulator, heavy duty vehicle, and so on are some of the mostly used simulator in practice.
Simulators are also used to optimize the system. For example the vehicle, observing the reaction of the driver
during the operation of the simulator.
7. Entertainment
Disney movies such as Lion Kings and The Beauty and the Best, and other scientific movies like Star Trek, are
the best examples of the application of computer graphics in the field of entertainment. Instead of drawing
necessary frames with slightly changing scenes for the production of cartoon film, only the key frames are
sufficient for such cartoon-film where in-between frames are interpolated by the graphics system dramatically
decreasing the cost of production while maintaining the quality. Computer and video games such as Fifa,
Formula-1, Superbike, and Moto are few to name where computer graphics is used extensively.
9. Cartography
Cartography is a subject, which deals with making map and charts. Computer graphics is used to produce both
accurate and schematic representations of geographical and other natural phenomenon from measurement
data. Example includes geographic maps, oceanographic charts, weather maps, contour maps and population-
density maps. Surfer is one such graphics packages, which is extensively used for cartography.
Image Processing
• Computer graphics is used to create a picture while image processing is used to modify or interpret existing
pictures such as photographs and TV Scans. Two principle use in image processing are
1. improving picture quality
2. machine perception of visual information as used in robotics
• In image processing photograph is first digitize into an image file and then the rearrangement picture parts, to
enhance color separations or to improve the quality of shading.
• In medical application image processing is used to enhance the photograph for example “tomography” and
simulation operation. Tomography is a technique of X-ray photography that allows cross sectional views of
physiology system to be displayed.
3
Milan Chikanbanjar Computer Department Computer Graphics
Chapter 2
4
Milan Chikanbanjar Computer Department Computer Graphics
A. Mechanical Mouse
When a roller in the base of this mechanical
mechanical mouse is moved, a pair of orthogonally arranged toothed
tooth
wheels, each placed in between a LED and a photo detector, interrupts the light path. An optical
detector counts the pulses. These pulses generated in the horizontal and vertical directions move
m the
cursor on the screen. Hence, the numbers of interrupts so generated are used to report the mouse
movements to the computer.
Fig: a Fig: b
Fig: a and b showing cross-sectional
cross view of optical mouse
Advantages of optical mouse:
1. The cursor moves smoothly.
2. There are no moving parts; so there is less chance of failure.
3. No mechanical problem due to dusts, etc.
3. Light pen:
A light pen is a pencil shaped device and has a chord at the trailing end. It is a computer input device in
the form of a light-sensitive
sensitive wand used in conjunction with the computer's CRT monitor. It lets the user select
sele
screen position by detecting the light coming from point in the CRT screen. It also allows the user to point to
displayed objects, or draw on the screen, in a similar way to a touch screen but with greater positional
accuracy. They are sensitive to short
short bursts of light emitted from the phosphor coating at the instant electron
beam strikes a particular point. An activated light pen pointed at a spot on a screen as the electron beam lights
up the spot, generates an electrical pulse that causes the coordinate
coordinate position of the electron beam to be
recorded. The light pen when pointed to the screen detects the bright/dim effect and when light goes from dim
to light, it sends a signal pulse to the video chip. The video chip sets a latch which feeds two numbers: X-
location, Y-location
location into a memory location and can tell where the light pen is pointed on the screen by two
numbers. A light pen can work with any CRT-based
CRT based monitor, but not with LCD screens, projectors and other
display devices.
5
Milan Chikanbanjar Computer Department Computer Graphics
Drawbacks:
• Prolong use of the light pen can cause arm fatigue.
• It gives sometimes false reading due to background lightning in a room
• It cannot report the coordinates of a point that is completely black as a remedy one can display a dark
blue field in place of the regular image for a single frame time.
time
• Light pen obscures
scures the screen images as it is pointed to required spot.
• When a light pen is pointed at the screen, part of the screen image is obscured by the hand and pen
and prolonged use of the light pen can cause arm fatigue.
• It requires special implementations forfor some applications because they cannot detect positions within
black areas.
4. Touch Panel:
Touch panel allows the user to directly point to the screen with the touch of the finger to move the cursor or to
select the menu item. Its application is in processing
processing of options where graphical icons are given. The touch
input can be recorded using optical, electrical or acoustical methods. There are three kinds of touch panels:
a) Optical Touch Panel
b) Electrical Touch Panel
c) Acoustic Touch Panel
6
Milan Chikanbanjar Computer Department Computer Graphics
7
Milan Chikanbanjar Computer Department Computer Graphics
Electrical Tablet:
A grid of wires on ¼ to ½ inch
ch center is embedded in the tablet surface, and electromagnetic signals generated
by the electric pulses applied in the sequence to the wire in the grid induce electrical signals in a wire coil in the
stylus (or puck). The strength of the signal induced by
by each pulse is used to determine the position of the stylus.
The signal strength is also used to determine roughly how far the stylus is from the tablet. When the stylus is
within ½ inch from the tablet, it is taken as “near” otherwise it is either “far” or “touching”. When the stylus is
“near” or “touching”, a cursor is usually shown on the display to provide visual feedback to the user. A signal is
sent to the computer when the tip of the stylus is pressed against the tablet, or when any button on the puckpu is
pressed. The information provided by the tablet repeats 30 to 60 times per second.
Sonic Tablet
The sonic tablet use sound waves to couple the stylus to microphones positioned on the periphery of the
digitizing area. An electric spark at the tip of the stylus creates sound bursts. The position of the stylus or
coordinate value s is calculated using the
the delay between when the spark occurs and when its sound arrives at
each microphone. The main advantage of sonic tablet is that it doesn’t require the dedicated working area for
the microphone can placed on any surface from the “tablet” work area. These facilitat
f ates digitizing drawing on
thick books, because in an electrical tablet this is not convenient for the stylus cannot get closer to the tablet
surface.
Resistive Tablet
The resistive tablet consists of a piece of glass coated with thin layer of conducting material. When a battery-
battery
powered stylus is activated at certain position, it emits high frequency radio signals, which induce the radio
signal on the conducting layers. The strength of the signal received at the edges of the tablet is used to
calculate the position of the stylus.
When the stylus is activated at certain point, it emits high frequency radio signal which induces radio signal into
the conducting layer. The strength of the signal at the edges of the tablet determines the position of the stylus.
Several types of tablets are transparent and thus can be backlit for digitizing x-rays
x rays film and photographic
negatives, the resistive tablet can be used to digitize the objects on CRT because it can be curved to the shape
of the CRT. The mechanism of sonic tablet or electrical tablets can be used to digitize the 3D objects, while the
resistive tablets can be used to digitize on CRT because it can be curved to shape of the CRT.
8
Milan Chikanbanjar Computer Department Computer Graphics
A 640 pixels by 480 lines is an example of medium resolution raster display. A 1600 by 1200 is a high
resolution one. A pixel in a frame buffer may be represented by one bit as in monochromatic system where
8
each pixel on CRT screen is either ON '1' or OFF '0' or it may be represented by eight bits resulting 2 = 256
gray levels for continuous shades of gray on CRT screen.
screen. In color system, each of the three colors – red, green
24
and blue is represented by eight bits producing 2 = 16 million colors. A medium resolution color display having
640 x 480 pixels will thus require (640 x 480 x 24)/8 = 9 kb of RAM.
9
Milan Chikanbanjar Computer Department Computer Graphics
Advantages
• It has an ability
bility to fill the areas
area with solid colors or patterns.
• The time required for refreshing
efreshing is independent of complexity of an image
• Low cost
Disadvantages
• For Real-Time
Time dynamics not only the end points are required
r to move but all the pixels in between
be the
moved end points have to be scan converted with appropriate algorithms which might slow down the
dynamic process.
• Required special algorithm to move all pixels.
• Due to scan conversion "jaggies
jaggies" or "stair-casing" are unavoidable.
Video Controller:
It is a special purpose processor. It accesses the frame buffer to refresh the screen. It is given direct access to
the frame buffer memory. Some transformation such as enlargement, reduction, or movement from one location
to another can also be accomplished with the video controller. Some systems are designed to allow the video
controller to mix the frame buffer image with an input from television camera or other input device.
System Bus
Display
Display System
processor
Processor Memory
Display
Display Frame Video Monitor
Processor
Processor Buffer Controller
memory
memory
Figure: Raster Display Architecture with Display Processor
10
Milan Chikanbanjar Computer Department Computer Graphics
It consists of a central processing unit (CPU), a display processor, a monitor, system memory and peripheral
devices such as mouse and keyboard. A display processor is also called a display processing unit (DPU), or
graphics controller.. The application program
pro and graphics subroutine package both reside in the system
memory, and execute on CPU. A graphics subroutine packages create a display list, and stores in the system
memory. A display list contains point and line plotting commands with end point coordinates
coordi as well as
character plotting commands. The DPU interprets the commands in the display list and plots the respective
output primitives such as point, line and characters. As a matter of fact, the DPU sends digital point coordinates
to a vector generator
tor that converts the digital coordinate values to analog voltage for circuits that display an
electron beam hitting on the CRT’s phosphor coating. Therefore the beam is deflected from endpoint to
endpoint, as dictated by the arbitrary order of the commands
commands in the display list, hence the name Random Scan
Display.. Since the light output of the phosphor decays in tens or at most hundreds of microseconds, the DPU
must cycle through the display list to refresh the image around 50 times per second to avoid flicker.
flick A portion of
the system memory where the display list is resided is called a refresh buffer. This display technology is used
with monochromatic CRTs, or beam-penetration
penetration color CRTs.
Advantages:
1. It can produce a smooth output primitive with higher resolution
resolution unlike the raster display technology.
2. It is better than raster display for real time dynamics such as animation.
3. For transformation, only the endpoints has to be moved to the new position in vector display, but in raster
display it is necessary to move those endpoints, and at the same time all the pixels between the endpoints
must be scan-converted
converted using appropriate algorithm, no prior information on pixels can be reused.
Disadvantage:
1. A vector display cannot
not fill areas with patterns, and manipulate bits.
2. Time required for refreshing an image depends upon its complexity (more the lines, longer the time), the
flicker may therefore appear as the complexity of the image increases. The fastest vector display can draw
about 100,000 short vectors in a refresh cycle without flickering.
11
Milan Chikanbanjar Computer Department Computer Graphics
Display device
1. Fluorescence / Phosphorescence
When electron beam strikes phosphor coated screen, the individual electron is moving with kinetic energy that
is proportional to the acceleration voltage. Some of this energy is dissipated as heat and the rest of the energy
is transferred to the electrons of phosphor atom, making them jump to higher quantum energy levels. In
returning to their previous quantum levels the excited electrons give up their extra energy in the
th form of light,
predicated by quantum theory. Any given phosphor has several quantum levels to which electrons can be
excited each corresponding to a color associated with return to an unexcited state. Further, the t electrons at
some levels are less stable and turn in an unexcited state more rapidly than others.. A phosphor’s fluorescence
is the light emitted as these
hese very unstable electrons lose
lose their excess energy while the phosphor is being struck
by electrons. Phosphorescence is the light given off by the the return of the relatively more unstable excited
electrons to their unexcited state once the electron beam excitation is removed. Since fluorescence
f usually last
just a fraction of a microsecond, most of the light emitted is phosphorescence for a given phosphor.
pho
2. Persistence
A phosphor’s persistence is defined as the time from the removal of excitation to the moment when
phosphorescence has decayed to 10% of the initial light output. The range of persistence of different phosphors
can reach many seconds. The he phosphors used for graphics display devices usually have persistence of 10 to
60 microseconds. A phosphor with low persistence is useful for animation; a high persistence phosphor is
useful for highly complex, static pictures.
3. Refresh Rate
The refresh rate is the number of times per second the image is redrawn to give a feeling of un-flickering
un
pictures, and it is usually 50 per second. 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
flickering and fuse into a steady image is called critical fusion frequency (CFF).
The factors affecting the CFF are:
• Persistence: longer the persistence the lower the CFF, but the relation between the CFF and persistence is
non linear.
• Image intensity: increasing the image intensity increase the CFF with nonlinear relationship.
• Ambient room light: Decreasing the ambient room light increase the CFF with nonlinear relationship.
• Wavelengths of emitted light
• Observer
5. Resolution
Resolution is defined as the maximum number of points that can be displayed horizontally and vertically without
overlap on display device. Factors affecting the resolution are follows.
Fig. b
• Intensity: as the intensity of the electron beam increases, the spot size on display tends to increase because
of spreading of energy beyond the point of bombardment. This phenomenon is also known as blooming.
Consequently the resolution decreases.
Thus it is noted that resolution is not necessarily
necessarily a constant, and it is not necessarily equal to the resolution of a
pixmap which is allocated in buffer memory.
12
Milan Chikanbanjar Computer Department Computer Graphics
1. Monochromatic CRT
The electron gun emits a stream of electrons that is accelerated towards the phosphor coated screen by a high
positive voltage applied inner side of the tube near the screen. The electrons are forced into a narrow beam by
the focusing mechanism and directed towards a particular point on screen by the deflection mechanism. The
mechanism may be electrostatic or magnetic. When electron hit the screen the phosphor emits visible light and
then the phosphor’s light output decays exponentially with time. The entire picture must be refreshed (redrawn)
many times per-second so that the viewer sees an un-flickering pictures.
The stream of electrons from the heated cathode is accelerated towards the phosphor coated screen by a high
voltage 15,000 to 20,000 volts. The control grid voltage determines how many electrons are actually in the
electron beam. More negative the control grid voltage, fewer the electrons that pass through the grid. Since the
light output of the phosphor depends upon the number of electrons in the beam the brightness of the screen is
therefore controlled by varying the grid voltage.
Since electrons in electron-beam repel to each other and tends to diverge. The focusing mechanism employs
an electron lens (electrostatic or magnetic) to concentrate the electrons in thin beam, and converge to thin small
point when it hits phosphor coating. The cross-sectional electron density of the beam is Gaussian (normal) and
the intensity spot on the phosphor has the same distribution as shown in fig. typically spots size of high
resolution monochrome CRT is 0.005 inches.
13
Milan Chikanbanjar Computer Department Computer Graphics
triad, depending on how strongly each individual phosphor dot is a triad is excited. There are two types of color
CRTs.
b) Non-Emissive Display: It uses optical effects to converts sunlight or other light sources into graphical
patterns. E.g.: LCD
15
Milan Chikanbanjar Computer Department Computer Graphics
1. Polarizing
larizing filter film with a vertical axis to polarize light as it enters.
2. Glass substrate with electrodes with vertical ridges.
3. Twisted nematic liquid crystal.
4. Glass substrate with common electrode film with horizontal ridges to line up with the horizontal
horizont filter.
5. Polarizing filter film with a horizontal axis to block/pass light.
6. Reflective surface to send light back to viewer.
In a LCD display each pixel acts as a switch, they don’t emit any light. Instead there is a white back lighting.
This light passes through the liquid crystal then through color filter. The liquid crystal solution is trapped
between two polarized glasses. Each sub-pixel
sub pixel is controlled electrically and thus more or less light is allowed to
pass through the crystal, then through the polarized glass on to the display surface. Controlled red, green, and
blue shades are thus emitted.
In addition, LCD display panels do not emit harmful electromagnetic radiation. To top-up
top this whole pro list,
some of the latest LCD panels have
ve a rated lifetime of around 100,000hrs of use!
LCD displays have their drawbacks as well. In particular, viewing angle and display response time may be
nd
issues of concern especially with LCD panels from 2 tier display manufactures. And price may also be b an
issue especially as one moves towards the larger screen sizes in excess of 50-inch
50 inch diagonal - this apart from
the high price tag associated with the latest LED LCD HDTV sets.
1. Active Matrix
Place transistor at each pixel location using thin film transistor
transistor (TFT) technology. Transistors are used to
control voltage at each pixel location and prevent the charge from gradually leaving out of the liquid crystal
cells.
2. Passive Matrix
Refresh buffer stores picture definition. The screen is refreshed at 60 frames per seconds. Color can be
displayed by using different material or dyes and by placing a triad of pixels at each screen location.
16