You are on page 1of 14
Chapter 1 BASICS OF COMPUTER GRAPHICS [20 MARKS] Chapter Details 1.1 Introduction 1.2 Basic of Computer
Chapter 1
BASICS OF
COMPUTER
GRAPHICS
[20 MARKS]
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

1-2 Computer Graphics Graphical and Statistical representation of questions asked from this chapter in previous years
Graphical and Statistical representation of questions asked from this chapter in previous years MSBTE Question Papers
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 Definition Computer Graphics is a field which deals with

Basic of Computer Graphics

1-3
1-3

1.1

INTRODUCTION

Definition

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.”

English Word ejkBh ejkBh ejkBh vFkZ ejkBh vFkZ vFkZ vFkZ Interactive = ijLijkaoj fØ;k d: ‘kd.kkjs
English Word
ejkBh
ejkBh
ejkBh vFkZ
ejkBh vFkZ
vFkZ
vFkZ
Interactive = ijLijkaoj fØ;k
d: ‘kd.kkjs

“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

Basic of Computer Graphics 1-3 1.1 INTRODUCTION Definition Computer Graphics is a field which deals with

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.

Basic of Computer Graphics 1-3 1.1 INTRODUCTION Definition Computer Graphics is a field which deals with
1-4 Computer Graphics English Word ejkBh ejkBh ejkBh vFkZ ejkBh vFkZ vFkZ vFkZ Assimilate = vkRelkr
1-4
Computer Graphics
English Word
ejkBh
ejkBh
ejkBh vFkZ
ejkBh vFkZ
vFkZ
vFkZ
Assimilate = vkRelkr
dj.ks] ,d:Ik gks.ks
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.
Stimulates = mRrstu ns.ks
Sweep = >kM.k s
1.3
RASTER SCAN DISPLAY AND
RANDOM SCAN DISPLAY
Refresh
DP
VC
buffer
Advantages:
Disadvantages:
1.3.1
Raster Scan Display
Realistic shading
Aliasing
No flickering
Scan conversion
Raster scan CRT much works like television set. Light occurs
when an electron beam stimulates a phosphor.
Raster scan system
BTE [S.2010] - 4M
Write short note on
raster scan display.
A fixed area of system
memory reserved for
frame buffer
CPU
System memory Frame buffer
Video controller
Monitor
System bus
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.

1-5 Basic of Computer Graphics Horizontal retracing 0 Scanline 1 2 It is used to refer
1-5
Basic of Computer Graphics
Horizontal retracing
0
Scanline
1
2
It is used to refer to the
beam moving back to
the left at the end of
each line.
3
Horizontal
retrace
4
Vertical retracing
5
6
Refer to the movement
from bottom to top.
7
Vertical
8
retrace
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.

