Sei sulla pagina 1di 36

COMPUTER

GRAPHICS
Lecture-1

Dr. R. Chowdhury
Department of Civil Engineering
Indian InsHtute of Technology Roorkee

Course Overview

Introduction and Applications


Graphic Data le formats
Scan Algorithms
Two Dimensional Transformations
Windowing and Clipping
Animation

Lab Work (2 hrs per week)

Generation of 2-dimensional drawings


Generation of 3-D objects from 2-D objects
Animation
SoRware
MicrostaHon

Readings:
Computer Graphics
Hearn D. and Baker
M.P., PrenHce Hall of
India

Computer Graphics
Xiang, Z. and Roy
Plastock, Schaums
Outline Series, McGraw
Hill Book Co
4

IntroducHon

COMPUTER GRAPHICS

What is Computer Graphics?


Create or manipulate images with computer
The task of composing an image on a computer is essentially a
matter of setting pixel values. The collective effects of the pixels
taking on different color attributes give image.

Computer Graphics?...1
A computer generated image can depict a scene as simple as
the outline of a triangle on a uniform background and as
complex as a magnicent dinosaur of movie Jurassic Park.

Computer Graphics?...2
How is Computer Graphics different than sketching with a pen
or photographing with a camera?

Sketching with a Pen


Drawing outline of a triangle
Object Space (abstract space)

Image Space
(display
surface)
9

Sketching with a Pen1


SelecHon of
locaHon and
orientaHon of
triangle

placement of an triangle in different mode in CG transformation


(transformation matrix)
10

Sketching with a Pen2

Need to work with the same object to present


new orientation
Difficult to change location
Less precise
Takes time
Differentiating between parts is a bit difficult

11

Sketching with CG
Exactly not a line drawing in CG like sketching with pen with sharp
edges
Image space in CG is not continuous- consisted of discrete pixels
Scanning: convert a continuous figure like line in discrete approximation
Aliasing effect: distortion in figure introduced by scanning from
continuous space to discrete space.
A simple graphics pipeline is shown below

Objects represented in data


structures like vertices of a
triangle (x1,y1); (x2,y2);
(x3,y3) 32 array

Transformation
(World coordinate system)

Scan conversion
12

Photograph
To photograph a real-life object by camera it is illuminated by
a light source.
The reected light coming from the object surface pass
through the lens and fall onto a negaHve, forming an image of
the object.
Part of the object closer to the light source should appear
brighter in the picture than the part that is further away,
whereas, one facing away from the light source should appear
relaHvely dark.

13

Photograph1
The reecHon from surfaces, reectance, and illuminaHon are
other areas needed to project 3-D surfaces.
Further there is a disHncHon between the surfaces. This is made
possible by using surface textures.
The orientaHon of an object with respect to source of light will
result in formaHon of shadow. This is called shadow generaHon.

14

Photograph2
Image of a reoriented object needs to be captured on a
camera
Reworking with an object is possible in limited form

15

Computer Aided Graphics


Allows reworking with an object that is created in an
environment to change its environment
This includes:
EdiHng
ManipulaHng
Rendering (process of generaHng an image from data
structure) etc.

16

ApplicaHons of Computer Graphics


Computer Aided Design
Presentation Graphics
Computer Art
Entertainment
Education and Training
Visualization
Image Processing
17

(a) Computer Aided Design (CAD)


Major use of computer graphics is in design processes;
almost all products are now computer designed.
CAD methods are now routinely used in the design of
buildings, automobiles, aircraft, watercraft, spacecraft,
computers, textiles and many other products.
Many packages for CAD applications are available.
Important processes of CAD are wire frame outlines,
real time animation and surface renderings.

18

CAD ApplicaHons

Circuit board

Lighting design

19

CAD ApplicaHons

Simulation of vehicle
performance during lane
changes

CAD for a car

20

Color-coded Wireframe displays of aircraR and automobiles

21

Architectural CAD lay out

22

(b) Presentation Graphics


Presentation Graphics is commonly used to produce
illustrations for reports (statistical, mathematical,
economic, scientific data for reports).
Typical examples of presentation graphics are bar
charts, line graphs, surface graphs, pie charts and
other displays showing relationships between
multiple parameters.

23

Presentation Graphics

Two dimensional and three


dimensional bar charts and pie
charts
24

Presentation Graphics

Surface Chart

25

(c) Computer Art


Computer Graphics is widely used in ne arts and
commercial arts.
ArHsts use a variety of computer methods:
Special purpose hardware
paintbrush programs (such as Lumena, pixelpaint,
superpaint)
Specially developed soRwares
Symbolic mathemaHcs packages (such as mathemaHca)
Desktop publishing soRwares
AnimaHon packages etc.

26

Computer Art

Mathematica sphere

Riemann Surface
27

Computer Art

Painting

Computer Rendering: Snail Shell


28

(d) Education and Training


Computer generated models of physical, nancial,
and economic systems are often used as
educaHonal aids.
For some training applicaHons, special systems
are designed, examples:
Simulators for pracHce sessions or training of ship
captains, aircraR pilots, heavy-equipment operators,
and trafc control personnel.
Scenes generated for various simulators are shown in
the next slide.

29

EducaHon and Training

30

( e) Visualisation
We often need to analyze large amounts of informaHon or

data or to study the behavior of certain processes.

Scanning and analyzing such large amount of informaHon


and data is a tedious job.

But if the data are converted to a visual form, the trends


and patterns are immediately apparent.

31

Scientific Visualisation

2D Velocity Simulation (beach)

Visualization of protein structure


32

(f) Entertainment (Movies, computer games)

Commonly used in making motion pictures, music videos,


and television shows.
Morphing- transformation of one person or object to other

33

Morphing

34

(g) Image Processing

Applies techniques to modify or interpret existing pictures


such as photographs and scans

Two principal applications of image processing are (i)


improving picture quality and (ii) machine perception of
visual information, as used in robotics.

A photograph is digitized into and image file, and digital


methods are used to rearrange pictures parts for improving
the quality

Image Processing

Potrebbero piacerti anche