Computer Graphics: Unit-I A Survey of Computer Graphics: Overview of Graphics Systems: Video
Computer Graphics: Unit-I A Survey of Computer Graphics: Overview of Graphics Systems: Video
Computer Graphics: Unit-I A Survey of Computer Graphics: Overview of Graphics Systems: Video
UNIT-I
A Survey of Computer Graphics: Overview of graphics systems: Video-
Display Devices, Raster-scan Systems, Random-scan Systems, Graphics
Monitors and Work stations, Input devices, Hardcopy Devices and Graphics
Software.
UNIT-II
Output Primitives: Points and lines, Line drawing algorithms- DDA,
Bresenhams line algorithm, Circle generation algorithm and Ellipse
Generating algorithms.
UNIT-III
2-DGeometrical transforms: Basic Transformations, Matrix
representations and Homogeneous coordinates, Composite transforms,
Other Transformations, Transformations between coordinate systems.
UNIT-IV
2-D Viewing: Definition of view port, clipping and window. The Viewing Pipeline,
Viewing coordinate reference frame, Window to View-port coordinate
transformation, 2D Viewing functions, Clipping Operation, Point Clipping, Line
Clipping: Cohen-Sutherland and Liang -Barsky line clipping algorithms, Polygon
Clipping: Sutherland– Hodgeman polygon clipping algorithm.
UNIT-V
3-D Geometric and Modeling Transformations: Translation, Rotation, Scaling,
other Transformations, Composite Transformations.
UNIT-VI
3-D viewing: Viewing Pipeline, Viewing coordinates, Projections. Computer
Animation: Design of Animation Sequence, General Computer Animation
functions, Raster Animation, Computer Animation Languages, Key-Frame
systems, Motion Specifications.
TEXT BOOKS:
Computer Graphics C version‖, Donald Hearn and M. Pauline Baker, Pearson
education.
Introduction to Computer Graphics
Computer is a information processing machine. It is a tool for storing and
manipulating the data.
There are many ways to communicate the processed information to the user
The computer graphics is one of the most effective and commonly used way
to communicate the processed information to the user.
Computer graphics displays the information in the form of graphics objects
such as pictures, charts, graphs and diagrams instead of simple text.
Thus we can say that computer graphics makes it possible to express data in
pictorial form .
Now a days almost every computer can do some graphics and people also
expect to control their computer through icons and pictures rather than
typing commands.
Drawing pictures on computer is called rendering.
Pictures or graphics objects are presented as a collection of picture
elements called pixels.
Pixel is the smallest graphical unit represented on the computer screen.
Each pixel on the graphics display does not represent mathematical point.
Rather, it represents a region which theoretically can contain an infinite
number of points.
For Example, if we want to display point p1 whose coordinates are (4.2,3.8)
and point p2 whose coordinates are (4.8,3.1) then p1 and p2 are
represented by only one pixel(4,3)
Note: In general , a point is represented by the integer part of x and integer part of y,
i,.e. pixel(int(x),int(y)).
The process of determining the appropriate pixels for representing picture or
graphics object known as rasterization.
Example: The video game controller of the ping pong game. This helps to
signal his request to the computer, on receiving signals from the input
commands.
Non Interactive Computer Graphics
In this the user does not have any kind of control over the image.
Image is merely the product of static stored program and will work
according to the instructions given in the program linearly.
When the beam hits the screen, the phosphor emits a small spot of light at
each position contacted by the electron beam
Since light is 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 CRT.
Apart from CRT there are two more ways to display an object on the screen
1. raster scan
2. Random scan
Raster scan
In raster scan system the electron beam is swept across the screen one row
at a time from top to bottom.
As the electron beam moves across each row, the beam intensity is turned on
and off to create a pattern of illuminated spots.
At the end of each scan line, the electron beam returns to the left side of the screen
to begin displaying the next scan line.
The return to the left of screen after refresh of each scan line is known as horizontal
retrace of electron beam.
At the end of each frame electron beam returns to top left corner and begins the next
frame is called vertical retrace.
Intensity range for pixel positions depends on the capability of raster scan system. It
can be a simple black and white system or color system.
In a simple black and white system, each pixel position is either ON or OFF, so only a
bit for pixel is needed to control the intensity of the pixel positions. This frame buffer
is called bitmap.
In a color system , each pixel requires multiple bits to control the intensity of
pixel positions. This frame buffer is called Pixmap.
Advantages:
1. Real life images with different shades can be displayed.
2. Millions of different colors are generated.
Dis advantages:
3. Low Resolution
4. More memory is required.
5. Expensive
6. Electron beam directed to the entire screen not only to the part of the
screen where the picture is to be drawn
Random scan(Vector scan)
In this technique, the electron beam is directed only to the part of the screen
where the picture is to be drawn rather than scanning from left to right and
top to bottom as in raster scan. It is also called vector display, stroke-writing
display, or calligraphic display.
Picture definition is stored as a set of line-drawing commands in an area of
memory referred to as the refresh display file. To display a specified picture,
the system cycles through the set of commands in the display file, drawing
each component line in turn. After all the line-drawing commands are
processed, the system cycles back to the first line command in the list.
Dis Advantages:
1. I can’t display realistic shaded image.
Color CRT Monitors
There are two basic techniques used for producing color displays.
1. Beam-penetration technique
2. Shadow-mask technique
Beam-penetration method
The Beam-Penetration method has been used with random-scan monitors.
In this method, the CRT screen is coated with two layers of phosphor, red and
green, The outer layer is of red phosphor and inner layer is of green
phosphor.
The displayed color depends on how far the electron beam penetrates the
phosphor layers
A beam of slow electrons excites the outer red layer only; hence screen
shows red color only. A beam of high-speed electrons excites the inner green
layer. Thus screen shows a green color.
Advantages
Less expensive
Disadvantages
Quality of images are not good as comparable with other methods
Four colors are allowed only
Shadow-mask Technique
Shadow-mask methods are commonly used in rasterscan systems (including
color TV) because they produce a much wider range of colors than the beam-
penetration method.
A shadow-mask CRT has three phosphor color dots at each pixel position.
One phosphor dot emits a red light, another emits a green light, and the third
emits a blue light.
This type of CRT has three electron guns, one for each color dot, and a
shadow-mask grid just behind the phosphor-coated screen
A white (or gray) area is the result of activating all three dots with equal
intensity. Yellow is produced with the green and red dots only, magenta is
produced with the blue and red dots, and cyan shows up when blue and
green are activated equally.
In some low-cost systems, the electron beam can only be set to on or off,
limiting displays to eight colors. More sophisticated systems can set
intermediate intensity levels for the electron beams, allowing several million
different colors to be generated.
Color CRTs in graphics systems are designed as RGB monitors. These monitors
use shadow-mask methods and take the intensity level for each electron gun
directly from the computer system without any intennediate processing.
High-quality raster-graphics systems have 24 bits per pixel in the frame
buffer, allowing 256 voltage settings for each electron gun and nearly 17
million color choices for each pixel.
An RGB color system with 24 bits of storage per pixel is generally referred to
as a full-color system or a true-color system.
Direct-view storage tubes (DVST)
An alternative method for maintaining a screen image is to store the picture
information inside the CRT instead of refreshing the screen.
Two electron guns are used in a DVST. One, the primary gun, is used to store
the picture pattern; the second, the flood gun, maintains the picture display.
Advantage of DVST:
Refreshing of CRT is not required.
Because no refreshing is needed, very complex pictures can be displayed at
very high resolutions without flicker.
Disadvantage of DVST
They do not display color and are available with single level of line intensity.
selected parts of a picture cannot he erased. To eliminate a picture section,
the entire screen must be erased and the modified picture redrawn. The
erasing and redrawing process can take several seconds for a complex
picture..
The performance of DVST is somewhat inferior to the refresh CRT.
Flat-Panel Displays
The term flat panel display refers to a class of video device that have reduced
volume, weight & power requirement compared to a CRT.
As flat panel display is thinner than CRTs, we can hang them on walls or wear
on our wrists.
A series of vertical conducting ribbons is placed on one glass panel and a set
of horizontal ribbon is built into the other glass panel.
Firing voltage is applied to a pair of horizontal and vertical conductors cause
the gas at the intersection of the two conductors to break down into glowing
plasma of electrons and ions.
Picture definition is stored in a refresh buffer and the firing voltages are
applied to refresh the pixel positions, 60 times per second.
Disadvantage:
One disadvantage of plasma panels is they were strictly monochromatic
device that means shows only one color other than black like black and white
Thin Film Electroluminescent Displays
It is similar to plasma panel display but region between the glass plates is filled
with phosphors such as zinc sulfide doped with magnesium instead of gas.
When sufficient voltage is applied the phosphors becomes a conductor in area of
intersection of the two electrodes.
Electrical energy is then absorbed by the manganese atoms which then release the
energy as a spot of light similar to the glowing plasma effect in plasma panel.
It requires more power than plasma panel.
In this good color and gray scale difficult to achieve.
Light Emitting Diode (LED)
In this display a matrix of multi-color light emitting diode is arranged to form
the pixel position in the display. And the picture definition is stored in refresh
buffer.
Information is read from the refresh buffer and converted to voltage levels
that are applied to the diodes to produce the light pattern on the display
Liquid Crystal Display (LCD)
It is generally used in small system such as calculator and portable laptop.
These devices produce a picture by passing polarized light from the
surroundings or from an internal light s o w through a liquid-crystal material
that can transmit the light.
LCD uses liquid crystal material between two glass plates each with light
polarizer at right angles to each other.
Rows of horizontal transparent conductors are built into one glass plate, and
column of vertical conductors are put into the other plates.
C P U S y s te m Video Monitor
M e m o ry C o n tr o lle r
S y s te m B u s
I/O Devices
System bus
I/O Devices
X Y
register register
Frame Buffer
Two registers are used to store the coordinates of the screen pixels which are
X and Y. Initially the X is set to 0 and Y is set to Ymax.
The value stored in frame buffer for this pixel is retrieved and used to set the
intensity of the CRT beam.
After this X register is incremented by one.This procedure is repeated till X
becomes equals to Xmax.
• Then X is set to 0 and Y is decremented by one pixel and repeat above
procedure.
• This whole procedure is repeated till Y is become equals to 0 and
complete the one refresh cycle. Then controller reset the register as top –left
corner i.e. X=0 and Y=Ymax and refresh process start for next refresh cycle.
• Since screen must be refreshed at the rate of 60 frames per second the
simple procedure illustrated in figure cannot be accommodated by typical
RAM chips.
Interlacing
A TV video signal is graphically interlaced, which means every full screen
of information is made up of two separate fields which include the odd
field and even field. First, the odd lines are printed on the graphics screen.
Then, the even lines are printed in between the odd lines before the odd
lines fade away. This all happens faster than any human eye can perceive.
In an interlaced monitor, the electron beam takes two passes
to form a complete image: it skips every other row on the first
pass, and then goes back and fills in the missing rows. A non-
interlaced monitor does the whole job in one pass, tracing
each row consecutively. Interlaced monitors are easier to build
and therefore cheaper, but as you can guess-they aren't as
good as non-interlaced monitors. The problem is that all
things being equal, it takes twice as long to create the
complete screen image on an interlaced monitor. That's long
enough to spoil the illusion that you're looking at a steady
picture, and the image on the screen flickers annoyingly.