Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 47

COMPUTER GRAPHICS

Unit 1: Introduction of
Computer Graphics

Facilitator: Frank
Course code: CS 8205
Email: frankibrahim25@gmail.com
Tel:+255757050205
Course aim: This Course aim to empower
students with knowledge on developing and
working with computer and mobile graphics.

Objectives
 To understand the fundamental computer
graphics topics
 To study basic mathematical backgrounds
related to computer graphics including linear
algebra and geometry.
 Understand vividly, those computer graphic
algorithms
Working through this Course:
 To complete this course, you are required to
read each study units, read the textbooks and
other materials.
 Each unit contains self assessment and at certain
points in the course you would be required to
submit assignment for assessment purposes.
 At the end of the course there is a final
examination.
 The course should take you about 16 weeks to
complete.
Assessment
 There are three aspects of assessment of the course.
First is made up of self assessment exercise(quiz),
second consists of tutor marked assignments and
the third is the end of semester examination.

 Continuous Assessment:
 Coursework 40%
 End of Semester Exam 60%

 Assessment breakdown:
 Test1(10) & Test 2(10) 20 Marks
 Quiz 10Marks
 Presentation(group) 10Marks
TEXT BOOKS
1. “Computer Graphics C version”, Donald
Hearn and M.Pauline Baker, Pearson
Education
2. “Computer Graphics Principles & practice”,
second edition in C, Foley, VanDam, Feiner
and Hughes, Pearson Education.
Introduction
 Computer graphics is the field related to
generation of graphics using computer.
 It includes creation, storage and manipulation
of images of object.
 These object come from diverse and expanding
set of fields including physical, mathematical,
artistic, biological, and even conceptual
(abstract) structures.
 It is related to the generation and the
representation of graphics by a computer using
specialized graphic software and hardware.
 The graphics can be photographs, drawing,
movies, simulations etc.
 Basically there are two types of computer
graphics namely
 Interactive computer graphics: that is the
user controls the contents structure and
appearance of the images of objects by using
input devices.
 Non-interactive computer graphics: it is
the computer graphics in which user does
not have any kind of control over the image.
 Image is merely the product of static stored
program and will work according to the
instructions given in the program linearly.
 The image is totally under the control of
program instructions not under the user.
Example: screen savers.
 In computer graphics object are presented as a
collection of discrete picture element.
 Picture element = pixel
 Pixel is the smallest graphical picture or unit
represented on the computer screen.
 Graphics should be generated by controlling pixel.
 The control is achieved by setting the intensity
and color of the pixel which compose the screen.
 The process of determining the appropriate pixels
for representing pictures or graphics object is
known as rasterization.
 The process of representing continuous picture or
graphics object as a collection of discrete pixel is
called scan conversion
 Raster: rectangular array of points and dots.
 Pixel or picture element: one dot or picture
element of the raster.
 Scan line: A row of pixel.

 Note: Raster device coordinate can have only


integer values. We don’t have any pixel like 1.8,
2.9 etc.
Applications of computer graphics
 Presentation graphics: In this applications
reports are generated on slides or
transparencies.
 It is normally used to summarized financial,
statistical, mathematical, scientific and
economics data for research.
 Graphs charts can be in 3-D formats to make
presentation.
 Graphics user interphase: Major component
of GUI interface is a window manager that
allows a user to display multimedia window
areas.
 Interface generally comes with a menu and
icons for fast selection of processing options.
 Icon is graphic symbol designed to look like
a processing option.
 Computer art: Computer graphics widely used
in fine arts and commercial applications.
 Artist use a variety of applications like paint
packages, mathematics packages, desktop
publishing software and animation program.
 Telemedicine: In this application physician can
consult with one another using video
conferencing capabilities, where all can see the
data and images, it brings together experts from
a number of places in order to provide better
care.
 Also used in bio-medical instrument like
cardiogram, CT-Scan reports, X-rays.
 Education: A wide range of individual
education software with multimedia.
 It also used in classroom to enhance the
educational experience and simplify
teacher’s work.
 In distance learning, where all students may
not be at the same place during a class.
 Entertainment: It is used in making motion
pictures, music, videos, and television show.
 Auto CAD: Use of computer graphics in design
process of engineering and architecture system.
 Auto cad applications are designed to create
buildings, automobiles, aircraft, spacecraft,
textiles, and more models.
 Visual reality: Virtual reality provides a very
realistic effect using sight and sound, while
allowing the user to interact with the virtual
word.
 Image processing: Image processing, converts
an existing image into digitized form by
converting the image file format.
 Image processing technique is mostly used
in commercial application that can
rearrange/modify image in different format.
 Image processing: Image processing, converts
