0% found this document useful (0 votes)
11 views

computer graphics lecture 1 or 2

The document provides an introduction to computer graphics, defining it as the technology that processes and presents information visually through images and animations. It discusses the importance of studying computer graphics for visualization, entertainment, and various applications in fields such as architecture, medicine, and gaming. Additionally, it covers the history of computer graphics and its evolution, highlighting key developments and applications across multiple domains.

Uploaded by

Muhammad Danish
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)
11 views

computer graphics lecture 1 or 2

The document provides an introduction to computer graphics, defining it as the technology that processes and presents information visually through images and animations. It discusses the importance of studying computer graphics for visualization, entertainment, and various applications in fields such as architecture, medicine, and gaming. Additionally, it covers the history of computer graphics and its evolution, highlighting key developments and applications across multiple domains.

Uploaded by

Muhammad Danish
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/ 31

1-Introduction to Computer Graphics VU

Lecture No.1 Introduction to Computer Graphics


1.1 Definition

Computers accept process, transform and present information.

Computer Graphics involves technology to accept, process, transform and present


information in a visual form that also concerns with producing images (or animations)
using a computer.

1.2 Why Study Computer Graphics?

There are certain important reasons to study computer graphics. We will discuss them
under certain heads:

Visualization
I like to see what I am doing. Many a times it happens that you perform certain tasks
which you cannot visualize; for example as a student of data structures, you implement
trees, graphs and other Abstract Data Types (ADTs) but you cannot visualize them
whereas you must be having an inner quest to see what these actually look like.

I like to show people what I am doing. Similarly at certain times you would be
performing certain tasks which you know but it would be difficult for others to
understand them so there is very important requirement of showing the things in order to
make them understandable.

Graphics is interesting
We are visual creatures and for us a picture is worth a thousand words. If we can get rid
of text based static screen and get some graphics; it’s always interesting to see things in
colours and motion on the screen. Therefore graphics is interesting because it involves
simulation, algorithm, and architecture.

Requirement
Well there are certain areas which require use of computer graphics heavily. One
example is drawing of machines. It is required to prepare drawing of a machine before the
actual production. The other heavy requirement is for architects as they have to prepare a
complete blue print of the building they have to build long before the actual construction
work gets underway. AutoCAD and other applications of the kind are heavily used today
for building architecture.

Entertainment
Merely a couple of decades back, the idea of a 24 hours Cartoons Network was really a
far fetched one. That was the time when one would wait for a whole week long before
getting an entertainment of mere 15 minutes. Well thanks to computer graphics that have
enabled us to entertain ourselves with animated movies, cartoons etc.

3
© Copyright Virtual University of Pakistan
1-Introduction to Computer Graphics VU

1.3 Some History

The term “computer graphics” was coined in 1960 by William Fetter to describe the new
design methods that he was developing at Boeing. He created a series of widely
reproduced images on a plotter exploring cockpit design using a 3D model of a human
body.

Whirlwind: early graphics using Vector Scope (1951)

Spacewars: first computer graphics game (MIT 1961)

4
© Copyright Virtual University of Pakistan
1-Introduction to Computer Graphics VU

First CAD system (IBM 1959)

First bump-mapped images (Blinn 1978)

Early texture-mapped image (Catmull 1974)

5
© Copyright Virtual University of Pakistan
1-Introduction to Computer Graphics VU

First distributed ray traced image (Cook 1984)

First ray traced image (Whitted 1980)

1.4 Graphics Applications

Due to rapid growth in the field of computing, now computer is used as an economical
and efficient tool for the production of pictures. Computer graphics applications are found
in almost all areas. Here we will discuss some of the important areas including:

i. User Interfaces
ii. Layout and Design
iii. Scientific Visualization and Analysis
iv. Art and Design
v. Medicine and Virtual Surgery
vi. Layout Design & Architectural Simulations
vii. History and cultural heritage
viii. Entertainment
ix. Simulations
x. Games

6
© Copyright Virtual University of Pakistan
1-Introduction to Computer Graphics VU

User Interfaces