1-6 Even field Computer Graphics Odd field A C B D Figure 1.3 iv. The picture
1-6
Even field
Computer Graphics
Odd 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.
ii.
iii.
It uses interlacing techniques to paint the image on screen.
It gives realistic effect to images.
Cost is low.
Disadvantages of Raster Scan Display
Not suitable for line drawing applications.
1-7 Basic of Computer Graphics 1.3.2 Random Scan Display In a random scan system, also called
1-7
Basic of Computer Graphics
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.
Display
DP
file
B
C
Advantages:
Disadvantages:
Light pen pick
Built-in lines
Flickering
No realistic shading
Programming more
difficult
Random scan display
D
A
E
F
BTE [S.2010] - 4M
Write short note on
random scan
display.
Figure 1. 4
Working
Graphics commands are translated into a display
file stored in the system memory.
CPU
System memory
Display processor
Monitor
System bus
I/O devices
Figure 1.5
Here the electron gun of the CRT illuminates points and / or
straight lines in any order.
English Word
ejkBh
ejkBh
ejkBh vFkZ
ejkBh vFkZ
vFkZ
vFkZ
Calligraphic = lanjq gLrk{kj
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.
vlysyk
Illuminates = ped.k s

1-8

Computer Graphics

1-8 Computer Graphics Random scan monitor draw pictures line by line hence known as vector displays.

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
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, can’t 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.
ii.
iii.
Random display flickers when the number of
primitives in the buffer becomes too large.
Scan conversion is not required.
iv.
Scan conversion hardware is not required.
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.
In raster display, the refresh process is independent of
the complexity of the image.
Graphics primitives are specified in terms of their
endpoints and must be scan converted into their
corresponding pixels in the frame buffer.
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.
vi.
Cost is more
Random display only draws lines and characters.
Raster display can display mathematical smooth lines,
polygons and boundaries curved primitives only by
approximately them with pixels on the ratster grid.
Cost is low.
vii.
Raster display has ability to display a filled with solid
colours of patterns.
Basic of Computer Graphics Applications of Raster Scan Graphics 1-9 i. Flight simulation: The use of

Basic of Computer Graphics

Applications of Raster Scan Graphics

1-9
1-9
  • 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.

Applications

of

raster

scan graphics:

  • i. Flight simulation

ii. Animation iii. Design iv. Technical illustration

  • v. Printing and plotting vi. Image processing

Definition
Definition
  • 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.

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”.

  • 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.

Basic of Computer Graphics Applications of Raster Scan Graphics 1-9 i. Flight simulation: The use of

Rotating memory frame buffer Shift register frame buffer Random access frame buffer Multiple plane frame buffer

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.

ii.

iii.

iv.

 

Frame buffers

 
   
Frame buffers Rotating Shift Random Multiple memory register access plane
Frame buffers Rotating Shift Random Multiple memory register access plane
Frame buffers Rotating Shift Random Multiple memory register access plane
Frame buffers Rotating Shift Random Multiple memory register access plane

Rotating

Shift

Random

Multiple

memory

register

access

plane

1-10

Computer Graphics

1-10 Computer Graphics 1.4.1 Rotating Memory Frame buffer The earliest frame buffers made use of disks

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.

Video signal D/A converter CRT Drum Figure 1.6: Rotating memory frame buffer Shift Register Frame Buffer
Video signal
D/A
converter
CRT
Drum
Figure 1.6: Rotating memory frame buffer
Shift Register 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: 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 CRT’s 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

Basic of Computer Graphics

1-11
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
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.
From
Red
Green
Blue
8-bit pixel register
frame
buffer
Blue signal
Green
signal
Red signal
D/A
converters
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

1-12 Computer Graphics images to 4 bit of precision and ,4 images to the 2 bits

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
In animation system, several moving objects can be displayed as separate planes.
Multiple plane buffers should provide following capabilities:
i.
ii.
iii.
Each plane should be provided with pair of registers to indicate co-ordinate
position of the plane relative to the screen co-ordinate system.
It should be possible to define the plane of less than full screen size in order to
economize on money use.
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.
English Word
ejkBh
ejkBh
ejkBh vFkZ
ejkBh vFkZ
vFkZ
vFkZ
intensity = dMkdk
Versatile = v”ViSyq
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.
iv.
It does not offer the compact way of representing an image.
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.
ii.
BTE [S.2010] - 4M
List any four display
device.
iii.
iv.
CRT
Color CRT monitor
DVST
Flat panel display
Basic of Computer Graphics 1.5.1 Cathode Ray Tube (CRT) 1-13 A Cathode Ray Tube (CRT) is

Basic of Computer Graphics

  • 1.5.1 Cathode Ray Tube (CRT)

1-13
1-13

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
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:
BTE [S.2011] - 4M
Draw a labeled
diagram of CRT.
Horizontal
Focusing
deflection
system
plate
Healing
filament
Electron beam
Cathode
Vertical
Control
Accelerating
deflection
grid
system
plate
Phosphor
coated screen
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.

1-14

Computer Graphics

1-14 Computer Graphics Electron Focusing gun system Control grid Deflection Interior metallic coating at high positive

Electron

Focusing

gun

system

Control

grid

Deflection

1-14 Computer Graphics Electron Focusing gun system Control grid Deflection Interior metallic coating at high positive

Interior metallic coating at high positive voltage

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

Heating

filament

Cathode

Screen coils Phosphor coating List of main components of cathode tube i. Electron gun ii. Focusing
Screen
coils
Phosphor
coating
List of main components
of cathode tube
i.
Electron gun
ii. Focusing system
iii. Deflection coils
iv. Phosphor coated
screen
English Word
ejkBh
ejkBh
ejkBh vFkZ
ejkBh vFkZ
vFkZ
vFkZ
same unit.
Accelerating = xrh ok<fo.k s
clearly on screen without any flickering.

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

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

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.