Você está na página 1de 14

BASICS OF

COMPUTER
GRAPHICS
[20 MARKS]

















Chapter 1

Chapter Details
1.1 Introduction
1.2 Basic of Computer Graphics
1.3 Raster Scan Display and Random
Scan Display
1.4 Frame Buffer
1.5 Display Devices
1.6 Primitive Operation
1.7 Display File Interpreter
1.8 Graphics file format
1.9 Applications of Computer Graphics
1.10 Various Input Devices
1.11 Display Processor
1.12 Co-ordinate System
1.13 Graphics Modes
1.14 Examples of graphics mode
initialize


1-2
Computer Graphics



Graphical and Statistical representation of questions asked from this chapter
in previous years MSBTE Question Papers






Statistical Analysis
MSBTE paper Total marks questions asked in this chapter
S-2010 24
W-2010 16
S-2011 32




Basic of Computer Graphics 1-3
1.1 INTRODUCTION
Computer Graphics is a field which deals with picture and
images. In literature, one can find many definitions of
computer Graphics, of which a few are given below.
Computer Graphics is a process associated with producing
images by digital rendering of picture model.
Computer graphics is a process of generation of image of
virtual scenes using computer hardware.
Computer Graphics is human-oriented system that uses the
capabilities of a computer to create, transform, and display
pictorial symbolic data.






Computer graphic is the use of computer hardware and software to create, manipulate,
and present picture and images.
Computer graphics is pictorial representation and manipulation of data by a computer.
Looking at the preceding definitions, it becomes clear that computer graphics deals with
the creation and manipulation of images and pictures. During the presentation of picture
and images, users would like to communicate through graphics packages.
Communicating with the graphics packages during creation and manipulation of images
and pictures is called interactive computer graphics.
1.2 BASICS OF COMPUTER GRAPHICS
The Origins of Computer Graphics
In 1950 the first computer driven display, attached to MIT's computer, was used to
generate simple pictures. This display used a Cathode-Ray tube (CRT). Interactive
computer graphics made progress and the term computer graphics was first used in
1960.
Interactive Computer Graphics
It involves two way communications between computer and user. The computer up on
receiving signals from the input device, can modify the displayed picture appropriately.
Definition
Computer graphics is a
process of generation of
image of virtual scenes
using computer
hardware.

English Word ==| = ==| = ==| = ==| =
Interactive = = - '=
== =




1-4
Computer Graphics

English Word ==| = ==| = ==| = ==| =
Assimilate = ===+
= , |==
Stimulates = +==
Sweep = =-
DP VC
Refresh
buffer
Advantages:
Realistic shading
No flickering
Disadvantages:
Aliasing
Scan conversion

Raster scan system

The main reason for the effectiveness of interactive computer
graphics in many applications is the speed with which the user
of the computer can assimilate the display information.
1.3 RASTER SCAN DISPLAY AND
RANDOM SCAN DISPLAY
1.3.1 Raster Scan Display
Raster scan CRT much works like television set. Light occurs
when an electron beam stimulates a phosphor.

CPU System memory
Frame
buffer
Video controller
Monitor
System bus
A fixed area of system
memory reserved for
frame buffer
I/O devices

Figure 1.1
Principle of Raster Scan System
In Raster scan, the electron beam from electron gun is swept horizontally across the
phosphor.
After each horizontal sweep the beam is moved.
After the bottom line is swept, the beam returns to the top and the sweep process begins
again.


BTE [S.2010] - 4M
Write short note on
raster scan display.


Basic of Computer Graphics 1-5

Scanline
Horizontal
retrace
Vertical
retrace
0
1
2
3
4
5
6
7
8
9
10

Figure 1.2
The lines numbered as 0, 1, 2, 3, 4, 5, , 10 represent lines
that the electrons beam is painting on the screen from left
to right.






When the beam reaches the right side of the bottom line, it has to move back to the upper
left corner of the screen.
i. Horizontal retracing: 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 the screen, after refreshing each scan line is called the horizontal retrace.
ii. Vertical retracing: At the end of each frame, the electron beam returns to the top
left corner of the screen to begin the next frame is called the vertical retrace.
iii. Interlacing: It is the method of incrementally displaying a visual on a CRT. On
some raster scan systems, each frame is displayed in two passes using an interlaced
refresh procedure.
In the first pass, the beam sweeps across every other scan line from top to bottom.
Then after the vertical retrace, the beam sweeps out the remaining scan lines.
The screen is painted 60 times per second but only half of the lines are painted per
frame.
For example: Even numbered lines are painted first and then odd numbered lines
are painted on each pass.
So the entire screen in two passes is painted 30 times every second.
Horizontal retracing
It is used to refer to the
beam moving back to
the left at the end of
each line.
Vertical retracing
Refer to the movement
from bottom to top.