an existing image into digitized form by
converting the image file format.
 Image processing technique is mostly used
in commercial application that can
rearrange/modify image in different format.
Graphics input devices
 Keyboard
 Mouse
 Trackball and Spaceball
 Joystick
 Image scanner
 Touch panel

Basic terms

Resolution
 Resolution is defined as the maximum number
of points that can be displayed horizontally and
vertically without overlap on display device.
 You have probably seen that in your own computer
settings, you have monitor resolution of 640 X 480,
800 X 600, 1024 X 768, 1152 X 864, 1280 X 1024
 Image resolution is the distance from one pixel to
next pixel.
 The unit image pixel is ppi (pixel per inch)
 In normal PC monitor it ranges between 25 to
80 pixels per inch.
 Screen Resolution: It is the number of distinct
pixels in each dimension that can be displayed.
 For example, a computer with a display
resolution of 1280 x 768 will produce a
maximum of 98,3040 pixels on a display screen.
Aspect Ratio
 Aspect ratio is the ratio between width of an image
and the height of an image.
 It is normally shown by two numbers separated
by colon, as in 4:3. Here, the primary number
tells that the picture is 4 units wide and the
subsequent number tells that the picture is 3
units high.

Various kinds of Aspect Ratios


 1:1 (Square) Standard: Square displays are rarely
utilized in gadgets and screens. The square video
was promoted by versatile applications, for
example, Instagram and has since been upheld by
other significant social stages including Facebook
and Twitter.
 4:3 Standard: standard has been being used for
TVs since creation of moving picture cameras
and numerous PC screens used to have similar
aspect ratio.
 16:10(8:5) Standard: is an aspect ratio
generally utilized for PC presentations and
tablet PCs.
 16:9 Standard: is universal standard
configuration of HDTV, non-HD computerized
TV, and simple widescreen TV.
Numerical problem
Qn. Consider a RBG raster system is to be designed
using 8inch by 10inch screen with a resolution of 100
pixels per inch in each direction. If want to store 8 bits
per pixel in the frame buffer, how much storage do we
need for the frame buffer?

Solution
Size of screen = 8inch x 10 inch
Pixel per inch(resolution) = 100
Total no. of pixel = (8*100)*(10*100) = 800000 pixels
Per pixel storage = 8 bit
Total storage required in frame buffer = 800000*8bits
= 6400000 bits
= 6400000/8 bytes
= 800000 bytes
Numerical problem
Q:Consider three different raster systems with
resolutions of 640 x 480 and1280 x 1024,What size is
frame buffer (in bytes) for each of these systems to
store 12 bits per pixel?

Solution
640 x 480 x 12 bits / 8 = 450KB.
1280 x 1024 x 12 bits / 8 = 1920KB.

Q: Find out the aspect ratio of the raster system using


8 x 10 inches screen and 100 pixel/inch.?

Solution
Aspect ratio = width/height = 8*100/10*100 = 4/5
Fluorescence/phosphorescence
 When the beam electron emitted by electron
gun strikes the phosphor coated screen on the
CRT, the phosphor emits a small spot at each
position contacted by the electron beam.
 It last just a fraction of millisecond.

Persistence
 Persistence is defined as the time it takes the
emitted light from the screen to decay to one-
tenth of its original intensity.
 The phosphor used for graphics display device
usually have persistence of 10 to 60
microsecond.
Display Devices/output devices
 The most common graphics output device is the
video monitor which is based on the standard
cathode ray tube (CRT) design, but several
other technologies exist and solid state monitors
may eventually predominate.
Cathode-Ray Tubes (CRT)
 A cathode ray tube is an evacuated glass tube,
with a heating element on one end and
phosphor-coated screen on the other end.

 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.
 When electron strikes on the 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.
 The glowing positions are used to represent the
picture in the screen.
 There are two technique used for producing
images on the CRT screen.
 Vector scan/random scan display
 Raster scan display

Vector scan/random scan display


 When operated as a random-scan display unit, a
CRT has the electron beam directed only to the
parts of the screen where a picture is to be
drawn.
 Random scan monitors draw a picture one line
at a time and for this reason are also referred to
as vector displays (or stroke-writing or
calligraphic displays).
 Picture definition is stored as a set of line drawing
commands in an area of memory called refresh
display file or display list, display program, or
simply the refresh buffer.
 To display a picture, the system cycles through the
set of commands in the display file. After all
commands are processed, the system cycle backs to
the first lie command in the list.
 Random-scan systems are designed for line
drawing applications and cannot display realistic
shaded scenes.
 Since picture definition is stored as a set of line
drawing instructions and not as a set of intensity
values for all screen points, vector displays
generally have higher resolution than raster
systems.
Architecture of random scan system

