100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached
logo-home
Computer Graphics docs $3.49   Add to cart

Class notes

Computer Graphics docs

 10 views  0 purchase
  • Course
  • Institution

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-Hodgem...

[Show more]

Preview 3 out of 22  pages

  • May 25, 2022
  • 22
  • 2020/2021
  • Class notes
  • Sirisha
  • All classes
avatar-seller
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

The benefits of buying summaries with Stuvia:

Guaranteed quality through customer reviews

Guaranteed quality through customer reviews

Stuvia customers have reviewed more than 700,000 summaries. This how you know that you are buying the best documents.

Quick and easy check-out

Quick and easy check-out

You can quickly pay through credit card or Stuvia-credit for the summaries. There is no membership needed.

Focus on what matters

Focus on what matters

Your fellow students write the study notes themselves, which is why the documents are always reliable and up-to-date. This ensures you quickly get to the core!

Frequently asked questions

What do I get when I buy this document?

You get a PDF, available immediately after your purchase. The purchased document is accessible anytime, anywhere and indefinitely through your profile.

Satisfaction guarantee: how does it work?

Our satisfaction guarantee ensures that you always find a study document that suits you well. You fill out a form, and our customer service team takes care of the rest.

Who am I buying these notes from?

Stuvia is a marketplace, so you are not buying this document from us, but from seller bynasrivastav. Stuvia facilitates payment to the seller.

Will I be stuck with a subscription?

No, you only buy these notes for $3.49. You're not tied to anything after your purchase.

Can Stuvia be trusted?

4.6 stars on Google & Trustpilot (+1000 reviews)

75632 documents were sold in the last 30 days

Founded in 2010, the go-to place to buy study notes for 14 years now

Start selling
$3.49
  • (0)
  Add to cart