Sunteți pe pagina 1din 30

Introduction

To generate, store and manipulate the images in a digital


computer is called computer graphics.

A major application of computer graphics is designing,


particularly engineering and architectural systems. CAD
techniques are used to design building, automobile, aircraft,
watercraft, spacecraft, defense mechanism, computer
component, industrial machinery and device textile and
increasing number of other products ranging from pen to
refrigerator.

Graphics enhances the communication between the computer


and its users.

Among the other applications of computer graphics image


processing, animation, morphing, simulation, e-learning
material designing and graphics designing are rapidly gaining
demand and wage in education, training, advertisement and
entertainment.

Hardware for the computer graphics;


1. Input Device
2. Output Device

1. Input Devices:-
The input devices are mouse, keyboard, joysticks, trackball
and space ball, data glove, digitizers, image scanners, touch
panels, light pens, voice systems.

Keyboards:
A keyboard is generally used for entering the text strings,
cursor control and functions. Function keys allows users to
enter frequently used operations in a single keystroke. Cursor
control keys can be used to select displayed objects or co-
ordinate positions by positioning the screen cursor.

Mouse:
A mouse is small hand-held box used to position the screen
cursor. Wheels or rollers on the bottom of the mouse can be
used to record the amount and direction of movement.

Another method for deflecting mouse motion is with an optical


sensor. For these systems, the mouse is moved over a special
mouse pad that has a grid of horizontal and vertical lines. The
optical sensor detects movement across the lines in the grid.

Since a mouse can be picked up and put down at another


position without change in cursor movement, it is used for
making relative changes in the position of the screen cursor.

The Z-mouse included 3 buttons, a thumbwheel on the side, a


trackball on the top and a standard mouse ball underneath.
The design provides six degrees of freedom to select spatial
positions, rotations and other parameters. With the Z-mouse
we can pick up an object, rotate it, move it in any direction.
Application of Z-mouse includes virtual reality, CAD and
animation.

Trackball:-
A trackball is a ball that can be rotated with the fingers or
palm of the hand to produce screen cursor movement.
Trackballs are often mounted on keyboards or other devices
such as the Z mouse. Ex:- Potentiometer.

Space ball:-
A space-ball provides six degrees of freedom while trackball is
a 2-D positioning device. Space-balls are used for 3-D
positioning and selection operations in virtual reality systems,
modeling, animation, CAD and other application. Ex:- Strain
gauge

Joysticks:-
Most joysticks select screen positions with actual stick
movement; other respond to pressure on the stick.

Data Glove:-
Data glove is used for to grasp a virtual object. The glove is
constructed with a series of sensors that detect hand and finger
motions.

Digitizers:-
A common device for drawing, painting or interactively
selecting co-ordinate positions on an object is a digitizer.
Typically, a digitizer is used to scan over a drawing or object
and to input a set of discrete co-ordinate positions, which can
be joined with straight line segment to approximate the curve
or surface shapes. Graphics table (data table) is used to input
2-D co-ordinates by activating a hand cursor or stylus at
selected positions on a flat surface.
Acoustic (sonic) tables use sound waves to detect a stylus
position. Either strip microphones or point microphones can
be used to detect the sound emitted by an electrical spark from
a stylus tip.

Image Scanner:-
Drawing, graphs, color and black & white photos, or text can
be stored for computer processing with an image scanner by
passing an optical scanning mechanism over the information to
be stored. The gradation of gray scale or color are then
recorded and stored in an array.
Touch Panels:-
Touch panels allow displayed objects or screen positions to be
selected with the touch of a finger. Touch input can be
recorded using optical, electrical or acoustical methods.

Light Pens:-
The light pen is a pointing device. Such pencil shaped devices
are used to select screen positions by detecting the light coming
from points on the CRT screen .

Voice Systems:-
The voice system input can be used to initiate graphics
operations or to enter data. These systems operate by matching
an input against a predefined dictionary of words and phrases.

2. Output devices:-
Video Display Devices, Hard copy technology.

Display Devices:-

Some of the common types of display system available in the


