0% found this document useful (0 votes)
19 views75 pages

Mod1

Module I covers the basics of computer graphics, including types of graphics (interactive and non-interactive), line and circle drawing algorithms, and various applications in education, architecture, and entertainment. It discusses display devices such as CRTs and raster scan displays, as well as pixel concepts, resolution, and aspect ratios. The module also highlights the importance of input and output devices in computer graphics systems.

Uploaded by

leemong335
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
19 views75 pages

Mod1

Module I covers the basics of computer graphics, including types of graphics (interactive and non-interactive), line and circle drawing algorithms, and various applications in education, architecture, and entertainment. It discusses display devices such as CRTs and raster scan displays, as well as pixel concepts, resolution, and aspect ratios. The module also highlights the importance of input and output devices in computer graphics systems.

Uploaded by

leemong335
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 75

MODULE I

Module – 1(Basics of Computer graphics and Algorithms)

• Basics of Computer Graphics and its applications.

• Video Display devices- Refresh Cathode Ray Tubes, Random Scan Displays
and systems, Raster scan displays and systems.

• Line drawing algorithms- DDA, Bresenham’s algorithm.

• Circle drawing algorithms- Midpoint Circle generation algorithm,


Bresenham’s algorithm.
CST 304-CGIP AB 6

6
Basic concepts in Computer Graphics

• Computer graphics is an art of drawing pictures on computer screens with the


help of programming.

• It involves computations, creation and manipulation of data.

Basically there are two types of computer graphics

• Interactive computer graphics

• Non interactive computer graphics

CST 304-CGIP AB 7

7
Interactive Computer Graphics:

• Interactive computer graphics work using the concept of two-


way communication between computer and users.

• The computer will receive signals from the input device, and the picture is
modified accordingly.

• Picture will be changed quickly when we apply command.

• In interactive Computer Graphics user have some controls over the


picture, i.e., the user can make any change in the produced image.
CST 304-CGIP AB 8
• One example of it is the ping-pong game.

Advantages:

• Higher Quality
• More precise results or products
• Greater Productivity
• Significantly enhances our ability to understand data and to perceive trends.

CST 304-CGIP AB 9

9
Non-Interactive or Passive Computer Graphics:

• In non-interactive computer graphics, the picture is produced


on the monitor, and the user does not have any controlled over
the image, i.e., the user cannot make any change in the rendered
image.

• One example of its Titles shown on T.V.

• Non-interactive Graphics involves only one-way communication


between the computer and the user, User can see the produced
image, and he cannot make any change in the image.
CST 304-CGIP AB 10
Application of Computer Graphics
Education and Training
• Computer-generated model of the physical, financial and economic system is often
used as educational aids.

• Model of physical systems, physiological system, population trends or equipment can


help trainees to understand the operation of the system.

• For some training applications, particular systems are designed. For example Flight
Simulator.

CST 304-CGIP AB 11

1
1
• Flight Simulator:

• It helps in giving training to the pilots of airplanes.

• These pilots spend much of their training not in a real aircraft


but on the ground at the controls of a Flight Simulator.

• Use in Biology:

• Molecular biologist can display a picture of molecules and gain


insight into their structure with the help of computer graphics.

CST 304-CGIP AB 12
Computer-Generated Maps:
• Town planners and transportation engineers can use computer-generated maps
which display data useful to them in their planning work.

Architect:
• Architect can explore an alternative solution to design problems at an
interactive graphics terminal.

• In this way, they can test many more solutions that would not be possible
without the computer.

CST 304-CGIP AB 13