1-6
Computer Graphics
E
ve
n fie
ld
O
dd field
A C
B
D

Figure 1.3
iv. The picture definition is stored in memory area called refresh buffer or frame
buffer. Buffer stands for temporary memory area. The main storage in refresh buffer
is the intensity values for all screen points.
a. In raster scan display black and white systems are used for intensity
indications in terms of 0 and 1.
b. In case of colour displays the different intensities are stored in frame buffer.
c. Raster scan display is well suited for realistic images showing colour patterns
and shading.
d. The refreshing rate of raster scan display is 60 to 80 frames per second.
Advantages of Raster Scan display
i. It uses interlacing techniques to paint the image on screen.
ii. It gives realistic effect to images.
iii. Cost is low.
Disadvantages of Raster Scan Display
Not suitable for line drawing applications.


Basic of Computer Graphics 1-7
1.3.2 Random Scan Display
In a random scan system, also called vector, stroke writing or
calligraphic the electron beam directly draws the picture.
A
B C
D
E
F

Figure 1. 4
DP
Display
file
Advantages:
Light pen pick
Built-in lines
Disadvantages:
Flickering
No realistic shading
Programming more
difficult
Random scan display
Working
CPU
System memory Display processor
Monitor
System bus
I/O devices
Graphics commands are translated into a display
file stored in the system memory.

Figure 1.5
Here the electron gun of the CRT illuminates points and / or
straight lines in any order.
The display processor repeatedly reads a variable display
file defining a sequence of X, Y co-ordinates the electron gun
the whole display area is updated many times a second from
image data held in raster memory.

BTE [S.2010] - 4M
Write short note on
random scan
display.
English Word ==| = ==| = ==| = ==| =
Calligraphic = = =+
====
Illuminates = ==



1-8
Computer Graphics
Random scan monitor draw pictures line by line hence known as vector displays. The
component lines of pictures can be drawn and refreshed in particular order. e.g.: Pen
plotter.
Picture definition is stored as set of line drawing commands in an area of memory
referred as a refresh display file. For displaying picture line commands in display file
executed in sequence or cycle.
Refresh rate of random scan display is 30 to 60 times per second. Random scan display is
used in vector based application and its resolution is high as compare to raster scan
display.
Advantages of Random Scan
i. Very high resolution, limited only by monitor.
ii. Easy animation, just draw at different position.
iii. Requires little memory.
Disadvantages of Random Scan
i. Requires intelligent electron beam, i.e. processor controlled.
ii. Limited screen density before have flicker, cant draw a complex image.
iii. Limited colour capability.
iv. It is very expensive.
Difference between Random Scan Display and Raster Scan Display
Random Scan Display Raster Scan Display
i. In random scan display the beam is moved
between the end points of the graphics primitives.
In raster display the beam is moved all over the screen
one scan line at a time, from top to bottom and then
back to top.
ii. Random display flickers when the number of
primitives in the buffer becomes too large.
In raster display, the refresh process is independent of
the complexity of the image.
iii. Scan conversion is not required. Graphics primitives are specified in terms of their
endpoints and must be scan converted into their
corresponding pixels in the frame buffer.
iv. Scan conversion hardware is not required. Because each primitive must be scan-converted, real
time dynamics is far more computational and requires
separate scan conversion hardware.
v. Random display draws a continuous and smooth
lines.
Raster display can display mathematical smooth lines,
polygons and boundaries curved primitives only by
approximately them with pixels on the ratster grid.
vi. Cost is more Cost is low.
vii. Random display only draws lines and characters. Raster display has ability to display a filled with solid
colours of patterns.



Basic of Computer Graphics 1-9

Applications of Raster Scan Graphics
i. Flight simulation: The use of the computer base flight
simulators saves air line companies huge sums of
money.
ii. Animation: The raster scan display can also be used for
painting surface on which individual frames are
prepared for animated sequences.
iii. Design: Realistic views of solid objects, machine part,
glass bottles, buildings can be generated on raster scan
display using store geometric description of the objects.
iv. Technical illustration: The surface of the raster scan
display can be used as interactive drafting table for the
preparation of technical illustration.
v. Printing and plotting: Raster scan printers have been
design for generating hard copy output of the text and
images.
vi. Image processing: New techniques are constantly
developed for dealing with sampled images of real
world scenes.
1.4 FRAME BUFFER
A frame buffer is a video output device that drives a video
display from a memory buffer containing a complete frame of
data.
Or
A buffer that stores the contents of an image pixel by pixel.
Many different kinds of memory have been used in frame
buffers: Drums, disks, integrated circuit, shift registers and
core stores.
Types of Frame Buffers
i. Rotating memory frame buffer
ii. Shift register frame buffer
iii. Random access frame buffer
iv. Multiple plane frame buffer