market are.
1. Raster scan display.
2. Random scan display.
3. Direct view storage tube.
4. Flat panel displays.
5. Three dimensional viewing devices.
6. Stereoscopic and virtual reality system.

The display systems are often referred to as video monitor or


video display unit(VDU). The most common video monitor that
normally comes with a PC is the Raster scan type.

However, every display system has three basic parts:-


• the display adapter that creates and holds the image
information.
• The monitor which displays that information and the
cable that carries the image data between the display
adapter and the monitor.

Pixel:-

A pixel may be defined as the smallest size object or color spot


that can be displayed and addressed on a monitor. Each pixel
has a particular color and brightness value. Though the size of
a pixel depends mostly on the size of the electron beam within
the CRT(Cathode Ray Tube), they are too fine and close to
each other to be perceptible by the human eye.

The finer the pixels the more the number of pixels displayable
on a monitor screen.

However, it should be remembered that the number of pixels


in an image is fixed by the program that creates the image and
not by the hardware that display it.

Resolution:-

There are two types of resolution


• Image Resolution
• Screen Resolution

Image resolution refers to the pixel spacing i.e., the distance


from one pixel to the next pixel. In other word resolution of an
image refers to the total number of pixels along the entire
height and width of an image.
For example, a full screen images, with resolutions 800 x 600
means that there are 800 columns of pixels, each column
comprising 600 pixels, i.e., a total of 800 x 600 = 480000 pixels
in the image area.

The internal surface of the monitor area (screen) is coated with


red, green and blue phosphor material that glows when struck
by the stream of electrons. This coated material is arranged
into an array of millions of tiny cells red, green and blue,
usually called dots.

The dot pitch is the distance between adjacent sets of red,


green and blue dots. This is also same as the distance between
any two dots of the same color, i.e., from red to red, or green to
green, or blue to blue. Usually monitors are available with a
dot pitch specification 0.25mm to 0.40mm. Each dot glow with
a single pure color (red, green or blue) and each glowing triad
appear to our eye as small spot of color(a mixture of red, green
and blue).

Depending on the intensity of the red, green and blue colors


different colors results in different triads. The dot pitch of the
monitor thus indicates how fine can be the colored spots that
make up the picture, through electron beam dia is an
important factor in determining the spot size.

Pixel is the smallest element of a displayed image, and dots are


the smallest elements of a display surface(monitor screen). The
dot pitch is the measure of screen resolution. The smaller the
dot pitch, the higher the resolution, sharpness and detail of the
image displayed.

If the image resolution is more compared to the inherent


resolution of the display device then the displayed image
quality gets reduced. As the image has to fit in the limited
resolution of the monitor, the screen pixels(comprising a red, a
green and blue dot) show the average color and brightness of
several adjacent images pixels. Only when the two resolutions
match, the image is displayed perfectly and only then the
monitor is used to its maximum capacity.

Aspect Ratio :-

The aspect ration of the image is the ratio of the number of x


pixels to the number of y pixels.

Aspect Ratio = No. of pixels in vertical


No. of pixels in horizontal
o
y

x is increased from top to bottom.


y is increased from left to right.
The standard aspect ratio for p( ) is 4:3. (640 x 480, 800 x 600,
1024 x 768)

1. Raster Scan Displays :-

• This type of display basically employs a cathode ray tube


(CRT) or LCD panel for display.
• In this the electron beam is swept across the screen, one
row at a time from top to bottom.
• The picture definition is stored in memory area called
refresh buffer or frame buffer.
• Each point on the screen is called pixel.
• For black & white system, each screen point can be
represented by 1 bit pre pixel either on or off.
• For a color system we need additional bits, up to 24 bits
per pixel are included in high quality system.

A system with 24 bit per pixel and a screen resolution of


1024 by 1024 requires 3MB of storage for the frame
buffer.
• On a black and white system with one bit per pixel, the
frame buffer is commonly called a bit map.
• For a system with multiple bits per pixel, the frame buffer
often referred to as a pix map.

Refresh Rate:-

The refresh rate is the number of times per second that


the screen is refreshed. It is measured in hertz(Hz) the unit of
frequency.

