We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
You are on page 1/ 16
GRAPHIC SYSTEM
1
UNIT: 2
GRAPHICS SYSTEMS
2.1 Video Display Devices
2.2 Raster Scan and Random Scan Display
2.3 Raster Graphics and Vector Graphics
2.4 Concepts of Various Objects: Point, Line,
Circle, Eclipse and Polygon Exercise2 GRAPHIC SYSTEM
2 Graphics Systems
2.1 Video Display Devices
The primary output device in a graphics system is a video monitor. The Operation of
most video monitors is based on the standard cathode-ray tube (CRT) design, but several
other technologies exist and solid-state monitors may eventually predominate. The
monitors which are associated with a key board for manual input of characters and display
the information as it is keyed in.
2.1.1 Refresh CRT
Figure 2.1 illustrates the basic
operation of a CRT. A beam of
electrons (cathode rays) is emitted by
an electron gun. Then it passes
through focusing and deflection
systems that direct the beam toward
specified positions on the phosphor-
coated screen. The phosphor then
emits a small spot of light at each
position contacted by the electron
beam. Because the light emitted by the
phosphor fades very rapidly, some method is needed for maintaining the screen
One way to keep the phosphor glowing is to redraw the picture repeatedly by quickly
directing the electron beam back over the same points. This type of display is called a
refresh CRT.
jure.
The main components in the electron gun are metal cathodes and control grid.
Cathode is used to emitting electrons. Control Grid is used to control intensity of electron
beam.
There is a small hole at the end of control grid. If high negative voltage is applied to
the grid, then beam will not be able to pass through the hole. If small negative voltage Is
applied then number of electrons in beam will decrease so amount of light emitted will
tess, because it depends on the number of electrons striking the screen, So we can control
the brightness of a display by varying the voltage on the control grid.
___ Focusing system is used to force electron beam to converge in to small spot as it
“rkes the phosphor, otherwise beam will spread out. The distance to be traveled by the
eee
Jump2Learn Publication [www.Jump2learn.com]
|GRAPHIC SYSTEM
13
electron beam varies for the different points on the screen,
focused property at center of screen. As beam moves towards
blurred. So for that deflection system is used,
Thus electron beam can be
outer edges, images become
There are many types of phosphors in different persistence are available. ie. how
long they continue to emit light after CRT beam is removed.
Fig: 2.2 Electrostatic Deflection of the olectron beam in a CRT
|
a
eater —] a
Cutode
Cosel Gid (G1)
Screen Gid (G2) BV Sennen
Foout Gia (63;
L: |
Persistent
It is defined as the tim:
takes for the light to decrease its intensity to one tenth of
its original intensity. For ego if a dot emits SO units of light and after 2 seconds, it decreases
to 5 units (50/10), thus persistence is 2 sec. if persistenc
is higher.
lower, the refresh rate required
Flicker
When an image keeps flashing continuously on screen it is known as
Fluorescence
The glowing of phosphor when an electron strike is known as fluorescence.
Resolution
The maximum no of points that can be displayed without overlap is refers as resolution. The
precise definition of resolution is: the no of points per centimeter that can be plotted
horizontally and vertically. For certain higher quality systems resolution of 1280 X 1024 is
used which is known as High Definition Systems.
Jump2Learn Publication [www.Jump2learn.com)14 GRAPHIC SYSTEM
ee _h ee sw
Aspect Ratio
The ration of vertical points to horizontal points necessary to produce equal length lines js
called aspect ratio. For e.g. aspect ratio of 3/4 means vertical line plotted with 3 points on
screen has same length as horizontal line plotted with 4 points.
2.1.2 Color CRT
‘A color CRT monitor displays color picture by using a combination of phosphors that
emit different colored light. By combining the emitted light, a range of colors can be
generated.
‘Two basic methods for producing color displays are:
Beam Penetration Method
Random scan monitors use the beam penetration method for displaying color
picture. In this, the inside of CRT screen is coated two layers of phosphor namely red and
green. A beam of slow electrons excites only the outer red layer, while a beam of fast
electrons penetrates red layer and excites the inner green layer. At intermediate beam
speeds, combinations of red and green light are emitted to show two additional colors-
orange and yellow.
Advantages
Less expensive
Disadvantages
Quality of images is not as good as
comparable with other methods Four colors are
allowed only
Shadow Mask Method
Raster scan system are use shadow mask
methods to produce a much more range of colors
Fig: 2.3 Shadow Masking
than be
= beam penetration method. In this, CRT has three phosphor color dots. One phosphor
ae ed light, second emits a green light and third emits a blue light. This type of CRT
(¢¢ electrons guns and a shadow mask grid as shown in figure besides:
Jump2Learn Publication [www.jump2learn.com]GRAPHIC SYSTEM
15
shadow mask they activate dot triangle of 3 color:
see depend on the amount of excitation of red, gr
S as shown in fig: 2.3: The colors we can
feen and blue phosphor. A white area is a
result of all three dots with equal intensity while yell
andsoont low is produced with green and red dots
Advantages
Produce realisti
rages:
Produce different colors
Shadows scenes
Disadvantages
Low resolution
Expensive
Electron beam directed to whole screen
Full Color System
Color CRTs in graphics systems are designed as RGB monitors. These monitors use
shadow mask method and take the intensity level for each gun. A RGB color system with 34
bits of storage per pixel is known as full color system or true color system.
2.1.3. LCD (Liquid Crystal Display)
lay type among mobile phones
A liquid crystal display is the most common
ion and good image quality. They are generally easy to
because of its low power consumy
read, even under direct sunlight.
The smallest element of an image displayed on a LCD is the pixel. Each pixel normally
consists of a layer of molecules aligned between two transparent electrodes, and two
ng filters.
pola
fe transmissive, reflective, or transflective. Transmissive
Three other types of LCDs ar ‘
displays offer nicer image quality in low or medium ambient light, while reflective on
work best in bright ambient light. Transflective displays combine the best of both,
the molecules are arranged In this way. More
is isplay,
In the twisted nematic display, aie
specifically, the glass surfaces are treated such that the molecular direction is pi ats
admitting direction of each neighboring polarizer. Because these directions are crossed,
jumpatearn Publication (www-Jump2tearn.com}fa GRAPHIC SystEny
molecular dire
figure 2.4).
confined to a 90° twist from one side of the cell to the other (see
TWISTED LIQUID
CRYSTALS:
GREEN
LIGHT
wer \
SOURCE /
\ POLARIZING FILTERS /
vd RED, GREEN OR
BLUE FILTER
FORCE FIELD NO 0
OW = HO TWIST LIGHT
Fig: 2.4 Twisted Liquid Crystals On/Off
In this case, what happens is that the light vibration follows this twist from one
polarizer to the other, so that all light in fact passes the cell, without being absorbed, in
spite of the fact that the polarizers are crossed. Hence, the cell appears bright.
‘When the light passing through the material is twisted to pass through polarizer and
if the voltage tern offs then the light is not twisted. This type of device is known as passive
matrix LCD.
There is a transistor used for each to control the voltage at each pixel locations and
to prevent charge from gradually leaking out of the liquid crystal cells. These are known as
active matrix LCD.
2.1.4 Direct View Storage Tube
A direct view storage tube
stores the picture information as a
charge distribution just behind the
Phosphor-coated screen. Two electron
Buns are used in this system as shown
the following figure 2.5. They are:
Primary Gun and Flood Gun
Primary gun is used to store the
Picture pattern whereas flood gun
maintains the picture display,
Fig: 2.8 Diroct Viow Storage Tube
ae
Jump2Learn Publication [www.Jump2learn.com]GRAPHIC SYSTEM
7
A a
DVST has advantage that no refresh is required so very complex pictures can be
displayed at very high resolutions without flicker. Whereas, it has disadvantage that
ordinarily no colors can be displayed and that selected parts of a picture cannot be 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.
2.2 Raster Scan and Random Scan Display
Raster Scan Display
Raster scanning is a technique for generating or recording a video image by means
of a line-by-line sweep. Television and printers are using raster scan methods. Most
common graphics monitor using CRT are raster scan displays. In them, the electron beam is
swept from top to bottom, one row at a time. As electron beam moves across each row, the
—— Scantine _____Returnune
Frame
ig: 2.6- Raster Scanning Fig: 2.7 - Raster scan system displays an object as
set of discrete points across each scan line
beam intensity is turned on or off to create pattern. This scanning is also known as non-
interlaced scanning.
Picture definition is stored in memory are called as refresh buffer or frame buffer. It
has intensity values for all the screen points. These values are then retrieved and painted on
screen one row at a time as shown in fig: 2.7.
Each screen point is called as pixel or pel (Picture Element). Intensity of pixel
depends on capability of raster. If there is monochromic system than each screen point will
be either on or off. So one bit per pixel is needed to store intensity of screen points. If color
system is there, then more
number of bits per pixel will be required to store theintensity values. High quality systems
can have 24 bits per pixel which will require several megabytes of frame buffer.
Jump2Learn Publication [www.Jump2learn.com]GRAPHIC SYSTEM,
18
a
Bitmap
is called as bitmap.
For a system having one bit per pixel, frame buffer is calle« p.
Pixmap
i is called as pixmap.
For a system having multiple bits per pixel, frame buffer is pixmap.
Refresh Rate
In raster scan display refreshing is done at rate of 60
more. Refresh rates is measured in cycles per second or Hertz. i
frame. E.g. if refresh rate is 60 frames per second then it is called as 60 Hz.
to 80 frames per second or
Cycle corresponds to one
Horizontal Retrace
At the end each line, the electron beam returns to left side of the screen. The return
to the left of the screen after refreshing each scan line is called as horizontal retrace.
Vertical Retrace
At the end of each frame, the beam returns to top left corner of the screen to start
for next frame and is called as vertical retrace.
Interlacing
{tis the method of incrementally displaying a visual on a CRT. On some raster scan
system, interlaced refresh procedure is used. In this each frame is displayed in two passes.
In the first pass, the beam sweeps across alternate scan line from top to bottom. Then after
vertical retrace, the beam sweeps remaining scan lines,
Random Scan Display
Random scan system uses an electron
beam which operates like a pencil to create a
line image on the CRT. The image is
constructed out of a sequence of Straight line
segments. Each line segment is drawn on the
screen by directing the beam to move from
One point on screen to the next, where each
Point is defined by its x and Y Coordinates,
After drawing the picture, the system cycles andom scan system draws the
back to the first line and design all the lines of C™P&MEnt lines of an objectin any order
Specified,GRAPHIC SYSTEM
the picture 30 to 60 time each second. When operated as a random-scan display unit, a CRT
has the electron beam directed only to the parts of the screen where a picture is to be
drawn. Random-scan monitors draw a picture one line at a time and for this reason are also
referred to as vector displays (or stroke-writing or calligraphic displays). A pen plotter
‘operates in a similar way and is an example of a random-scan, hard-copy device (Fig: 2.8).
Refresh rate on a random-scan system depends on the number of lines to be
displayed. Picture definition is now stored as a set of line-drawing commands in an area of
memory referred to as the refresh display file. Random scan systems are designed for line
drawing applications and can-not. display realistic shaded scenes. Since picture definition is
stored as a set of line-drawing instructions and not as a set of intensity values for all screen
Points, vector displays generally have higher resolution than raster systems. Also, vector
displays produce smooth line drawings because the CRT beam directly follows the line path.
Difference between Raster Scan and Random Scan Displays
Vector / Random Scan Display Raster Scan Display
1 | In vector scan display the beam is | In raster scan display the beam is moved
moved between the end points of the
graphics primitives.
all over the screen one scan line at a time,
from top to bottom and then back to top.
2 | Vector display flickers when the|In raster display, the refresh process is
number of primitives in the buffer | independent of the complexity of the image.
becomes too large.
is not required. Graphics primitives are specified in terms
oftheir endpoints and must be scan converted
into their corresponding pixels in the frame
buffer.
3 | Scan conversior
4 | Scan conversion hardware is not| Because each primitive must be scan
required. converted, real time dynamics is far more
computationaland requires separate scan
conversion hardware.
5 | Raster display has ability to display | Raster display can display mathematically
areas filledwith solid colors or | smooth lines, polygons, and boundaries of
patterns. curved primitives only by approximating them.
with pixels on the raster grid.
Jump2Learn Publication [www.jump2learn.com}
192 GRAPHIC SYSTEM
6 | Cost is more. Cost is low.
7 | Vector display draws continuous and | Vector display only draws line characters,
smooth lines.
2.3. Raster Graphics and Vector Graphics
araster graphics image, or bitmap, is adot matrix data
or points of color, viewable via
In computer graphics,
structure representing a generally rectangular grid of pixels,
a monitor, paper, or other display medium. Raster images are stored in image files with
varying formats.
A bitmap correspond bit-for-bit with an image displayed on a screen, generally in the
same format used for storage in the display's video memory, or maybe as a device-
independent bitmap. A bitmap is technically characterized by the width and height of the
image in pixels and by the number of bits per pixel (a color depth, which determines the
number of colors it can represent).
Vector graphics is the use of geometrical primitives such as points, lines, curves,
and shapes or polygon(s), which are all based on mathematical expressions, to
represent images in computer graphics. Vector graphics are based on vectors (also called
paths, or strokes) which lead through locations called control points. Each of these points
has a definite position on the x and y axes of the work plan. Each point, as well, is a variety
of database, including the location of the point in the work space and the direction of the
vector (which is what defines the direction of the track). Each track can be assigned a color,
a shape, a thickness and also a fill.
Difference between Raster Graphics and Vector Graphics
1) raster graphics are composed of pixels, while vector graphics are composed of paths. A
raster graphic, such as a gif or jpeg, is an array of pixels of various colors, which together
form an i
lage. A vector graphic, such as an .eps file or Adobe Illustrator file, is
composed of paths, or lines, that are either straight or curved.
2) The data file for a vector image contains the points where the paths start and end, how
‘much the paths curve, and the colors that either border or fill the paths.
3) Be ,
) lore aa nattor Braphies are not made of pixels, the images can be scaled to be very
e
an wot losing quality. Raster graphics, on the other hand, become “blocky,” since
i
Pixel increases in size as the image is made larger. This is why logos and other
r
‘im2Learn Publication [www.Jump2iearn.com]GRAPHIC SYSTEM
a
designs are typically created in vector format the quality will look the same on a
business card as it will on a billboard.
2.4 Concepts of Various Objects: Point, Line, Circle, Ellipse and
Polygons
By now we know that the smallest element is a point and that for a raster device, it
is pixel.
Pixel is the smallest addressable element of raster device. It is derived from the
“Picture Element”. The number of pixel of a
isplay device determines the resolution of the
device, and therefore higher number of pixels is preferred for graphics applications.
Each of these pixels is associated with the coordinate of Cartesian plane. These
coordinates identify pixel or point. To draw any image or object, some of pixels are
activated by setting some intensity. In other words, the pixels turned on.
For example, to draw a straight line segment the adjacent pixels between two points
are turned on.
Point
AS in the figure 2.9Point A has been positioned in the XY-
plane and (x, y1) is the position of point A. It implies that the
Ais located at x: distance in X direction and at y1 distance in Y ae
direction from the origin (0,0). Where the (x,y) is known as
the coordinates of point A. (ooy x
Line g:2.9 - A Point in XY-
Any two points specified in the Plane will define a
X
line, which means that for defining the line we must have
Patsy)
z
to specify two points.
In the figure 2.10, two points Pi(x,yi) and
P,(xz,ya)define a line 1. To define the line we need an
equation. A random point P(x,y) is said to be on the line (4 ¢)
|, if and only if it satisfies the equation of the line. The
equation of a straight line can be derived withthe help of
Palseysd
Fig:2.10- A Straight Line
Jump2Learn Publication [www.JumpZlearn.com)Ba GRAPHIC systeny
slope concept of a straight line. The slope is the rate at which an ordinate of a point on ¢
plane changes with respect to a change in the horizontal coordinate. The notion slope ig
denoted by m. Thus,
veritcal distance between two points
~~ horizontal distance between two points
So the slope of any line can be one of four types: the straight line 1) with positive slope, 2)
with negative slope, 3) with zero slope and 4) with undefined slope.
As per previous discussion to derive a line equation the concept of slope is being used. The
slope of any line between two points will remain unchanged (constant). According to this
Let assume that P1(x1,y1) and P2(xz,y2) constitute a line as well as a point P(x,y) is lying on the
same line and the slope remain same at any point of the slope.
So the slope can be written as follows:
_y2-y _y2-yl
m=5-{ adalso m=5—S
yary _ y2-yl
x2—x x2—x1
—yl
vy =m => y—yl=m(x-x1) => y=mx-mx1+yl
x—x1
2,3)
+-—_+—__> (-3,2)
| Zn (32) 82) Xe | |
Apo es) | iP
2) Slopem
2) Slopem=-1 3) Slope m =-1 4) Slope m undefined
Fig:2.11 - Possible Slope values.
=> y=mx+ (yl—mx1)
:
We can assume that b = y1 — mx1 then the equation of straight line can.
y= mx1 + b.......(1)
Circle
‘The first thing we can notice to make our circle drawing algorithm more efficient is
that circles centered at (0, 0) have eight-way symmetry.
eee
Jump2Learn Publication [www.jump2learn.com] aGRAPHIC SYSTEM
2B
The equation for a circle is:
2
x24 ya
» Where ris the radius of the circle
So, we can write a simple circle drawing
algorithm by solving the equation for y at unit x
intervals using:
yetvP 2
f we try to construct a circle of radius 20, the equation may seem like following:
Fig: 2.12- Circle Drawing Concept
yo = ¥20? —0? = 20
y1 = J20? —1? ~ 20
yn = V20? —2? = 20
Yig = ¥20? -19? =6
Y20 = ¥20? -20? =0
However, unsurprisingly this is not a brilliant
ion!
Fig: 2.13- solution!
Firstly, the resulting circle has large gaps where the slope approaches the vertical.
Je point generation
Secondly, the calculations are not very efficient. For that mid-point circle algorithm
can be applied to resolve the problem.
Mid-Point Circle ( Xc, Yc, R):
Description: Here Xc and Yc denote the x — coordinate and y — coordinate of the
center of the circle. Ris the radius. .
1. SetX=OandY=R :
2. SetP=1-R
3. Repeat While (X< ¥)
a. Call Draw Circle(Xc, Ye, X, ¥)
Jump2Learn Publication [www.Jump2learn.com]oa GRAPHIC SYSTENy
eee
b. SetX=X+1
c. If(P-<0) Then
P=P+2X+6
d. else
SetY=Y-1
P=P+2(X-Y)+1
e. [End of If]
f. Call Draw Circle(Xc, Ye, X, ¥)
4, [End of While]
5. Exit
Draw Circle ( Xc, Ye, R):
1. Call PutPixel(Xc +X, Ye, + Y)
2. Call PutPixel(Xe - X, Yc, + ¥)
3. Call PutPixel(Xc + X, Yc, - Y)
4. Call PutPixel(Xe - X, Yc, - Y)
5. Call PutPixel(Xc + Y, Yc, +X)
6. Call PutPixel(Xc - Y, Yc, + X)
7. Call PutPixel(Xc + Y, Yc, - X)
8. Call PutPixel(Xc - Y, Yc, - X)
9. Exit
Ellipse
Ellipse is the finite or bounded case of a conic section, the geometric shape that
results from cutting a circular conical or cylindrical surface with an oblique plane. It is also
the locus of all points of the plane whose distances to two fixed points add to the same
Constant. Ellipses also arise as images of a circle or a sphere under Parallel projection, and
erences Projection. Indeed, circles are special cases of ellipses. An ellipse
ounded case of an implicit curve of degree 2, and of a rational curve
Of degree 2, i li
oe Its also the simplest ellipse figure, formed when the horizontal and vertical
nS are sinusoids with the same frequency.
Jump2Learn Publication [www.iumn?laamn eamtGRAPHIC SYSTEM. os
The circle algorithm can be generalized to work for an ellipse but only the four-way
symmetry can be used.
Ellipse Properties, }
Given two fixed positions F1 and F2 the sum of the
two distances from these points to any point P on the
ellipse (di+dz) is constant.
P=(%9)
Ellipse Equation
the major and minor axes aligned with the coordinate axes the ellipse is said to be in
standard position:
One Approach
Take small steps in x from x