Almost all the software packages provide a graphical interface. A major component of
graphical interface is a window manager that allows a user to display multiple windows
like areas on the screen at the same time. Each window can contain a different process
that can contain graphical or non-graphical display. In order to make a particular window
active, we simply have to click in that window using an interactive pointing device.

Graphical Interface also includes menus and icons for fast selection of programs,
processing operations or parameter values. An icon is a graphical symbol that is designed
to look like the processing option it represents.

B205 Control Console (1960)

Impressive and Interactive 3D environment

7
© Copyright Virtual University of Pakistan
1-Introduction to Computer Graphics VU

3D Studio MAX

Layout and Design

8
© Copyright Virtual University of Pakistan
1-Introduction to Computer Graphics VU

Scientific Visualization and Analysis

Computer graphics is very helpful in producing graphical representations for scientific


visualization and analysis especially in the field of engineering and medicine. It helps a
lot in drawing charts and creating models.

9
© Copyright Virtual University of Pakistan
1-Introduction to Computer Graphics VU

ART AND DESIGN


Computer graphics is widely used in Fine Arts as well as commercial arts for producing
better as well as cost effective pictures. Artists use a variety of programs in their work,
provided by computer graphics. Some of the most frequently used packages include:
Artist’s paintbrush
Pixel paint
Super paint

10
© Copyright Virtual University of Pakistan
1-Introduction to Computer Graphics VU

Medicine and Virtual Surgery


Computer graphics has extensive use in tomography and simulations of operations.
Tomography is the technique that allows cross-sectional views of physiological systems
in X-rays photography. Moreover, recent advancement is to make model and study
physical functions to design artificial limbs and even plan and practice surgery.

Computer-aided surgery is currently a hot topic.

11
© Copyright Virtual University of Pakistan
1-Introduction to Computer Graphics VU

Room Layout Design and Architectural Simulations

12
© Copyright Virtual University of Pakistan
1-Introduction to Computer Graphics VU

Layout Design & Architectural Simulations

13
© Copyright Virtual University of Pakistan
1-Introduction to Computer Graphics VU

History and cultural heritage


Another important application of computer graphics is in the field of history and cultural
heritage. A lot of work is done in this area to preserve history and cultural heritage. The
features so for provide are:

ƒ Innovative graphics presentations developed for cultural heritage


applications
ƒ Interactive computer techniques for education in art history and archeology
ƒ New analytical tools designed for art historians
ƒ Computer simulations of different classes of artistic media

14
© Copyright Virtual University of Pakistan
1-Introduction to Computer Graphics VU

15
© Copyright Virtual University of Pakistan
1-Introduction to Computer Graphics VU

Movies
Computer graphics methods are now commonly used in making motions pictures, music
videos and television shows. Sometimes the graphics scenes are displayed by themselves
and sometimes graphics objects are combined with the actors and live scenes. A number
of hit movies and shows are made using computer graphics technology. Some of them
are:

Star Trek- The Wrath of Khan


Deep Space Nine
Stay Tuned
Reds Dreams
She’s Mad

Tron (1980)
First time computer graphics were used for live action sequences.

16
© Copyright Virtual University of Pakistan
1-Introduction to Computer Graphics VU

Fully computer generated animated features

17
© Copyright Virtual University of Pakistan
1-Introduction to Computer Graphics VU

Star Wars (1977)

18
© Copyright Virtual University of Pakistan
1-Introduction to Computer Graphics VU

Star Trek II: The Wrath of Khan, genesis

The Last Starfighter (15 minutes) (1982)

The Last Starfighter (15 minutes) (1982)

19
© Copyright Virtual University of Pakistan
1-Introduction to Computer Graphics VU

Special
Effects… in
Live Action
Cinema

20
© Copyright Virtual University of Pakistan
1-Introduction to Computer Graphics VU

“Traditional” Animated
Features…
Some examples:
• Automating Keyframing in
many Disney-type
animations
• The flocking behaviour of
the wild beast in Lion King
•Non photorealistic
rendering: 3D effects in
Futurama

21
© Copyright Virtual University of Pakistan
1-Introduction to Computer Graphics VU