Applications of raster
scan graphics:
i. Flight simulation
ii. Animation
iii. Design
iv. Technical illustration
v. Printing and plotting
vi. Image processing








Definition
Frame Buffer
A frame buffer is a video
output device that drives
a video display from a
memory buffer containing
a computer frame of
data.









Shift
register
Rotating
memory
Random
access
Multiple
plane
Frame buffers









1-10
Computer Graphics
1.4.1 Rotating Memory Frame buffer
The earliest frame buffers made use of disks and drums for image storage. The rotational
frequency of these devices can be made to coincide with the frequency generally chosen
for TV refresh. It is therefore possible to read intensity values from drum or disk, convert
them into analog voltage values, and thus construct a video signal. Each track of the
memory device provides single stream of bits; therefore one bit of memory represent
each pixel. For more intensity precision several tracks must be used in parallel.
D/A
converter
Drum
CRT
Video signal

Figure 1.6: Rotating memory frame buffer
Above diagram shows the use of four tracks in parallel to provide frame buffer with
16 different intensity levels. Frame buffers of this type used to drive clusters of
displays, in this way the relatively high cost of rotating memory could be spared
among the number of terminals.
1.4.2 Shift Register Frame Buffer
Shift register frame buffer: To generate a video signal from digital memory we must
read the contents of the memory at constant high frequency. A fresh intensity value is
required each time the CRTs electron beam moves to a new pixel on a standard TV
monitor this occurs every 90 nano seconds and on high resolution display time drops to
25 nano seconds or less. Integrated circuits are better ever to achieve high memory
bandwidths.
A shift register is particularly appropriate circuit for use in a frame buffer every time a
pulse is applied to the shift register ,its content are shifted by one place ,displacing one
bit from one end of register and allowing one bit to be added at other end. As each bit
emerges from shift register it can be used as an intensity value and then insert into the
other end of the register to keep the content circulating. Several shift register in parallel
can be used where more than one bit of intensity per pixel is required. We construct the


Basic of Computer Graphics 1-11
frame buffer out of number of shift registers, each one representing one column of pixel
on TV screen.
For example, if screen image has 256 scan lines each of 340 pixels, we use 340 shift
registers of 256 bits each .Each shift register is shifted once per horizontal scan and
contribute one bit to scan line. The registers are shifted in carefully staggered sequence
so that they produce bits of data at the exact movement they are needed to contribute to
the video signal.
The use of circulating memories, such as disks, drums, and shift registers poses serious
latency problem.
1.4.3 Random- Access Frame Buffer
The modern frame buffer uses random access integrated memory circuits. Each pixels
intensity is represented by 1,2,4,8,or more bits of memory; one bit is sufficient for text
and simple graphics and leads to relatively inexpensive display; two and four bits are
useful in applications that require to display solid areas of gray or the color and eight or
more bits are needed for quality shaded pictures. In a simplest method color components
of each pixel are defined. The bits representing the pixel can be divided into three
groups of bits, each indicating the intensity of one of the three primary color
components. In an 8 bit byte, 3 bits are normally allocated to red, 3 to green and 2 to blue
and these three components are then fed to three guns of the color TV monitor.
D/A
converters
Red Green Blue
From
frame
buffer
Red signal
Blue signal
Green
signal
8-bit pixel register

Figure 1.7: Decoding color values stored in a frame buffer
1.4.4 Multiple Plane Frame Buffer
The provision of multiple bits per pixels is not only useful in representing intensity and
the colour but allows the frame buffer to be treated as several planes, each containing
separate image .Division into planes can be made in several different ways and 8 bits per
pixel frame buffer can represent single image to the 8 bits of intensity precision ,two


1-12
Computer Graphics
images to 4 bit of precision and ,4 images to the 2 bits of precision , or 8 separate black
and white images.
By dividing the frame buffer into the plane we can apply the variety of different kinds of
video mixing. One plane can be used to show a static picture and another to show a
symbol or a picture part that user wish to drag around the screen.
In animation system, several moving objects can be displayed as separate planes.
Multiple plane buffers should provide following capabilities:
i. Each plane should be provided with pair of registers to indicate co-ordinate
position of the plane relative to the screen co-ordinate system.
ii. It should be possible to define the plane of less than full screen size in order to
economize on money use.
iii. A full range of logical functions should provide for concatenating the contents of
the plane. So it is possible to inclusive-OR two planes together to combine their
images.
Strengths and Weaknesses of Frame Buffer
i. The frame buffer is one of the most versatile display device.
ii. For the application that involves shading, solid areas of
colour, high quality text, or any type of image
processing the frame buffer offers satisfactory form of
display.
iii. It does not offer the compact way of representing an image.
iv. The large amount of memory it uses make it expensive.
v. The time taken to fill the memory or change its content makes interactive response
slow at time.
1.5 DISPLAY DEVICES
In computer system commonly used display device is video monitor, the operation of
most video monitors based on it.
The following display devices is used in computer graphics:
i. CRT
ii. Color CRT monitor
iii. DVST
iv. Flat panel display