In order to maintain a stable image, the electron beam


must sweep the entire surface of the screen and then return to
re-draw it a number of times per second. This process is called
refreshing the screen.

The maximum refresh rate possible depends on the


resolution of the image. The maximum refresh rate that a
higher resolution image can support is less than that a higher
resolution image can support is less than that supported by a
lower resolution image, because the monitor has more number
of pixels to cover with each sweep.

Refresh rate requires:


1. a video card capable of producing the video images
that many times per second.
2. a monitor capable of handling and displaying that
many signals per second.

During the plug and play monitor, just plug the monitor,
windows will detect it and set the correct display type and
choose the optimal refresh rate automatically.

Ex.: Find out the refresh rate of a monitor with 640 x 480
resolution having average access time to access a pixel is 200ns.

Suppose we are using single bit plane i.e. N = 1

So
to access 1 pixel requires 200 ns
to access 640 x 480 pixel requires = 640 x 480 x 200 ns
= 640 x 480 x 200 x 10 -9 s

Again 1 frame = 640 x 480 bits

Thus 640 x 480 x 200 x 10-9 sec takes to access 1 frame i.e., 640
x 480 bits.

In 1 sec access = 640 x 480 bits


640 x 480 x 200 x 10-9

= 1 bits
200 x 10-9

Now 640 x 480 bits = 1 frame


1 bit = 1 frame
640 x 480
1 bits = 1 x 1 .
200 x 10-9 640 x 480 200 x 10 -9
= 16 frames in 1 sec.

Hence refresh rate is 16 Hz.

Note:- Generally refresh rate is 30 – 60Hz

Interlacing :

It is used to maintain the constant brightness of the


picture.

In interlacing the electron guns start at the top of the


screen and scan rapidly from left to right along the row of
phosphor data. They return to the leftmost position one line
down and scan again and repeat this to cover the entire screen.
This type of scanning is called Horizontal retrace.

After scanning all the pixel rows of the display surface,


the electron beam reaches the rightmost position in the
bottommost pixel line. The electron flow is then switched off
and the vertical deflection mechanism steers the beam to the
left position to start another cycle of scanning. This diagonal
movement of the beam direction across the display surface is
known as vertical retrace. If the electron beam takes too long
to return and redraw a pixel, the pixel will begin to fade.

In some monitors, instead of refreshing every line of the


screen, when in an interlaced mode the electron guns sweep
alternate lines on each pass. In the first pass, add numbered
lines are refreshed, and in the second pass even numbered lines
are refreshed. This allows the refresh rate to be doubled
because only half the screen is redrawn at a time. The usual
refresh rate for interlaced operation is 87Hz., which
corresponds to 43.5Hz of “real” refresh in half screen
interlacing.
Horizontal retrace

Vertical retrace

(Interlacing raster scan)

Cathode Ray Tube (CRT)

The CRT consists of connector pins, electron gun,


focusing system, magnetic cards and phosphor coated screen.
The electron gun emits a beam of electrons, it passes
through focusing system and magnetic deflection coils. It direct
the beam towards the specified position on the phosphor
coated screen. The phosphor then emits a small spot of light at
each position contacted by the electron beam.

Figure::

A refresh CRT is used to keep the phosphor glowing is to


redraw the picture repeatedly by quickly directing the electron
beam back over the same points.

Figure ::
In CRT we use a cathode and a control grid. Heating
filament heated the cathode which heated the electrons and the
electrons then accelerated towards the phosphor coating by the
voltage.

Intensity of electron beam is controlled by setting voltage


level on the control grid. A high –ve voltage 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 the control grid structure.

Figure ::

A smaller –ve voltage decrease the number of electrons


passing through so we can control the brightness of display by
varying the voltage on the control grid. In computer graphics
monitor we can use electrostatic focusing.

In this the electron beam passes through a positively


charged metal cylinder that forms an electrostatic lens. It
focuses the electron beam at the center of the screen. The
distance that the electron beam must travel to different points
on the screen varies because the radius of curvature for most
CRT is greater than the distance from the focusing system to
the screen centre.