Behind the scenes on Antz Production


Number of frames in the movie 119,592
Number of times the movie was rendered during production 15 (approx.)
Number of feet of approved animation produced in a week 107 ft.
Total number of hours of rendering per week 275,000 hrs.
Average size of the frame rendered 6 MB
Total number of Silicon Graphics servers used for rendering 270
Number of desktop systems used in production 166
Total Number of processors used for rendering 700
Average amount of memory per processor 256 MB
Time it would have taken to render this movie on 1 processor 54 yrs., 222 days, 15 mins., 36
Amount of storage required for the movie 3.2 TB
Amount of frames kept online at any given time 75000 frames
Time to re-film out final cut beginning to end 41.5 days (997 hrs.)

22
© Copyright Virtual University of Pakistan
1-Introduction to Computer Graphics VU

Simulations
Simulation by all means is a very helpful tool to show the idea you have or the work you
are doing or to see the results of your work. Given below is the picture in which you can
see wave’s ripples on water; no doubt looking like original but is simply a simulation. A
number of software packages are used for simulation including:

Crackerjack Computer Skills


Keen Artistic Eye
Flash
Maya

Game
Thanks to computer graphics, real time games are now possible. Now game programming
itself has become an independent field and game programmers are in high demand. Some
of the famous games are:

• Quake
• Dooms
• Need For Speed
• Commandos
23
© Copyright Virtual University of Pakistan
1-Introduction to Computer Graphics VU

Related Disciplines

Data
Processing
DATA
Computer
Vision Computer
Graphics

IMAGES

Image
Processing
Interdisciplinary
ƒ Science
ƒ Physics: light, color, appearance, behavior
ƒ Mathematics: Curves and Surfaces, Geometry and Perspective
ƒ Engineering
ƒ Hardware: graphics media and processors, input and output devices
ƒ Software: graphics libraries, window systems
ƒ Art, Perception and Esthetics
ƒ Color, Composition, Lighting, Realism

24
© Copyright Virtual University of Pakistan
2-Graphics Systems I VU

Lecture No.2 Graphics Systems I


Introduction of Graphics Systems
With the massive development in the field of computer graphics a broad range of graphics
hardware and software systems is available. Graphics capabilities for both two-
dimensional and three-dimensional applications are now common on general-purpose
computers, including many hand-held calculators. On personal computers there is usage
of a variety of interactive input devices and graphics software packages; whereas, for
higher-quality applications some special-purpose graphics hardware systems and
technologies are employed.

VIDEO DISPLAY DEVICES


The primary output device in a graphics system is a video monitor. The operation of most
video monitors is based on the standard cathode-ray-tube (CRT) design, but several other
technologies exist and solid-state monitors may eventually predominate.

Refresh Cathode-Ray Tubes


Following figures illustrate the basic operation of a CRT. 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.

The light emitted by the phosphor fades very rapidly therefore to keep the picture it is
necessary to keep the phosphor glowing. This is achieved through redrawing the picture
repeatedly by quickly directing the electron beam back over the same points and the
display using this technique is called refresh CRT.

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 filament (a
coil of wire), inside the cylindrical cathode structure. Heating 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.

25
© Copyright Virtual University of Pakistan
2-Graphics Systems I VU

The accelerating voltage can be generated with a positively charged metal coating on
the inside of the CRT envelope near the phosphor screen an accelerating anode can be
used.

Intensity of the electron beam is controlled by setting voltage levels on the control grid,
a metal cylinder that fits over the cathode. A high negative voltage applied to the control
grid will shut off the beam by repelling electrons and stopping them from passing through
the small hole at the end of the control grid structure. A smaller negative voltage on the
control grid simply decreases the number of electrons striking the phosphor coating on
the screen.

It is the responsibility of focusing system to converge electron beam to a small spot


where it strikes the phosphor. Otherwise the electrons will repel each other and the beam
would disperse. This focusing is achieved through electric or magnetic fields.

In electrostatic focusing the electron beam passes through a positively charged metal
cylinder that forms an electrostatic lens. Then electrostatic lens focuses the electron beam
at the center of the screen. Similar task can be achieved with a magnetic field setup by a
coil mounted around the outside of the CRT envelope. Magnetic lens focusing produces
the smallest spot size on the screen and is used in special purpose devices.

The distance that the electron beam must travel from gun to the exact location of the
screen that is small spot is different from the distance to the center of the screen in most
CRTs because of the curvature therefore some additional focusing hardware is required
in high precision systems to take beam to all positions of the screen. This procedure is
achieved in two steps in first step beam is conveyed through the exact center of the screen
26
© Copyright Virtual University of Pakistan
2-Graphics Systems I VU

and then additional focusing system adjust the focusing according to the screen position
of the beam.

Cathode-ray tubes are now commonly constructed with magnetic deflection coils
mounted on the outside of the CRT envelope. Two pairs of coils are used, with the coils
in each pair mounted on opposite sides of the neck of the CRT envelope. One pair is
mounted on the top and bottom of the neck and the other pair is mounted on opposite
sides of the neck. The magnetic field produced by each pair of coils results in a traverse
deflection force that is perpendicular both to the direction of the magnetic field and to the
direction of travel of the electron beam. Horizontal deflection is achieved with one pair
of coils, and vertical deflection by the other pair. The proper deflection amounts are
attained by adjusting the current through the coils. When electrostatic deflection is used,
two pairs of parallel plates are mounted inside the CRT envelope. One pair of plates is
mounted horizontally to control the vertical deflection, and the other pair is mounted
vertical to control horizontal deflection.

Phosphor is available in different kinds. One variety is available in color but a major
issue is their persistence. Persistence is defined as the time it takes the emitted light from
the phosphor to decay to one-tenth of its original intensity. Lower persistence phosphors
require higher refresh rates to maintain a picture on the screen without flicker. A
phosphor with low persistence is useful for displaying highly complex, static pictures.
Monitors normally come with persistence in the range from 10 to 60 microseconds.

The maximum number of points (that can be uniquely identified) 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.
Finally aspect ratio; is the ratio of vertical points to horizontal points necessary to
produce equal-length lines in both directions on the screen. 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.

RASTER-SCAN SYSTEMS
Raster scan is the most common type of monitors using CRT. In raster scan picture is
stored in the area called refresh buffer or frame buffer. First of all why information is
stored; because picture have to be refreshed again and again for this very reason it is
stored. Second is how it is stored; so picture is stored in a two dimensional matrix where
each element corresponds to each pixel on the screen. If there arise a question what is a
pixel? The very simple answer is a pixel (short for picture element) represents the shortest
27
© Copyright Virtual University of Pakistan
2-Graphics Systems I VU

possible unique position/ element that can be displayed on the monitor without
overlapping.

The frame buffer stores information in a two dimensional matrix; the question is that how
many bits are required for each pixel or element. If there is black and white picture then
there is only one bit required to store ‘0’ for black or 1 for white and in this case buffer
will be referred as bitmap. In colour pictures obviously multiple bits are required for
each pixel position depending on the possible number of colours for example to show 256
colours 8 bits will be required for each pixel and in case if multiple bits are used for one
pixel frame buffer will be referred as pixmap.

Now with the information in frame buffer, let us see how an image is drawn. The drawing
is done in a line-by-line fashion. After drawing each line from left to right it reaches at the
left end of the next line to draw next line; which is called horizontal retrace. Similarly
after completing all lines in horizontal fashion it again reaches the top left corner to start
redrawing the image (that is for refreshing) and this is called vertical retrace. Normally
each vertical retrace takes 1/60th of a second to avoid flickering.

There are two further methods to scan the image: interlaced and non-interlaced. In
interlaced display beam completes scanning in two passes. In one pass only odd lines are
drawn and in the second pass even lines are drawn. Interlacing provides effect of double
refresh rate by completing half of the lines in half of the time. Therefore, in systems with
low refresh rates interlacing helps avoid flickering.