Raster-Scan Displays
 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.
 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).
 Home television sets and printers are examples of
other systems using raster-scan methods.
Color CRT Monitors
 To display color pictures, combination of
phosphorus is used that emits different colored
light.
 There are two different techniques for producing
color displays with a CRT.
 Beam Penetration Method
 Shadow Mask Method
Color CRT Monitors
 To display color pictures, combination of
phosphorus is used that emits different colored
light.
 There are two different techniques for producing
color displays with a CRT.
 Beam Penetration Method
 Shadow Mask Method

Beam Penetration Method


 The beam-penetration method for displaying color
pictures has been 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.
 At intermediate beam speeds, combinations of red
and green light are emitted to show two additional
colors, orange and yellow.
 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.
Shadow Mask Method
 Shadow-mask methods are 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.
 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 passes 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.
Direct-View Storage Tubes (DVST)
 In raster scan display we do refreshing of the
screen to maintain a screen image.
 DVST gives alternative method for maintaining the
screen image.
 The term storage tube refers to the ability of screen
to retain the image which has been projected
against it, thus avoiding the need to rewrite the
image constantly.
 A direct-view storage tube (DVST) stores the
picture information as a positive charge distribution
just behind the phosphor-coated screen.
Components of DVST
 Electron guns: Two electron guns are used in
DVST :
 Primary gun is used to store picture pattern.
 Flood gun is used to maintain picture display on
phosphor coated screen.
 Phosphor Coated Screen: In DVST the inner
surface of CRT is coated with phosphor crystals is
of high persistence that emit light when beam of
electrons strike them.
 Storage Mesh: It is thin and high quality wire that
is coated with dielectric and is located just behind
phosphor coated screen.
 Primary gun deposits pattern of positive charge on
this grid and it is transferred to phosphor coated
screen by continuous flood of electrons produced
by flood gun.
 Thus Storage Mesh stores picture to be displayed
in form of positive charge distribution.
 Collector: This grid is located just behind storage
mesh and purpose of this negatively charged grid is
to smooth out flow of flood electrons.
Direct-View Storage Tubes (DVST)
Flat-Panel Displays
 The term flat panel display refers to a class of
video device that have reduced volume, weight and
power requirement compared to a CRT.
 A significant feature of flat-panel displays is that
they are thinner than CRTs, and we can hang them
on walls or wear them on our wrists.
 Since we can even write on some flat-panel
displays, they will soon be available as pocket
notepads.
 Current uses for flat-panel displays include small
TV monitors, calculators, pocket video games,
laptop computers, armrest viewing of movies on
airlines, as advertisement boards in elevators, and
as graphics displays in applications requiring
rugged, portable monitors.
 We can separate flat-panel displays into two
categories:
 Emissive displays
 Nonemissive displays.
 The emissive displays (or emitters) are devices
that convert electrical energy into light. For
example Plasma panels, thin-film
electroluminescent displays, and- light-emitting
diodes.
 Nonemmissive displays (or nonemitters) use
optical effects to convert sunlight or light from
some other source into graphics patterns. The most
important example of a nonemissive flat-panel
display is a liquid-crystal device.
Difference between random scan and raster scan
system

Raster scan system Random scan system

Electron bean scans entire screen to Electron bean scan only the part of
draw a picture screen where picture information is
present

It has low resolution It has high resolution


Picture information is stored as set of Picture definition is stored as line
discrete intensity values in frame buffer. drawing commands in display list.
Intensity value is sorted for each pixel, it System is designed to display lines, it
displayed realist scene. cant display realistic scene.
Pixel location of screen is used to draw Mathematical function are used to draw
an image. an image.
Video controller is required Video controller not required.
Used to display dynamic scene Used to display static scene
Graphics software and standard
 Graphics software is classified into two categories
 General programming package: They are like
programming languages, they contain rich set of
graphics functions. Such graphics packages
allow to draw some primitives, fill the color, set
the intensity, apply transformation etc.
 Open GL, Open CV is examples of such
packages. They are more of programmer
oriented.

 Special-purpose application package Application


graphics packages are designed for
nonprogrammers, so user can create required
graphics without worrying about underlying
concepts.
 The interface to the graphics routines in such
packages allow user to communicate with the
programs in their own terms. Examples of such
applications packages are paint, CAD etc.

Graphics software standard


 The primary intension of standardization of
graphics software is portability.
 The packages are designed with standard graphics
functions so that they can be used with different
hardware system and used in different
implementations and applications.
 The graphical kernel system (GKS) was developed
to adopt the first graphics software standard by the
international standard organization(ISO)
GOODBYE

frank

You might also like