There are two magnetic deflections coils pair. One pair is


mounted on the top and bottom of the neck & the other pair is
mounted on the opposite side of the neck. One pair is mounted
horizontally to control the vertical deflection & the other pair
is mounted vertically to control the horizontal deflection.
When the electrons in the beam collide with the phosphor
coating, they are stopped and their kinetic energy is absorbed
by the phosphor. The heat energy is generated the frequency of
the light emitted by the phosphor is proportioned to the energy
difference between the excited quantum state and the ground
state.

Bit planes, color depth and color palette :-

The raster CRT graphics display is a point plotting


device, i.e., a straight line can be drawn directly from any
addressable point to any other addressable point. The line is a
series of dots(pixels) close to the path of the line. Other lines
except the horizontal, vertical, square pixels (450 line) lines
appear as a series of stair steps. This is called alising or the
‘Jaggies’.

Frame Buffer:-

The frame buffer is the video memory(RAM) that is used


to hold or map the image displayed on the screen. The amount
of memory required to hold the image depends primarily on
the resolution of the screen image and also the color depth used
per pixel. A frame buffer is a large contiguous piece of
computer memory where the definition of the picture is store.
To calculate how much video memory is required at a
given resolution and bit depth is
Memory in MB = (x-resolution x y-resolution x bits per
pixel)

Color Depth:-

The number of memory bits required to store color


information (intensity values for all three primary color
components) about a pixel is called color depth or bit depth.
A minimum of one memory bit (color depth = 1) is
required to store intensity value either 0 or 1 for every screen
point or pixel. So if there are n pixels in an image a total of n
bits of memory used for storing intensity values will result in a
pure black and white image.

Bit plane or bit map:-

The block of memory which stores (or is mapped with)


bilevel intensity values for each pixel of a full screen pure black
and white image is called a bit plane or bit map.
A 512 x 512 element square raster requires 218 or 262.144
memory bits in a single bit plane. The picture is built up in the
frame buffer 1 bit at a time.

Figure::

Since a memory bit has only two states (0 or 1), a single


bit plane yields a black & white(monochrome) display. Since
the frame buffer is a digital device, while the raster CRT is an
analog device, conversion from a digital representation to an
analog signal must take place when information is read from
the frame buffer and displayed on the raster CRT graphics
device. This is accomplished by a digital to analog
converter(DAC). Each pixel in the frame buffer must be
accessed and converted before it is visible on the raster CRT.

Multi bit plane:-

Color of gray levels can be achieved in the display using


additional bit planes. The intensity of each pixel on the CRT is
controlled by a corresponding pixel location in each of N the
bit planes. The binary value (0 or 1) from each of the N bit
planes is loaded into corresponding positions in a register. The
resulting binary number is interpreted as an intensity level
between 0(dark) and 2N – 1(full intensity). This is converted
into an analog voltage between 0 and the maximum voltage of
the electron gun by the DAC. A total of 2N intensity levels are
possible.

Figure::

Here 3 bit planes are used for a total of 8(23) intensity


levels. A 3 bit plane frame buffer for a 512 x 512 raster
requires 786;432 (512 x 512) memory bits.

The more the number of bits used per pixel, the finer the
color detail of the image. However, increased color depths also
requires significantly more memory for storage and also more
data for the video card to process which reduces the allowable
refresh rate.

For the true color three bytes of information are used,


one for each of the red, blue and green signals that makes a
pixel. A byte can hold 256 different values and so 256 voltage
settings are possible for each electron gun which means that
each primary color can have 256 intensities, allowing over 16
million (256 x 256 x 256) color possibilities. True color is a
necessity for those doing high quality photo editing, graphical
design etc.

Figure::

A sample 3 bit plane frame buffer color combinations

bit bit 2: bit color


1:Red Green 3:Blue name
(000) 0 0 0  Black
(001) 0 0 1  Blue
(010) 0 1 0  Green
(011) 0 1 1  Cyan
(100) 1 0 0  Red
(101) 1 0 1  Magenta
(110) 1 1 0  Yellow
(111) 1 1 1  White

For high color 2 bytes of information are used to store the


intensity values for all 3 colors. This is done by dividing 16 bits
into 5 bits for blue, 5 bits for red and 6 bits for green. This
means 32(25) intensities for blue, 32(25) for red and 64(26) for
green. This reduces color precision results in a loss of visible
image quality, but one can not easily see the difference between
true color and high color image. However high color is often
used instead of true color because high color requires 33% (or
50%) less memory and also image generation is faster.

Common color depths used in PCs are


Color depth No. of Bytes of Common
Displayed storage per Name for
character pixel color depth
4 – Bit 16 0.5 Standard
VGA
8 – Bit 256 1.0 256 – color
mode
16 – Bit 65,536 2.0 High color
24 – Bit 16,777,216 3.0 True color

Lookup Table:-
Using look up table, pixel values do not code colors
directly. Instead, they are addresses or indices into a table of
color values. The color of a particular pixel is determined by
the color value in the table entry that the value of the pixel
references.
The lookup table must contain 2N entries. Each entry in
the lookup table is W bits wide. (W > N). When this occurs, 2W
intensities are available, but only 2N different intensities are
available at a time.
Since there are 3 primary color, (RGB), a simple color
frame buffer is implemented with 3 bit planes, one for each
primary color. Each bit plane drives an individual color gun
for each of the 3 primary colors used in color video. These
colors are combined at the CRT to yield 8 colors.
It is important to remember that, using the lookup table
representation, an image is defined not only by its pixel values
but also by the color values in the corresponding lookup table.
Those color values from a color map for the image.

Figure:
Figure:
Figure:

Example: Find out the refresh rate of a monitor having


resolution 512 x 512 frame buffer. The pixels are accessed
individually with an average access time 200ns.

Ans:- Suppose there are single bit plane are used i.e. N = 1
To access 1 pixel requires 200ns
To access 512 x 512 requires 200 x 512 x 512 ns.
= 200 x 512 x 512 10-9 s
= 0.0524 sec.

Thus it requires 0.0524 sec to access all the pixel in a 512 x 512
frame buffer.

In 0.0524 sec access 512 x 512 bits


= 512 x 512
0.0524
= 5 x 106 bits

Now 512 x 512 bits = 1 frame


1 bit = 1 .
512 x 512
5 x 106 bit = 1 . x 1 .
512 x 512 5 x 106
= 5000000
512 x 512
= 19 frames / sec.
so refresh rate = 19 frames / sec.

Example: Find out same with 1024 x 1024 frame buffer and
4096 x 4096 frame buffer.
(i) To access 1 pixel requires 200ns.
To access 1024 x 1024 requires = 200 x 1024 x 1024 ns
= 200 x 1024 x 1024 x 10-9 s
= 0.2097 sec.
So in 0.2097 sec access 1024 x 1024 bits
In 1 sec = 1024 x 1024
0.2097
= 5 x 106 bits

Now 1024 x 1024 bits = 1 frame


1 bit = 1 .
1024 x 1024
6
5 x 10 bits = 5 x 106 .
1024 x 1024
= 4.768
~ 5 frames/sec

Hence refresh rate = 5 frames / sec.

(ii) To access 1 pixel requires 200ns.


4096 x 4096 requires = 4096 x 4096 x 200ns
= 4096 x 4096 x 200 x 10-9
= 3.3554 sec
So in 3.3554 sec access 4096 x 4096 bits
1 sec access = 4096 x 4096
3.3554
= 5 x 106 bits

Now 4096 x 4096 bits = 1 frame


1 bit = 1 .
4096 x 4096
-6
5 x 10 bit = 5 x 106
4096 x 4096
refresh rate = 0.29 frames/sec.

Memory Size :-
Ex 1:- What is the memory size of the frame buffer having the
resolution of the computer 512 x 512 with single bit plane.
Ans.: Here single bit plane is used i.e., n = 1, it means that 1 bit
defines 1 pixel.
Total 1 bit defines 1 pixel.
Total no. of pixels is the frame buffer is = 512 x 512
= 29 x 29
= 218 bits
As 1 bit defines 1 pixel
218 bit = 218 pixels
= 210 x 28 bit
= 210 x 23 x 25 bit
= 32kb
So memory size = 32kb

