Professional Documents
Culture Documents
CS 361
COMPUTER GRAPHICS
TEXT BOOK :
COMPUTER GRAPHICS (using Open GL)
DONALD HEARN & M.PAULINE BAKER
CHAPTER 1
Introduction
What is Computer Graphics?
Applications
Graphics packages
1
3/19/2016
Computer Graphics.continued
Computer graphics is the pictorial representation and manipulation of data by a
2
3/19/2016
Realism
Interactivity
The creator
The consumer
Simulation environment
data.
6
3
3/19/2016
Modeling
4
3/19/2016
Presentation Graphics
Computer Art
Image Processing
5
3/19/2016
1.1.2.Presentation Graphics
Used to produce illustrations for reports or generate
slides for use with projectors
Commonly used to summarize financial, statistical,
mathematical, scientific, economic data for research
reports, managerial reports & customer information
bulletins
Examples : Bar charts, line graphs, pie charts, surface
graphs, time chart
6
3/19/2016
7
3/19/2016
1.1.3.Computer Art
logo design
Examples :
8
3/19/2016
Computer Art
Electronic painting
Picture painted electronically on a graphics tablet (digitizer)
using a stylus
Cordless, pressure sensitive stylus
Morphing
A graphics method in which one object is transformed into
another
9
3/19/2016
1.1.4.Entertainment
Movie Industry
Used in motion pictures, music videos, and television shows.
Used in making of cartoon animation films
10
3/19/2016
Game Industry
Focus on interactivity
11
3/19/2016
aircraft pilots
Training
12
3/19/2016
1.1.6.Visualization
Scientific Visualization
Scientific Visualisation
13
3/19/2016
Techniques used:
color coding,
contour plots,
graphs, charts,
surface renderings & visualizations of volume interiors.
Simulations of operations
14
3/19/2016
15
3/19/2016
OUTPUT
16
3/19/2016
Graphics System
Computer graphics involves :
Displays
Manipulation
Storage of pictures and experimental data for proper visualization using a computer.
Typical computer graphics system comprises of:
Host computer with support of:
Fast processor
Large memory
Frame buffer
Display devices( eg. Color monitors, CRT monitors, LCD monitors, Plasma)
Input devices(eg. Mouse, keyboard, joystick, touch screen, track ball)
Output devices (LCD panels, printers , plotters, etc)
Interface devices( video I/O, TV interfaces, etc)
17
3/19/2016
Output device
Input devices
Image formed in FB
CRT Monitor
Is the most commonly used display device..
There are different types of display devices :
1. DVST( Direct View Storage Tube)
2. Calligraphic or Random Scan Display
3. Refresh and Raster Scan Display Devices
DVST( Direct View Storage Tube)
With long persistence phosphors
Provides flickers-free display
No refreshing is necessary
A slow moving electron beam draws a line on the screen
Screen has strong mesh in which the phosphors is embedded
Image is stored as a distribution of charges on the inside surface of
the screen
18
3/19/2016
CRT Monitor(DVST)
CRT Monitor(DVST)
Heating filament is responsible for heating cathodes
Control grid
is a cylindrical device responsible for controlling the intensity
of beam.
is negatively charged
The amount of electron pass through control grid is controlled
by negative voltage
If the voltage in control grid is minimized, large number of
electron can pass through cylindrical device.
If the voltage in control grid is maximized, small amount of
electron can pass through cylindrical device.
Note that high intensity of beam implies high brightness and
less intensity of beam implies less brightness image
19
3/19/2016
CRT Monitor(DVST)
Focusing anode
is positively charged
Responsible for focusing electrons beam on particular point
on the screen
Accelerating anode
Is positively charged
Used to accelerate electrons to strike the screen at high speed
Has positive voltage
Horizontal defilation and Vertical defilation are used to deflect the
focusing beam
In the following diagram beam is deflected by using magnetic
deflection coils and electrostatic deflection
20
3/19/2016
GRAPHIC SOFTWARE
Is an intermediary b/n an application program and the
graphics hardware
The output primitives and interaction devices that a graphics
package supports can range from rudimentary to extremely
rich.
There are two general classifications for graphics software:
1) General Programming Packages, and
2) Special Purpose Applications Packages
General Programming Packages
Provides an extensive set of graphics functions that can be
used in a high-level programming languages, such as C++,
C, Fortran
GRAPHIC SOFTWARE
Basic functions in general packages include:
Generating picture components( straight line , circle,
polygon, .)
Setting color and intensity value
Applying transformations
Special Purpose Applications Packages
Designed for non programmers, so that users can generate
displays without worrying about how graphics operations
work.
Examples: -the artists painting programs
-various business, medical and CAD system
21
3/19/2016
SOFTWARE STANDARDS
A Standard graphics package implements a specification designated
by individual companies.
SOFTWARE STANDARDS
Some of standard graphic packages include:
1) GKS(Graphics Kernel System)
2) PHIGS(Programmers Hierarchical Interactive Graphics
System)
3) OpenGL(Open Graphics Library)
GKS(Graphics Kernel System)
Designed in 1970s
Was the first and most useful attempt to design an
international standard for computer graphics
Originally designed as a 2-D graphics packages, a 3-D GKS
extension was subsequently developed
22
3/19/2016
SOFTWARE STANDARDS
PHIGS(Programmers Hierarchical Interactive
Graphics System)
Designed in 1980s
Became a standard by 1989
Inherited many of its ideas from GKS
It is basically a library of about 400 functions that allow the
user to display and interact with 2-D and 3-D graphics
It manages objects in a hierarchical manner
PHIGS hides hardware dependent details from the user
Provides a set of familiar graphics objects called primitives;
each with attributes that controls:
SOFTWARE STANDARDS
Its location
Orientation
Color
Appearance
Surface rendering
Object modeling
Extension of PHIGS etc
OpenGL(Open Graphics Library)
Silicon graphics, makers of advanced graphics
workstations, initiated the development of OpenGL.
Other companies on industry-wide Architecture review board
include: DEC, INTEL, IBM, Microsoft, SUN Microsystems
23
3/19/2016
SOFTWARE STANDARDS
There is no cost to developing an application using the Open GL API
MS offers free download of the OpenGL libraries for its windows
systems
OpenGL specifies a set of commands or immediately executed functions
OpenGL comes with a large number of built in capabilities request able
through the API. These include:
Hidden surface removal
Alpha blending (transparency)
Texture mapping
Pixel operations
Viewing and modeling transformations
Atmospheric effects(fog, smoke and haze)
SOFTWARE STANDARDS
OpenGL is the computer companys standard application
Program Interface(API) for defining 2-D and 3-D graphic
images
GKS Primitives:
a) Polyline used to draw lines
POLYLINE(n, x,y)
-n length of an array
-x and y array of xy coordinate
b) Polymaker used to draw points
POLYMAKER(n, x, y)
-n is number of data points
-x and y array of xy coordinate
24
3/19/2016
SOFTWARE STANDARDS
c) Fill Area also used to draw line but it always connects the first and last points in
the array
FILLAREA(n, x, y)
d) Text used to print the string or text starting at the given coordinates
TEXT(x, y,string)
GKS Segments
Used to develop complex objects
Any valid GKS code can be clustered together into a segment through the use of
the CREATE SEGMENT(n)command and terminated with.
CLOSE SEGMENT command
Example
CREATESEGMENT(1)
POLYLINE(5,x,y)
CLOSESEGMENT
25