RANDOM-SCAN Displays
In random-scan displays a portion of the screen can be displayed. Random-scan displays
draw a picture one line at a time and are also called vector displays (or stroke-writing or
calligraphic displays). In these systems image consists of a set of line drawing commands
referred to as Refresh Display File. Random-scan can refresh the screen in any fashion
by repeating line drawing mechanism.

Random-scan displays are designed to draw all the component lines of a picture 30 to 60
times each second. High-quality vector systems are capable of handling approximately
100,000 short lines at this refresh rate. When a small set of lines is to be displayed, each
refresh cycle is delayed to avoid refresh rates greater than 60 frames per second.
Otherwise, faster refreshing of the set of lines could burn out the phosphor.

Random-scan displays are designed for line-drawing applications and cannot display
complex pictures. The lines drawn in vector displays are smoother whereas in raster-scan
lines often become jagged.

Color CRT Monitors


A CRT monitor displays colour pictures by using a combination of phosphors that emit
different coloured light. With the combination of phosphor a range of colours can be
displayed. There are two techniques used in colour CRT monitors:

ƒ Beam Penetration Method


ƒ Shadow Mask Method

28
© Copyright Virtual University of Pakistan
2-Graphics Systems I VU

In beam penetration method two layers of phosphor, usually coated onto the inside of
the CRT screen, and the displayed colour depend on how far the electron beam penetrates
into the phosphor layers. At intermediate beam speeds, combinations of red and green
light are emitted to show two additional colours, orange and yellow. Beam penetration is
an inexpensive way to produce colours as only a few colours are possible and the quality
of picture is also not impressive.

Shadow mask methods can


display a wide range of colours.
In this technique each pixel
position is made up of three
phosphor dots called triads as
shown in the following figure.
Three phosphor dots have
different colors i.e. red, green and
blue and the display colour is
made by the combination of all three dots. Three guns are used to throw beam at the three
dots of the same pixel. By varying intensity at each dot a wide range of colours can be
generated.

A shadow-mask is used which has holes aligned with the dots so that each gun can fire
beam to corresponding dot only.

CRT Displays
Advantages
Fast response (high resolution possible)
Full colour (large modulation depth of E-beam)
Saturated and natural colours
Inexpensive, matured technology
Wide angle, high contrast and brightness
Disadvantages
Large and heavy (typ. 70x70 cm, 15 kg)
High power consumption (typ. 140W)
Harmful DC and AC electric and magnetic fields
Flickering at 50-80 Hz (no memory effect)
Geometrical errors at edges

Direct View Storage Devices

A direct view storage tube stores the picture


information as a charge distribution just
behind the phosphor-coated screen. Two
electron guns are used in this system as
shown in the following figure. They are:

ƒ Primary Gun
ƒ Flood Gun

Primary gun is used to store the picture


pattern whereas flood gun maintains the picture display.
29
© Copyright Virtual University of Pakistan
2-Graphics Systems I VU

DVST has advantage that no refresh is required so very complex pictures can be
displayed at very high resolutions without flicker. Whereas, it has disadvantage that
ordinarily no colors can be displayed and that selected parts of a picture cannot be erased.
To eliminate a picture section, the entire screen must be erased and the modified picture
redrawn. The erasing and redrawing process can take several seconds for a complex
picture.

Flat-Panel Displays
This is emerging technology slowly replacing CRT
monitors. The flat-panel displays have following
properties:

• Little Volume
• Light Weight
• Lesser Power consumption

Flat panels are used in calculators, pocket video games and


laptop computers.

There are two categories of flat panel displays:


• Emissive Display (Plasma Panels)
• Non-Emissive Display (Liquid Crystal Display)

The emissive displays (emitters) are devices that convert electrical energy into light.
Plasma panels, thin-film electro-luminescent displays, and light-emitting diodes are
examples of emissive displays. Non-emissive displays (non-emitters) use optical effects
to convert sunlight or light from some other
source into graphics patterns. The most
important example of a non-emissive flat-panel
display is a liquid-crystal device.

Plasma-panel Displays

Plasma panels also called gas-discharge displays