Ex:-2 What is the memory size of the frame buffer of a


computer having resolution 1024 x 1024 with 8 bit plane.

Ans.: N=8
Memory size = N x X x Y
= 8 x 1024 x 1024
= 23 x 210 x 210
= 223 bit
= 220 byte
= 210 kb
= 1 MB.

2. Random Scan Displays:-


For this unit, a CRT has the electron beam directed only
to the parts of the screen where a picture is to be drawn. It
draws a picture one line at a time, so it is referred to as vector
displays(or stroke-writing or calligraphic displays).
Refresh rate on a random scan system depends on the
number of lines to be displayed. The refresh display file stores
the picture definition as a set of line drawing commands in an
area of memory. It is also known as display list, display
program or refresh buffer.
Random scan system are basically designed for line
drawing application & can not display realistic shaded scenes.
This display has higher resolution than raster scan system. It
produce smooth lines.
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 have higher resolution than raster
system.

Random Scan Raster Scan


1. Higher resolution 1. Low resolution
2. It is more expensive 2. Less expensive
3. It uses monochrome or 3. It uses monochrome or
beam penetration type shadow mask type.
4. Editing is easy 4. Editing is difficult
5. Solid fill / pattern fill is 5. Solid fill / pattern fill is
difficult easy
6 Refresh rate depends on 6. Refresh rate is
the picture complexity independent of picture
complexity.
7. Image is displayed by 7. Image is displayed by
steering the beam along scanning the whole display
the vector. area.

Color CRT Monitor:-


There are low basic techniques are used for producing
color displays with a CRT.
• Beam penetration method.
• Shadow mask method.

Beam Penetration Method:-


This method have been used with random scan monitors.
There are generally two phosphor layers such as the red or
green. The display color depends on the how far the electron
beam penetrate into phosphor layer. A beam of slow electrons
excites only the outer red layer. And the beam of very fast
electrons penetrates through the red layer and excites the
electron in inner green layer.
The intermediate speed give two additional color orange
& yellow. The beam acceleration voltage controls the speed as
well as color at any point. This method is expensive but its
limitations is that it produce only four colors & quality is not
good as with other methods.

Shadow Mask Method:-


This method generally used in raster scan system. They
produce more no. of colors than beam penetration method.
The shadow mask CRT has three phosphor color dots at each
pixel position( red, blue & green).
There are 3 electron guns, one for each dot and also has a
shadow mask grid. A shadow mask grid contain holes aligned
with the phosphor dot patterns. The phosphor dots in the
triangles are arranged so that each electron beam can activate
only its corresponding color dot, when it passes through the
shadow mask grid. By varying the intensity levels of the three
electron beams we can obtain different colors. The color
depends on the amount of excitation of the red, green & blue
phosphorus.

Beam Penetration Shadow Mask


1. It only produce 4 colors, 1 It produce all the colors
Red, Green, Orange, . depends on the amount of
Yellow excitation of the red, blue
and green phosphorous.
2. It is used in random scan 2 It is used in raster scan
monitor. . systems
3. Expensive 3 Inexpensive.
.
4. Quality is not good. 4 Quality is good.
.

Direct View Storage Tubes:- (DVST)


The DVST stores the picture information as a charge
distribution just behind the phosphor created screen.
In DVST there are 2 electron gun
(1) A primary gun which is used to store the picture
pattern.
(2) A flood gun is used to maintain the picture display.

The advantages of DVST over refresh CRT is that no


refreshing is needed. So very complex picture can be displayed
at high resolution. There is a flickering of the screen.

The disadvantages of DVST are :-


• They do not display color once you select a picture we can
not erase it.
To eliminate a picture we have to erase the entire screen
and redraw a picture. So it is time consuming procedures.

CRT DVST
1. It requires refreshing. 1 It does not require
. refreshing.
2. It display low resolution 2 High resolution picture.
picture .
3. The pictures are 3 There is no flickering of
flickering. . picture.
4. They produce colored 4 They do not display colors.
picture .
5. We can erase the 5 We can not erase the
particular pictures on the . particular picture.
entire screen.