BTE [S.2010] - 4M
List any four display
device.
English Word ==| = ==| = ==| = ==| =
intensity = =-=
Versatile = =:=



Basic of Computer Graphics 1-13
1.5.1 Cathode Ray Tube (CRT)
A Cathode Ray Tube (CRT) is a specialized vacuum tube in which images are produced
when an electron beam strikes a phosphorescent surface. Most desktop computer
displays make use of CRTs. The CRT in a computer display is similar to the "picture tube"
in a television receiver.
All CRT's have three main elements: an electron gun, a deflection system, and a screen.
The electron gun provides an electron beam, which is a highly concentrated stream of
electrons. The deflection system positions the electron beam on the screen, and the
screen displays a small spot of light at the point where the electron beam strikes it.
Working of CRT
The basic operation of CRT is shown in fig. below:
Healing
filament
Cathode
Control
grid
Accelerating
system
Focusing
system
Vertical
deflection
plate
Phosphor
coated screen
Electron beam
Horizontal
deflection
plate

Figure 1.8: Basic operation of CRT
Working Principle of CRT
The electrons are emitted by electron gun. These electrons pass through focusing and
deflection system. The beam of electrons strike at specified points on the phosphor
coated screen. When it falls on screen small spot of light is generated at each position
where beams strikes.
The light of phosphor fades after sometime. So electron beam is repeated quickly to
redraw picture in the screen on the same point. The phosphor in screen is of different
persistence. The term persistence is used to represent time interval during which
phosphor emit after beam is removed.
The phosphor may have low or high persistence. If persistence is low then it will be
suitable for animation. If persistence is high it will be used for display highly complex
pictures in CRT. We use cathode to heat the electrons. Cathode is heated by filament.
The electrons are accelerated towards phosphor coating by high positive voltage.

BTE [S.2011] - 4M
Draw a labeled
diagram of CRT.


1-14
Computer Graphics







List of main components
of cathode tube
i. Electron gun
ii. Focusing system
iii. Deflection coils
iv. Phosphor coated
screen

English Word ==| = ==| = ==| = ==| =
Accelerating = ++| -'-
Main Components Cathode Ray Tube
i. Electron Gun: The primary components of an electron
gun in a CRT are the heated metal cathode and a
control grid. The cathode is heated by an electric
current passed through a coil of wire called the
filament. This causes electrons to be boiled off the hot
cathode surface. In the vacuum inside the CRT
envelope, negatively charged electrons are then
accelerated towards the phosphor coating by a high
positive voltage. The accelerating voltage can be
generated with a positively charged metal coating on
the inside of the CRT envelope near the phosphor
screen, or an accelerating anode can be used.
Sometimes the electron gun is built to contain the
accelerating anode and focusing system within the
same unit.

Control Grid is used to surround the cathode. Grid is cylindrical in shape. It is
made up of metal. Grid has hole at one end, through which electrons get escaped.
The control grid is kept at lower potential as compared to cathode, so that an
electrostatic field can be created. It will direct that electrons through point source,
so process of focusing will be simplified. The brightness of picture can be
controlled by adjusting flow of electrons and current in beam.
ii. Focusing system: Focusing system is done by special focusing structure made up
of two or more metal plates. The plates have different potential. An accelerating
structure is also used in combination with focusing structure. Accelerating
structure has two metal plates, the plates are perpendicular to each other beam can
pass through these plates because holes are provided at center of plates. The plates
are kept at high potential so that beam can be accelerated at desired velocity.
iii. Deflection System: It is also called as yoke. It is located at neck of CRT tube. It is
responsible for addressing of CRT. Deflection system consists of two pairs of coils.
One coil controls horizontal deflection, whereas other controls vertical deflection.
The deflection coils deflect the information rapidly so that it can be displayed
clearly on screen without any flickering.
iv. Phosphors: A variety of phosphor is available. Phosphor has different colors. Color
generally used is white. White color is suitable for dark background.
It should have small size. It should have high efficiency in terms of electric energy
converted into light. It should have distance to burning under prolonged excitation.
Screen
Phosphor
coating
Deflection
coils
Control
grid
Cathode
Interior metallic coating
at high positive voltage
Focusing
system
Electron
gun
Heating
filament

Você também pode gostar