are constructed by filling the region between two
glass plates with a mixture of gases that usually
includes neon. A series of vertical conducting
ribbons is placed on one glass panel, and a set of
horizontal ribbons is built into the other glass panel. Firing
voltages applied to a pair of horizontal and vertical
conductors cause the gas at the intersection of the two
conductors to break down into glowing plasma of electrons
and ions. Picture definition is stored in a refresh buffer, and
the firing voltages are applied to refresh the pixel positions
60 times per second.

Advantages
–Large viewing angle
30
© Copyright Virtual University of Pakistan
2-Graphics Systems I VU

–Good for large-format displays


–Fairly bright
Disadvantages
–Expensive
–Large pixels (~1 mm versus ~0.2 mm)
–Phosphors gradually deplete
–Less bright as compared to CRTs, using more power

Liquid Crystal Displays

Liquid crystal refers to the fact that these


compounds have a crystalline arrangement
of molecules, yet they flow like a liquid.
Flat panel displays use nematic liquid
crystal, as demonstrated in the following
figures.

Two glass plates, each containing a light


polarizer at right angles to the other plate,
sandwich the liquid-crystal material. Rows
of horizontal transparent conductors are
built into one glass plate, and columns of
vertical conductors are put into the other
plate. The intersection of two conductors
defines a pixel position. Polarized light
passing through the material is twisted so
that it will pass through the opposite
polarizer. The light is then reflected back to
the viewer. To turn off the pixel, we apply
a voltage to the two intersecting conductors
to align the molecules so that the light is
not twisted.

LCD Displays

Advantages
Small footprint (approx 1/6 of CRT)
Light weight (typ. 1/5 of CRT)
Low power consumption (typ. 1/4 of CRT)
Completely flat screen - no geometrical errors
Crisp pictures - digital and uniform colours
No electromagnetic emission
Fully digital signal processing possible
Large screens (>20 inch) on desktops

Disadvantages
High price (presently 3x CRT)
Poor viewing angle (typ. +/- 50 degrees)
Low contrast and luminance (typ. 1:100)
Low luminance (Natural light) (typ. 200 cd/m2)
31
© Copyright Virtual University of Pakistan
2-Graphics Systems I VU

Three-Dimensional Viewing Devices


Graphics monitors for the display of three-dimensional scenes have been devised using a
technique that reflects a CRT image from a vibrating, flexible mirror. In this system when
varifocal mirror vibrates it changes focal length. These vibrations are synchronized with
the display of an object on a CRT so that
each point on the object is reflected from
the mirror into spatial position
corresponding to the distance of that
point from a specified viewing position.
This allows user to walk around an object
or scene and view it from different sides.

Virtual Reality Devices


Virtual reality system enables users to
move and react in a computer-simulated
environment. Various types of devices allow
users to sense and manipulate virtual objects
much as they would real objects. This natural
style of interaction gives participants the
feeling of being immersed in the simulated
world. Virtual reality simulations differ from
other computer simulations in that they require
special interface devices that transmit the
sights, sounds, and sensations of the simulated
world to the user. These devices also record
and send the speech and movements of the
participants to the simulation program.
To see in the virtual world, the user wears a
head-mounted display (HMD) with screens
directed at each eye. The HMD contains a
position tracker to monitor the location of the
user's head and the direction in which the user
is looking. Using this information, a computer
recalculates images of the virtual world to match the
direction in which the user is looking and displays
these images on the HMD.
Users hear sounds in the virtual world through
earphones in the HMD. The hepatic interface, which
relays the sense of touch and other
physical sensations in the virtual
world, is the least developed
feature. Currently, with the use of a
glove and position tracker, the user
can reach into the virtual world and
handle objects but cannot actually
feel them.

32
© Copyright Virtual University of Pakistan
2-Graphics Systems I VU

Another interesting simulation is interactive walk through. A sensing system in the


headset keeps track of the viewer’s opposition, so that the front and back of objects can
be seen as the viewer walks and interacts with the displays. Similarly given below is a
figure using a headset and a data glove worn on the right hand?

33
© Copyright Virtual University of Pakistan

You might also like