Solved Problem
1. What is the resolution of an image?
Ans.:- The no. of pixels(Picture elements) per unit length(inch)
in the horizontal as well as vertical direction.
2. Compute the size of a 640 x 480 images at 240 pixels per
inch?
640 by 480
240 240

or 2 2/3 by 2 inches.
3. Compute the resolution of a 2 x 2 inch image that has 512 x
512 pixels?
512 = 256 pixels per inch
2
4. What is an image’s aspect ratio?
The ratio of its width to its height, measured in unit
lengths or number of pixels.
5. If an image has a height of a 2 inches and an aspect ratio of
1.5, what is its width?
Width = Aspect Ratio
Height
=> width =Aspect ratio x height
= 1.5 x 2
= 3 inches
6. If we want to resize a 1024 x 768 image to one that is 640
pixels wide with the same aspect ratio, what would be the
height of the resized image?
Aspect ratio of 1024 x 768 image is = 1024 = 1.33
768
Now we change the width to 640. So what is the height with the
same aspect ratio.
We know that
Width = Aspect ratio
Height
=> Height = Width
Aspect ratio
= 640 = 480
1.33

7. If we want to cut a 512 x 512 sub image out from the centre
of an 800 x 800 image, what are the co-ordinates of the pixel in
the large image that is at the lower left corner of the small
image?
x co-ordinate = (800 – 572) / 2 = 144
y co-ordinate = (600 – 512) / 2 = 44
so the co-ordinate is (144, 44)
Note: In RGB color model, we begin with black and add on the
appropriate primary components to yield a desired color. RGB
model is an additive process. (Display monitor).
On the other hand, CM4 color model, defines colors using
subtractive process which closely matches the working
principle of printer.
The formula for summarize the conversion between the
two color models.
 R  1  C   C   1  R 
           
 G  = 1 −  M  =>  M  =  1 −  G 
 B  1  Y   Y   1  B 
           

8. Sometimes the pixel at the upper left corner of an image is


considered to be at the origin of the pixel co-ordinate system(a
left handed system). How to convert the co-ordinates of a pixel
at (x, y) in this co-ordinate system into its co-ordinates (x’, y’)
in the lower left corner at origin co-ordinate system( a right
hand system)?
(x’, y’) = (x, m-y-1) where m is the number of pixels in the
vertical direction

9. Find the CMY co-ordinates of a color at (0.2, 1, 0.5) in the


RGB space.
 C  1  R   1  0.2   0.8 
           
 M  =  1  −  G  =  1 −  1  =  0 
 Y  1  B   1  0.5   0.5 
           
So CMY co-ordinate is (0.8, 0, 0.5)

10. Find the RGB co-ordinates of a color at (0.15, 0.75, 0) in the


CMY space.
 R  1  0.15   0.85 
       
 G  = 1 −  0.75  =  0.25 
 B  1  0   1 
       
So, RGB co-ordinate is (0.85, 0.25, 1)

11. If we use direct coding of RGB values with 2 bits per


primary color, how many possible colors do we have for each
pixel?
22 x 22 x 22 = 4 x 4 x 4 = 64

12. If we use direct coding of RGB values with 10 bits per


primary color, how many possible colors do we have for each
pixel?
210 x 210 x 210 = 230 bits = 128 MB

13. If we use 5 bits each for red and blue and 6 bits for green
for a total of 16 bits per pixel, how many possible simultaneous
colors do we have?
25 x 25 x 26 = 216 = 65,536

14. If we use 12-bit pixel values in a look up table


representation, how many entries does the lookup table have?
212 = 4096

15. If we use 2 bytes pixel values in a 24 bit lookup table


representation, how many bytes does the look up table occupy.
216 x 24/8 = 65536 x 3 = 196,608
Note:- Phosphorescence is the term used to describe the light
given off by a phosphor after it has been exposed to an electron
beam.
Fluorescence refers to the light given off by a phosphor while it
is being exposed to an electron beam.