30-08-2020 )
CS401- COMPUTER GRAPHICS(Asha Baby,VJEC 10
Presentation Graphics:

• Example of presentation Graphics are bar charts, line graphs, pie charts and other
displays showing relationships between multiple parameters.

• Presentation Graphics is commonly used to summarize, financial reports,


statistical reports, mathematical reports, scientific reports, economic Data for
research reports, managerial reports, consumer information bulletins, and other
types of reports.

CST 304-CGIP AB 14
Computer Art:
• Computer Graphics are also used in the field of commercial arts.
• It is used to generate television and advertising commercial.

Entertainment

• Computer graphics are now commonly used in making motion pictures,


music videos and television shows.

CST 304-CGIP AB 15
Visualization:

• It is used for visualization of scientists, engineers, medical personnel,


business analysts for the study of a large amount of information.

Educational Software:

• Computer Graphics is used in the development of educational


software for making computer-aided instruction.

CST 304-CGIP AB 16
Printing Technology:
 Computer Graphics is used for printing technology and textile design.

Example of Computer Graphics Packages:


• LOGO
• COREL DRAW
• AUTO CAD
• 3D STUDIO
• CORE
• GKS (Graphics Kernel System)
• PHIGS
• CAM (Computer Graphics Metafile)
• CGI (Computer Graphics Interface)

CST 304-CGIP AB 17
Pixel
• Pixel is the smallest element of an image.

• Each pixel correspond to any one value.

• In an 8-bit gray scale image, the value of the pixel between 0 and 255.

• The value of a pixel at any point correspond to the intensity of the light
photons striking at that point.

• Each pixel store a value proportional to the light intensity at that


particular location.
CST 304-CGIP AB 18
In the first picture, there may be thousands of pixels, that together make up this image.

We will zoom that image to the extent that we are able to see some pixels division.

It is shown in the image below.

CST 304-CGIP AB 19
Calculation of total number of pixels

• We have define an image as a two dimensional signal or matrix.

• Then in that case the number of PEL would be equal to the number of rows
multiply with number of columns.

• This can be mathematically represented as below:


Total number of pixels = number of rows ( X ) number of columns

CST 304-CGIP AB 20
 Gray level

• The value of the pixel at any point denotes the intensity of image
at that location, and that is also known as gray level.

CST 304-CGIP AB 21
Pixel value
• Each pixel can have only one value and each value denotes the intensity of light
at that point of the image.
• The value 0 means absence of light. It means that 0 denotes dark, and it further
means that when ever a pixel has a value of 0, it means at that point, black color
would be formed.
• Have a look at this image matrix

0 0 0
0 0 0
0 0 0

• Total no of pixels = total no. of rows X total no. of columns


= 3×3 = 9 pixels.
CST 304-CGIP AB 22
• An image would be formed with 9 pixels, and that image would have a dimension
of 3 rows and 3 column and most importantly that image would be black.

• The resulting image that would be made would be something like this

CST 304-CGIP AB 23
• Aspect ratio is the ratio of the width of an image to the height of the image.

• This ratio is expressed as x:y, and differs in case of different images used in
photography, television, computer applications and so on.

• The resolution of an image is the total number of pixels displayed on your


computer or television screen.

• Generally, the higher the resolution, the higher is the quality of the image.

CST 304-CGIP AB 24
Aspect ratio Resolution

Ratio of the width of an image to the Total number of pixels displayed on


height of the image (x:y). your computer or television screen
without overlap.

The common aspect ratios used are The common monitor resolutions
4:3,16:9 are 640x480, 800x600 and
1024x768.

CST 304-CGIP AB 25
Input devices
• The input devices are the hardware that is used to transfer input to the
computer.

• The data can be in the form of text, graphics, sound, and text.

• Output device display data from the memory of the computer.

• Output can be text, numeric data, line, polygon, and other objects.

CST 304-CGIP AB 26
Output devices

Following are some of the important output devices used in a computer.

Display devices
Graphic Plotter
Printer

CST 304-CGIP AB 27
Display devices
• The display device is an output device used to represent the information in the
form of images (visual form).

• Display systems are mostly called a video monitor or Video display unit (VDU).

• The purpose of display technology is to simplify information sharing.

• Today, the demand for high-quality displays is increasing.

CST 304-CGIP AB 28
Display devices

• Cathode-Ray Tube(CRT)
• Color CRT Monitor
• Liquid crystal display(LCD)
• Light Emitting Diode(LED)
• Direct View Storage Tubes(DVST)
• Plasma Display
• 3D Display

CST 304-CGIP AB 29
Cathode-Ray Tube(CRT)

• The primary output device in a graphics system is a video monitor.


• The operations of the video monitors is based on the standard cathode ray tubes
design.
• A CRT is an electronic tube designed to display electrical data.
The basic CRT consists of 4 major components
• Electron gun
• Focusing and accelerating anode
• Horizontal and vertical deflection plates
• Evacuated glass envelop

CST 304-CGIP AB 30
CST 304-CGIP AB 31
• A beam of electrons (cathode rays), emitted by an electron gun, 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 picture.

• 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

CST 304-CGIP AB 32
CST 304-CGIP AB 33
• The primary components of an electron gun in a CRT are the heated metal
cathode and a control grid.

• Heat is supplied to the cathode by directing a current through a coil of wire,


called the filament, inside the cylindrical cathode structure.

• This causes electrons to be ‘boiled off" the hot cathode surface.

• In the vacuum inside the CRT envelope, the free, negatively charged electrons are
then accelerated toward the phosphor coating by a high positive voltage.

CST 304-CGIP AB 34
• 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.

• Intensity of the electron beam is controlled by setting voltage


levels on the control grid, which is a metal cylinder that fits
over the cathode.

CST 304-CGIP AB 35
• Since the amount of light emitted by the phosphor coating depends on the number
of electrons striking the screen, we control the brightness of a display by varying
the voltage on the control grid.

• The focusing system in a CRT is needed to force the electron beam to converge
into a small spot as it strikes the phosphor.

• Otherwise, the electrons would repel each other, and the beam would spread out as
it approaches the screen.

• Focusing is accomplished with either electric or magnetic fields. Electrostatic


focusing is commonly used in television and computer graphics monitors.

CST 304-CGIP AB 36
• As with focusing, deflection of the electron beam can be controlled either with
electric fields or with magnetic fields.

• Different kinds of phosphors are available for use in a CRT. Besides color, a major
difference between phosphors is their persistence, how long they continue to
emit light after the CRT beam is removed.

• Persistence is defined as the time it takes the emitted light from the screen to
decay to one-tenth of its original intensity.

CST 304-CGIP AB 37
• Lower persistence phosphors require higher refresh rates to
maintain a picture on the screen without flicker.

• A phosphor with low persistence is useful for animation, a


high-persistence phosphor is useful for displaying highly
complex, static pictures.

• Although some phosphors have a persistence greater than 1


second, graphics monitors are usually constructed with a
persistence in the range from 10 to 60 microseconds.

CST 304-CGIP AB 38
• The maximum number of points that can be displayed without overlap on a CRT
is referred to as the resolution.

• A more precise definition of resolution is the number of points per centimeter


that can be plotted horizontally and vertically, although it is often simply stated as
the total number of points in each direction.

• Resolution of a CRT is dependent on the type of phosphor, the intensity to be


displayed, and the focusing and deflection systems.

CST 304-CGIP AB 39
• Typical resolution on high-quality systems is 1280 by 1024, with
higher resolutions available on many systems.
• High- resolution systems are often referred to as high-definition
systems.

• Another property of video monitors is aspect ratio.

• It is the ratio of the width of an image to the height of the image

CST 304-CGIP AB 40
• (Sometimes aspect ratio is stated in terms of the ratio of
horizontal to vertical points.)

• An aspect ratio of 3/4 means that a vertical line plotted


with three points has the same length as a horizontal line
plotted with four points

CST 304-CGIP AB 41
There are two ways by which we can display an object on the screen.
Raster scan display and random scan display

Raster scan display


• The most common type of graphics monitor employing a CRT is the raster-scan display,
based on television technology.

• In a raster-scan system, the electron beam is swept across the screen, one row at a time
from top to bottom.

• As the electron beam moves across each row, the beam intensity is turned on and off to
create a pattern of illuminated spots.
CST 304-CGIP AB 42
• Picture definition is stored in a memory area called the refresh
buffer or frame buffer.

• This memory area holds the set of intensity values for all the
screen points.

• Stored intensity values are then retrieved from the refresh buffer
and "painted" on the screen one row (scan line) at a time .

• Each screen point is referred to as a pixel or pel (shortened forms


of picture element).

CST 304-CGIP AB 43
CST 304-CGIP AB 44
• Raster scan display used in home television sets and printers.

• In a simple black-and-white system, each screen point is either on or off, so only


one bit per pixel is needed to control the intensity of screen positions.

• For a bilevel system, a bit value of 1 indicates that the electron beam is to be
turn on at that position, and a value of 0 indicates that the beam intensity is to be
off.

CST 304-CGIP AB 45
• Additional bits are needed when color and intensity variations
can be displayed.

• Up to 24 bits per pixel are included in high-quality systems,


which can require several megabytes of storage for the frame
buffer, depending on the resolution of the system.

• A system with 24 bits per pixel and a screen resolution 1024 by


1024 requires 3 megabytes of storage for the frame buffer.

CST 304-CGIP AB 46
• On a black-and-white system with one bit per pixel, the frame buffer is commonly
called a bitmap.

• For systems with multiple bits per pixel, the frame buffer is referred to as a
pixmap.

• Refreshingon raster-scan displays is carried out at the rate of 60 to 80 frames


per second, although some systems are designed for higher refresh rates.

CST 304-CGIP AB 47
• Sometimes, refresh rates are described in units of cycles per
second, or Hertz (Hz), where a cycle corresponds to one frame.

• Using these units, we would describe a refresh rate of 60 frames


per second as simply 60 Hz.

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

CST 304-CGIP AB 48
• The return to the left of the screen, after refreshing each scan
line, is called the horizontal retrace of the electron beam.

• And at the end of each frame (displayed in 1/80th to 1/60th of a


second), the electron beam returns (vertical retrace) to the top
left comer of the screen to begin the next frame.

CST 304-CGIP AB 49
Random scan display

• When operated as 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.

• A pen plotter operates in a similar way and is an example of a random-scan, hard-


copy device.

CST 304-CGIP AB 50
• 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.

• Sometimes the refresh display file is called the display list,


display program, or simply the refresh buffer

CST 304-CGIP AB 51
CST 304-CGIP AB 52
• To display a specified picture, the system cycles through the set of commandsin the
display file, drawing each component line in turn.

• After all line drawing commands have been processed, the system cycles back to
the first line command in the list.

• Random scan displays are designed to draw all the component lines of a picture 30
to 60 times each second.

• Random scan systems are designed for line drawing applications and can not
display realistic shaded scenes.

CST 304-CGIP AB 53
• 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.

CST 304-CGIP AB 54
CST 304-CGIP AB 55
RASTER SCAN SYSTEMS

CST 304-CGIP AB 56
• Interactive raster graphics systems typically employ several processing units.

• In addition to the central processing unit, or CPU, a special-purpose processor,


called the video controller or display controller, is used to control the operation
of the display device.

• The frame buffer can be anywhere in the system memory, and the video
controller accesses the frame buffer to refresh the screen.

CST 304-CGIP AB 57
Video Controller

CST 304-CGIP AB 58
• A fixed area of the system memory is reserved for the frame buffer, and the video
controller is given direct access to the frame-buffer memory.

• Frame buffer locations, and the corresponding screen positions, are referenced in
Cartesian coordinates.

• For many graphics monitors, the coordinate origin is defined at the lower left
screen corner .

CST 304-CGIP AB 59
• The screen surface is then represented as the first quadrant of a
two-dimensional system, with positive x values increasing to the
right and positive y values increasing from bottom to top.

• Scan lines are then labeled from ymax at the top of the screen to 0
at the bottom.

• Along each scan line, screen pixel positions are labeled from 0 to
xmax

CST 304-CGIP AB 60
Basic refresh operations
• Two registers are used to store the coordinates of the screen pixels.

• Initially, the x register is set to 0 and the y register is set to ymax .

• The value stored in the frame buffer for this pixel position is then retrieved and
used to set the intensity of the CRT beam.

• Then the x register is incremented by 1, and the process repeated for the next
pixel on the top scan line.

• This procedure is repeated for each pixel along the scan line.
CST 304-CGIP AB 61
• After the last pixel on the top scan line has been processed, the x register is reset
to 0 and the y register is decremented by 1.

• Pixels along this scan line are then processed in turn, and the procedure is repeated
for each successive scan line.

• After cycling through all pixels along the bottom scan line (y = 0), the video
controller resets the registers to the first pixel position on the top scan line and the
refresh process starts over.

CST 304-CGIP AB 62
• Since the screen must be refreshed at the rate of 60 frames per second, the simple
procedure cannot be accommodated by typical RAM chips.

• The cycle time is too slow. To speed up pixel processing, video controllers can
retrieve multiple pixel values from the refresh buffer on each pass.

• The multiple pixel intensities are then stored in a separate register and used to
control the CRT beam intensity for a group of adjacent pixels.

• When that group of pixels has been processed, the next block of pixel values is
retrieved from the frame buffer.

CST 304-CGIP AB 63
CST 304-CGIP AB 64
• In addition to the CPU ,the raster graphics system is also contains a separate
display processor, referred to as graphics controller and display coprocessor.

• The purpose of the display processor is to free the CPU from the graphics chores.

• In addition to the system memory , a separate display processor memory area


can also be provided.

CST 304-CGIP AB 65
RANDOM SCAN SYSTEMS

CST 304-CGIP AB 66
• It is also known as vector system.

• An application program is input and stored in the system memory along with a graphics
package.

• Graphics commands in the application program are translated by the graphics package
into a display file stored in the system memory.

• This display file is then accessed by the display processor to refresh the screen.

• The display processor cycles through each command in the display file program once
during every refresh cycle.

• Sometimes the display processor in a random scan system is referred to as a display


processing unit or a graphics controller.
CST 304-CGIP AB 67
• Graphics patterns are drawn on a random scan system by directing the electron
beam along the component lines of the picture.

• Lines are defined by the values for their coordinate endpoints, and these input
coordinate values are converted to x and y deflection voltages.

• A scene is then drawn one line at a time by positioning the beam to fill in the line
between specified endpoints.

CST 304-CGIP AB 68
Suppose you have a raster system designed using an 8 inches × 10 inches screen
with a resolution of 100 pixels per inch in each direction. What frame buffer size is
required if 6 bits are stored per pixel in the buffer? (4)

CST 304-CGIP AB 69
Answer

 Here, resolution = 8 inch X 10 inch


 First, we convert it in pixel then Now resolution = 8 X 100 by 10 X
100 pixel = 800
 X 1000 pixel
 1 pixel can store 6 bits
 So, frame buffer size required = 800 X 1000 X6 bits = 600,000 bytes
= × 5bytes.
 8

CST 304-CGIP AB 70
Color CRT Monitors

• A CRT monitor displays color pictures by using a combination of phosphors that


emit different colored light.

• By combining the emitted light from the different phosphors, a range of colors can
be generated.

• The two basic techniques for producing color displays with a CRT are the beam-
penetration method and the shadow-mask method.

CST 304-CGIP AB 71
The beam penetration method

• It is used with random scan monitors.

• Two layers of phosphor, usually red and green, are coated onto the inside of the
CRT screen, and the displayed color depends on how far the electron beam
penetrates into the phosphor layers.

• A beam of slow electrons excites only the outer red layer.

• A beam of very fast electrons penetrates through the red layer and excites the inner
green layer.
CST 304-CGIP AB 72
• At intermediate beam speeds, combinations of red and green light are emitted to
show two additional colors, orange and yellow.

• The screen color at any point, is controlled by the beam acceleration voltage.

• Beam penetration has been an inexpensive way to produce color in random scan
monitors.

• But only four colors are possible, and the quality of pictures is not as good as
with other methods.

CST 304-CGIP AB 73
Shadow-mask methods

• It is commonly used in raster scan systems (including color TV) because they
produce a much wider range of colors than the beam penetration method.

• A shadow mask CRT has three phosphor color dots at each pixel position.

• One phosphor dot emits a red light, another emits a green light, and the third
emits a blue light.

• This type of CRT has three electron guns, one for each color dot, and a shadow-
mask grid just behind the phosphor-coated screen.
CST 304-CGIP AB 74
Delta-delta shadow mask method

CST 304-CGIP AB 75
• Commonly used in color CRT systems.

• The three electron beams are deflected and focused as a group onto the shadow
mask, which contains a series of holes aligned with the phosphor dot patterns.

• When the three beams pass through a hole in the shadow mask, they activate a dot
triangle, which appears as a small color spot on the screen.

• 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.
CST 304-CGIP AB 76
• We obtain color variations in a shadow mask CRT by varying the intensity levels of the
three electron beams.

• By turning off the red and green guns, we get only the color coming from the blue
phosphor.

• Other combinations of beam intensities produce a small light spot for each pixel position,
since our eyes tend to merge the three colors into one composite.

CST 304-CGIP AB 77
• The color we see depends on the amount of excitation of the
red, green, and blue phosphors.

• A white area is the result of activating all three dots with equal
intensity.

• Yellow is produced with the green and red dots only, magenta is
produced with the blue and red dots, and cyan shows up when
blue and green are activated equally.

CST 304-CGIP AB 78
Direct-View Storage Tubes
• An alternative method for maintaining a screen image is to store the picture
information inside the CRT instead of refreshing the screen.

• A direct-view storage tube (DVST) stores the picture information as a charge


distribution just behind the phosphor-coated screen.

• Two electron guns are used in a DVST.

• One, the primary gun, is used to store the picture pattern;

• Second, the flood gun, maintains the picture display.

CST 304-CGIP AB 79
Advantages over refresh CRT
• Very complex pictures can be displayed at very high resolutions
without flicker.

Disadvantages of DVST systems


• They do not display color.

• The erasing and redrawing process can take several seconds for a
complex picture.

CST 304-CGIP AB 80

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy