Written by students who passed Immediately available after payment Read online or as PDF Wrong document? Swap it for free 4.6 TrustPilot
logo-home
Class notes

Computer Graphics docs

Rating
-
Sold
-
Pages
22
Uploaded on
25-05-2022
Written in
2020/2021

This document contains: TRANSFORMATIONS, Two-dimensional transformations, TRANSLATION, SCALING, ROTATION, Three-dimensional transformations, Concatenation, Vector Generation, DDA Algorithm, Bresenham’s Algoritm, Clipping, Line Clipping, Cohen Sutherland Line Clipping Algorithm, Sutherland-Hodgeman Polygon Clipping, Hidden Surface Removal, Back Face Removal Algorithm, Z-Buffer Algorithm, Database structure for computer Graphics

Show more Read less
Institution
Course

Content preview

UNIT II

COMPUTER GRAPHICS


TRANSFORMATIONS

Many of the editing features involve transformations of the graphics
elements or cells composed of elements or even the entire model. In this section we
discuss the mathematics of these transformations. Two-dimensional transformations
are considered first to illustrate concepts. Then we deal with three dimensions.

Two-dimensional transformations
To locate a point in a two-axis cartesian system, the x and y coordinates are
specified. These coordinates can be treated together as a 1x1 matrix: (x,y). For
example, the matrix (2, 5) would be interpreted to be a point which is 2 units from
the origin in the x-direction and 5 units from the origin in the y-direction.

This method of representation can be conveniently extended to define a line
as a 2 x 2 matrix by giving the x and y coordinates of the two end points of the line.
The notation would be

x 1 y1 
L=
x y 
 2 2



Using the rules of matrix algebra, a point or line (or other geometric element
represented in matrix notation) can be operated on by a transformation matrix to
yield a new element.

There are several common transformations used in computer graphics. We
will discuss three transformations: translation, scaling, and rotation.

TRANSLATION. Translation involves moving the element from one
location to another. In the case of a point, the operation would be

x' =x + m, y' = y + n

where x', y' = coordinates of the translated point

x, y = coordinates of the original point

m, n = movements in the x and y directions, respectively

In matrix notation this can be represented as

,(x', y') = (x, y) + T

, where

T = (m,n), the translation matrix

Any geometric element can be translated in space by applying Eq. to each
point that defines the element. For a line, the transformation matrix would be applied
to its two end points.

SCALING. Scaling of an element is used to enlarge it or reduce its size. The
scaling need not necessarily be done equally in the x and y directions. For example, a
circle could be transformed into an ellipse by using unequal x and y scaling factors.

The points of an element can be scaled by the scaling matrix as follows:

(x' ,y') = (x,y)S

where

m 0 the scaling matrix
s 
0 n

Written for

Institution
Course

Document information

Uploaded on
May 25, 2022
Number of pages
22
Written in
2020/2021
Type
Class notes
Professor(s)
Sirisha
Contains
All classes

Subjects

$3.99
Get access to the full document:

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Get to know the seller
Seller avatar
bynasrivastav

Also available in package deal

Get to know the seller

Seller avatar
bynasrivastav BVRIT
Follow You need to be logged in order to follow users or courses
Sold
1
Member since
3 year
Number of followers
1
Documents
33
Last sold
3 year ago

0.0

0 reviews

5
0
4
0
3
0
2
0
1
0

Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions