Vous êtes sur la page 1sur 25

Introduction to

Computer Graphics(CS-504)
Presented By:
Bhavna Sharma
Asst. Prof. CSE Dept. (SRIIT)

What is Computer Graphics ?


Definition :It is a most effective and commonly used way to
communicate processed information to the user in the form
of graphics object such as pictures , diagrams, charts,
graphs instead of simple text.

Applications

Art and Commerce


Computer Graphics provides tools to create artistic pictures which
are useful for advertisement.

Cartography

Entertainment: Cinema

Computer-Aided Drafting Design

Raster Scan Display

In Raster scan display the electron beam is swept across


the screen one row at a time from top to bottom.
Beam intensity is turned on and off to create a pattern of
illuminated spots as the electron moves across each row .

Random scan graphics


The electron beam is directed only to the parts of the
screen where a picture is to be drawn.
CRT has electron beam directed to the points of the screen
where a picture is to be drawn.

10

11

Transformations
What is transformations?
The geometrical changes of an object from a current
state to modified state.
Why the transformations is needed?
To manipulate the initially created object and to display
the modified object without having to redraw it.

12

Translation
Moving an object is called
translation. We translate an
object by adding x and y
coordinates respectively.
We can write the components:
Xnew = Xold + tx;
Ynew = Yold + ty;
or
in matrix form:
P' = P + T
tx
x
x
y = y + ty
13

Rotation
In Rotation , the object is
rotated degree about the
origin (or a given point).
If is positive angle the
rotation is
-counterclockwise , while
clockwise when it is
negative

14

Scaling
A Scaling transformation
changes the size of an object.
We can write the components:
p'x = sx px
p'y = sy py
or
in matrix form:
P' = S P
sx
S
0

0
s y

15

Other Transformation
Reflection.
Shearing.

16

Reflection
Reflection: A transformation that produces a mirror image.

x-axis

y-axis

1 0 0
0 1 0

0 0 1

1 0 0
0 1 0

0 0 1

17

Reflection
Reflection:

origin
1 0 0
0 1 0

0 0 1

line x=y
0 1 0
1 0 0

0 0 1

18

Shearing
Shearing: A transformation that distorts the shape of an
object.
X-Shear: The x-Shear preserves the y coordinate and
changes are made to X coordinates.

1 shx 0
0 1 0

0 0 1

19

Shearing
Y- Shear: The Y-Shear preserves the X coordinates and
changes the Y coordinates.

1 0 0
sh 1 0
y

0 0 1

20

Composite Transformation
Composite transformations: To perform multiple
transformation .
For Example
Rotate about an arbitrary point translate, rotate,
translate
Scale about an arbitrary point translate, scale,
translate

21

Inverse transformation
When be apply any transformation to an object we get a new
object. Sometimes it may require to undo the applied
transformation. This can be achieve by inverse transformation.
If the inverse of matrix T is (-T). then
T(-T)= I
Here I is the identity matrix.

22

Windowing & Clipping


A scene is made up of a collection of objects specified in
world coordinates.

23

Recommended Text:
Rogers, "Procedural Elements of Computer Graphics",
Tata McGraw Hill
Donald Hearn and M.P. Becker Computer Graphics
Pearson Pub.
Parekh Principles of Multimedia Tata McGraw Hill
Maurya, Computer Graphics with Virtual Reality System
, Wiley India
Pakhira,Computer Graphics ,Multimedia & Animation
,PHI learning
Andleigh, Thakral , Multimedia System Design

24

Thanks

25

Vous aimerez peut-être aussi