16. What is persistence?


The duration of phosphorescence exhibited by a phosphor.

17. What is the function of the control electrode in a CRT?


Regulate the intensity of the electron beam.

18. Name the two methods by which an electron beam can be


sent?

Electrostatic Deflection
Magnetic Deflection

19. Why do many color printers use black pigment?


Color pigments (cyan, magenta, yellow) are relatively more
expensive and it is technically difficult to produce high quality
block using several color pigments.

20. What is the pitch of a color CRT?


The distance between the center of the phosphor dot pattern on
the inside of the display screen.

21. What do you call the path the electron beam takes at the
end of each refresh cycle?
Vertical retrace.

22. What do you call the path the electron beam takes when
returning to the left side of the CRT screen?
Horizontal retrace.

Output Primitives

Scan Conversion:-
Scan conversion of the object refers to the operation of finding
out the location of pixels to be intensified and then setting the
values of corresponding bits, in the graphics memory, to the
desired intensity code.
The graphics system or the application program convert each
primitive from its geometric definition into a set of pixels that
make up the primitive in the image space.

Points:-
Point plotting is accomplished by converting a single co-
ordinate position furnished by an application program into
appropriate operations for the output devices in use.
The point in the computer language is called as pixel. But due
to the display surface depending upon the screen resolution, a
pixel can not represent a single mathematical point We
consider each pixel as a unit square area identified by the co-
ordinates of its lower left corner.

Scan Converting Point:


1. Let (x,y) be a point having x & y real value. And (x’, y’) be
the point after scan conversion where
x’ = Floor(x) x’< x < x’+1
y’ = Floor(y) y’< y < y’+1

y
Pixel grid

P2

. P1
O(0, 0) x

Example:-
P1(1.7, 0.8) is represented by (1, 0)
P2(2.2, 1.3) is represented by (2, 1)
P3(2.8, 1.9) is represented by (2, 1)

2. Another approach is making


x' = Floor(x + 0.5) x’ – 0.5 < x < x’+0.5
y' = Floor(y + 0.5) y’ – 0.5 < y < y’+0.5

Example:-
P1(1.7, 0.8) is represented by (2, 1)
P2(2.2, 1.3) is represented by (2, 1)
P3(2.8, 1.9) is represented by (3, 2)

Lines:-
Line drawing is accomplished by calculating intermediate
positions along the line path between two specified end point
positions.
A line in computer graphics refers to a line segment. It is
defined by its end points and the line equation y = mx + c,
where m is the slope and c is the y intercept.

Line Drawing Algorithm:-

Q. Why line drawing algorithms are developed?


Several line drawing algorithms are developed with the basic
objective to create visually satisfactory images in least possible
time and this is achieved by reducing the calculations to a
minimum preferably using integer than floating point
arithmetic. Such ways of minimizing even a single arithmetic
operation is so important, because every drawing or image
generated will have large number of line segments, m it and
every line segments will have many pixels. So securing of even
one computation per pixel will save number of computations in
generating an object, which, in turn, minimizes the time
required to generate the whole image on the screen.
There are two algorithms are used.
• DDA algorithm
• Bresenhams algorithm.

The equation of the straight line in intercept form is


y = mx + c

Let the line is generated by two end points P1(x1, y1) and P2(x2,
y2)
So m = y2 – y1
X2 – x1
6 = y1 – mx1
For any value of xi, we can calculate yi
Let the step size of xi+1=xi+1
yi+1 = m xi+1 + C
= m(xi + 1) + C
= m( xi + ∆x) + C = mxi + m∆x + C = (mxi + C ) + m∆x
if ∆x = 1,
then
yi +1 = (mxi + σ ) + m
=> yi +1 = yi + m
For any given x, interval ∆ x along a line, the corresponding y
interval ∆ y is
∆y = m∆x

Similarly, we can obtain the x interval ∆x corresponding to a


specified ∆y as
∆y
∆x =
m

If |m| < 1, i.e. ∆x > ∆y


So when ∆x is increased by a fix unit (1 unit) then ∆y is
increased by m unit.

S-ar putea să vă placă și