You are on page 1of 25

3/19/2016

CS 361
COMPUTER GRAPHICS

TEXT BOOK :
COMPUTER GRAPHICS (using Open GL)
DONALD HEARN & M.PAULINE BAKER

CHAPTER 1
Introduction
What is Computer Graphics?

Computer Graphics Goals

Distinctiveness of Computer Graphics

Computer Graphics Operations

Applications

Graphics packages

1
3/19/2016

What is Computer Graphics?


Computer Graphics is a discipline that deals with

Creation, Manipulation and Storage of geometric


objects (modelling) & their images (rendering) , and
it displays those images on screens or hardcopy devices.

Computer Graphics is a discipline that uses Algorithms,

mathematics, data structures .. that enable a


computer to make PRETTY PICTURES

Computer Graphics.continued
Computer graphics is the pictorial representation and manipulation of data by a

computer .(Collins English Dictionary)

Computer graphics is a pictorial computer output produced , through the use of

Software, on a display screen, plotter, or printer.(Random House Kernerman


Webster`s College Dictionary)

Computer graphics is the use of a computer to produce and manipulate pictorial

images on a video screen, as an animation techniques or the production.(Collins


English Dictionary)

Computer Graphics is a sub-field of computer science which studies methods for

digitally synthesizing and manipulating visual contact.(Wikipedia)

2
3/19/2016

Computer Graphics Goals

Realism

Interactivity

Real-time image generation

Sometimes these goals are mutually exclusive (more realism

= more calculations = less possibility of real-time image


creation)

Distinctiveness of Computer Graphics

Dynamic environment real-time image support

Interactive environment for

The creator

The consumer

Simulation environment

Provides an environment for visualizing large quantities of

data.
6

3
3/19/2016

Computer Graphics Operations

Modeling

Coordinates of the corners of objects

Primitives (2 & 3D geometric objects)

Equations that define the 2 & 3D shape of objects

Attributes (color, surface texture, etc.)

Computer Graphics Operations


Storing (first in memory), then on disk
Manipulating
Change shape
Change position
Change characteristics
Rendering create a picture by applying an algorithmic
version of the physics of the real world to create the
artificial image.
Viewing display scene from various viewpoints

4
3/19/2016

1.1) Applications of Computer Graphics

Computer Aided Design (CAD)

Presentation Graphics

Computer Art

Entertainment (animation, games, )

Education & Training

Visualization (scientific & business)

Image Processing

Graphical User Interfaces

1.1.1.Computer Aided Design (CAD)


Used in design of buildings, automobiles, aircraft, watercraft,
spacecraft, computers, textiles & many other products
Objects are displayed in wire frame outline form
Software packages provide multi-window environment

5
3/19/2016

Graphics design package provides standard shapes (useful


for repeated placements)
Animations are also used in CAD applications
Realistic displays of architectural design permits simulated
walk through the rooms (virtual -reality systems)

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

Examples of presentation graphics

Examples of presentation graphics

7
3/19/2016

1.1.3.Computer Art

Used in fine art & commercial art

Includes artists paintbrush programs, paint packages, CAD

packages and animation packages


These packages provides facilities for designing object shapes &

specifying object motions.


Examples : Cartoon drawing, paintings, product advertisements,

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

Computer Graphics is about animation (films)

10
3/19/2016

Game Industry

Focus on interactivity

Cost effective solutions

Avoiding computations and other tricks

1.1.5.Education & Training

Computer generated models of physical, financial and

economic systems are used as educational aids.

Models of physical systems, physiological systems, population

trends, or equipment such as color-coded diagram help


trainees understand the operation of the system

11
3/19/2016

Specialized systems used for training applications

simulators for practice sessions or training of ship captains

aircraft pilots

heavy equipment operators

air traffic-control personnel

Training

12
3/19/2016

1.1.6.Visualization

Scientific Visualization

Producing graphical representations for scientific,

engineering, and medical data sets

Scientific Visualisation

To view below and


above our visual range

13
3/19/2016

Business Visualization is used in connection with data sets

related to commerce, industry and other non-scientific areas

Techniques used:
color coding,
contour plots,
graphs, charts,
surface renderings & visualizations of volume interiors.

Image processing techniques are combined with computer

graphics to produce many of the data visualizations

1.1.7. Image Processing


CG- Computer is used to create a picture

Image Processing applies techniques to modify or interpret existing


pictures such as photographs and TV scans
Medical applications
Picture enhancements

Tomography (imaging by section or sectioning)

Simulations of operations

Ultrasonic & nuclear medicine scanners

applications of image processing


Improving picture quality

Machine perception of visual information (Robotics)

14
3/19/2016

To apply image processing methods


Digitize a photograph (or picture) into an image file

Apply digital methods to rearrange picture parts to


enhance color separations

Improve quality of shading

Tomography technique of X-ray photography that allows cross-


sectional views of physiological systems to be displayed
Computed X-ray tomography (CT) and position emission
tomography ( PET) use projection methods to reconstruct cross
sections from digital data
Computer-Aided Surgery is a medical application technique to model
and study physical functions to design artificial limbs and to plan &
practice surgery

15
3/19/2016

1.1.8.Graphical User Interfaces

Major component Window manager (multiple-window areas)

To make a particular window active, click in that window (using an


interactive pointing device)
Interfaces display menus & icons

Icons graphical symbol designed to look like the processing option it


represents
Advantages of icons less screen space, easily understood

Menus contain lists of textual descriptions & icons

Graphical User Interface(GUI)


Is a program that sits b/n the user and graphics application program
It helps the graphics system interact with user both in terms of input and output

It has various typical components:


Menu
Icons
Cursors
Dialog boxes
Scroll bars
Buttons
Valuators INPUT
Grids, etc

APPLICATION APPLICATION GRAPHIC SYSTEM


MODEL PROGRAM

OUTPUT

Conceptual framework for interactive graphics

16
3/19/2016

Graphical User Interface example

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

Basic Graphics System

Output device

Input devices

Image formed in FB

Angel: Interactive Computer Graphics 4E


Addison-Wesley 2005 35

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

as standard by an official national or international standard bodies


by ISO or ANSI.

The main purpose of such standard is to promote portability of

application programs and of programmers.

Non-official standards are also developed , promoted and licensed

by individual companies.

Examples:- ADOBEs post script and MITs X-Windows system are


two industry standards

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

You might also like