Open navigation menu
Close suggestions
Search
Search
en
Change Language
Upload
Sign in
Sign in
Download free for days
0 ratings
0% found this document useful (0 votes)
23 views
2D Transormations
Uploaded by
LUCKY CUTS
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content,
claim it here
.
Available Formats
Download as PDF or read online on Scribd
Download now
Download
Save 2D Transormations For Later
Download
Save
Save 2D Transormations For Later
0%
0% found this document useful, undefined
0%
, undefined
Embed
Share
Print
Report
0 ratings
0% found this document useful (0 votes)
23 views
2D Transormations
Uploaded by
LUCKY CUTS
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content,
claim it here
.
Available Formats
Download as PDF or read online on Scribd
Download now
Download
Save 2D Transormations For Later
Carousel Previous
Carousel Next
Save
Save 2D Transormations For Later
0%
0% found this document useful, undefined
0%
, undefined
Embed
Share
Print
Report
Download now
Download
You are on page 1
/ 8
Search
Fullscreen
2720122, 141 PM 20 Transformation 2D Transformation Transformation means changing some graphics into something else by applying rules. We can have various types of transformations such as translation, scaling up or down, rotation, shearing, etc. When a transformation takes place on a 2D plane, itis called 2D transformation. Transformations play an important role in computer graphics to reposition the graphics on the screen and change their size or orientation Homogenous Coordinates To perform a sequence of transformation such as translation followed by rotation and scaling, we need to follow a sequential process - + Translate the coordinates, + Rotate the translated coordinates, and then + Scale the rotated coordinates to complete the composite transformation. To shorten this process, we have to use 3x3 transformation matrix instead of 2x2 transformation matrix. To convert a 2x2 matrix to 3x3 matrix, we have to add an extra dummy coordinate W. In this way, we can represent the point by 3 numbers instead of 2 numbers, which is called Homogenous Coordinate system. In this system, we can represent all the transformation equations in matrix multiplication. Any Cartesian point P X,Y can be converted to homogenous coordinates by P” (Xr Yash). Translation A translation moves an object to a different position on the screen. You can translate a point in 2D by adding translation coordinate (t,, t,) to the original coordinate X,Y to get the new coordinate x.y! nitps www tutoralspoint.concomputer_graphies/26_transformation hims~text=Transformation means changing some graphics is called 20 t.. 1182720122, 141 PM 20 Transformation Puy), From the above figure, you can write that ~ EX +t YrYtty The pair (ty, ty) is called the translation vector or shift vector. The above equations can also be represented using the column vectors. ee os [el P= (ey) ce We can write it as — Rotation In rotation, we rotate the object at particular angle @ theta from its origin. From the following figure, we can see that the point P X,Y is located at angle 9 from the horizontal X coordinate with distance r from the origin. Let us suppose you want to rotate it at the angle @. After rotating it to a new loc pointP’ X',¥' . , you will get a new nitps www tutorialspoint.concomputer_graphies/26_transformation hims~text=Transformation means changing some graphics is called 20 t.. 2182720122, 141 PM 20 Transformation ‘Same way we can represent the point’ X’,Y’ as - 2! =rcos (6 + 0) =rcospcos@ — rsingsin8..... y! =rsin (¢ + 0) =rcos sind + 7 sing cos 9. Substituting equation 1 & 2 in 3 & 4 respectively, we will get a! =xcos0— ysind yl =asind + ycosd Representing the above equation in matrix form, cos sin® [x’Y’] xn one sing ]OR Where R is the rotation matrix -(3) (4) nitps www tutoralspoint.concomputer_graphies/26_transformation hims~text=Transformation means changing some graphics is called 20 t.. 3182720122, 141 PM 20 Transformation 0 0 Re | 0089 sin sind cos0 The rotation angle can be positive and negative. For positive rotation angle, we can use the above rotation matrix. However, for negative angle rotation, the matrix will change as shown below ~ cos(-6) _sin(—6) n[ sin(—6) cos( | _ [ —sin® eo ond ] ce con 6) = cos0 and sin(—#) = —sin8) Scaling To change the size of an object, scaling transformation is used. In the scaling process, you either expand or compress the dimensions of the object. Scaling can be achieved by multiplying the original coordinates of the object with the scaling factor to get the desired result. Let us assume that the original coordinates are X,Y , the scaling factors are (Sx, Sy), and the produced coordinates are X',¥' . This can be mathematically represented as shown below — X. Sx and Y.Sy The scaling factor Sx, Sy scales the object in X and Y direction respectively. The above equations can also be represented in matrix form as below - ()- GIT 5] P=P.S Where S is the scaling matrix. The scaling process is shown in the following figure. nitps www tutoralspoint.concomputer_graphies/26_transformation hims~text=Transformation means changing some graphics is called 20 t.. 4182720122, 141 PM 20 Transformation 0 5 10 15 20 If we provide values less than 1 to the scaling factor S, then we can reduce the provide values greater than 1, then we can increase the size of the object. of the object. If we Reflection Reflection is the mirror image of original object. In other words, we can say that it is a rotation operation with 180°. In reflection transformation, the size of the object does not change. The following figures show reflections with respect to X and Y axes, and about the origin respectively. (a) (b) nitps www tutoralspoint.concomputer_graphies/26_transformation hims~text=Transformation means changing some graphics is called 20 t.. 5182720122, 141 PM 20 Transformation (c) (d) Shear A transformation that slants the shape of an object is called the shear transformation. There are two shear transformations X-Shear and Y-Shear. One shifts X coordinates values and other shifts Y coordinate values. However; in both the cases only one coordinate changes its coordinates and other preserves its values. Shearing is also termed as Skewing. X-Shear The X-Shear preserves the Y coordinate and changes are made to X coordinates, which causes the vertical lines to tilt right or left as shown in below figure. Y y x x 0 0 (a) Original object (b) Object after x shear The transformation matrix for X-Shear can be represented as — 1 she 0 Xn=}]0 1 0 oo 1 Y=Y+Shy.x x'=X hitps www tutoralspoint.concomputer_graphies/26_transformation hims~text=Transformation means changing some graphics is called 20 t.. 6182720122, 141 PM 20 Transformation Y-Shear The Y-Shear preserves the X coordinates and changes the Y coordinates which causes the horizontal lines to transform into lines which slopes up or down as shown in the following figure. . y 0 ‘ x 0 (a) Original object (b) Object after y shear The Y-Shear can be represented in matrix from as ~ 1 00 Ya. | shy 1 0 0 01 X'=X+Sh,.Y y=y Composite Transformation Ifa transformation of the plane T1 is followed by a second plane transformation T2, then the result itself may be represented by a single transformation T which is the composition of T1 and 72 taken in that 1-72. order. This is written as T = Composite transformation can be achieved by concatenation of transformation matrices to obtain a combined transformation matrix. A combined matrix — (TID) = Pd [71] [72] [73] [74] .... [Tn] Where [Ti] is any combination of + Translation + Scaling + Shearing + Rotation * Reflection nitps www tutoralspoint.concomputer_graphies/26_transformation hims~text=Transformation means changing some graphics is called 20 t.. 7188720122, 1:41 PM 20 Transformation The change in the order of transformation would lead to different results, as in general matrix multiplication is not cumulative, that is [A] . [B] # [B] . [A] and the order of multiplication. The basic purpose of composing transformations is to gain efficiency by applying a single composed transformation to a point, rather than applying a series of transformation, one after another. For example, to rotate an object about an arbitrary point (Xp, Y,), we have to carry out three steps ~ + Translate point (Xp, Yp) to the origin + Rotate it about the origin. + Finally, translate the center of rotation back where it belonged. © Print Page nitps www tutorialspoint.concomputer_graphies/26_transformation hims~text=Transformation means changing some graphics is called 20 t.. 818
You might also like
Unit 3.1 Notes
PDF
No ratings yet
Unit 3.1 Notes
15 pages
2D Transformation
PDF
No ratings yet
2D Transformation
9 pages
2d Transformation
PDF
100% (1)
2d Transformation
6 pages
Chapter V
PDF
No ratings yet
Chapter V
8 pages
2D Transformation
PDF
No ratings yet
2D Transformation
9 pages
Computer Graphic Chapter 2
PDF
No ratings yet
Computer Graphic Chapter 2
45 pages
2d Transformation
PDF
No ratings yet
2d Transformation
13 pages
5CS4-04 U3
PDF
No ratings yet
5CS4-04 U3
24 pages
Presentation ON Raster Methods of Transformation: Presented by Rajeev Kumar Jha
PDF
No ratings yet
Presentation ON Raster Methods of Transformation: Presented by Rajeev Kumar Jha
16 pages
2 D Transformations
PDF
No ratings yet
2 D Transformations
29 pages
Cg Unit 2 Ashish
PDF
No ratings yet
Cg Unit 2 Ashish
22 pages
CG Unit 2
PDF
No ratings yet
CG Unit 2
113 pages
CS8092 Computer Graphics and Multimedia UNIT II-Two Dimensional Graphics 2.1 Two Dimensional Geometric Transformations
PDF
No ratings yet
CS8092 Computer Graphics and Multimedia UNIT II-Two Dimensional Graphics 2.1 Two Dimensional Geometric Transformations
24 pages
2D Transformation: Prepared By-Deep Tank (160110116052) Kishan Thakur (160110116054) Harshal Dankhara (160110116064)
PDF
No ratings yet
2D Transformation: Prepared By-Deep Tank (160110116052) Kishan Thakur (160110116054) Harshal Dankhara (160110116064)
17 pages
2D Transformations
PDF
No ratings yet
2D Transformations
56 pages
midpointcircle_2Dtranformation_boundaryfill
PDF
No ratings yet
midpointcircle_2Dtranformation_boundaryfill
24 pages
CG Chapter 5
PDF
No ratings yet
CG Chapter 5
61 pages
2D Transformation PDF
PDF
No ratings yet
2D Transformation PDF
11 pages
CG Lab Assignment No 4
PDF
No ratings yet
CG Lab Assignment No 4
8 pages
Unit Iii
PDF
No ratings yet
Unit Iii
27 pages
UNIT II: 2-D Geometrical Transforms: Translation
PDF
No ratings yet
UNIT II: 2-D Geometrical Transforms: Translation
80 pages
Graphics 3
PDF
No ratings yet
Graphics 3
155 pages
Computer Graphics: 2D Transformations
PDF
No ratings yet
Computer Graphics: 2D Transformations
15 pages
Chapter 4 PDF
PDF
100% (1)
Chapter 4 PDF
24 pages
3.2d Transformation
PDF
No ratings yet
3.2d Transformation
94 pages
Computer Graphics III
PDF
No ratings yet
Computer Graphics III
24 pages
Chapter Six
PDF
No ratings yet
Chapter Six
30 pages
W_1-2D Transformation
PDF
No ratings yet
W_1-2D Transformation
12 pages
Computer Graphics
PDF
No ratings yet
Computer Graphics
14 pages
Geometric Transformations - 2D, 3D
PDF
No ratings yet
Geometric Transformations - 2D, 3D
45 pages
Computer Graphics Lecture - 2D and 3D Transformations
PDF
No ratings yet
Computer Graphics Lecture - 2D and 3D Transformations
39 pages
Unit-3
PDF
No ratings yet
Unit-3
69 pages
Chapter 3 Two Dimensional Transformation
PDF
No ratings yet
Chapter 3 Two Dimensional Transformation
27 pages
L14, L15_Modeling Transformations
PDF
No ratings yet
L14, L15_Modeling Transformations
46 pages
Unit 2
PDF
No ratings yet
Unit 2
28 pages
Computer Graphics-PPT - CH3
PDF
No ratings yet
Computer Graphics-PPT - CH3
85 pages
Unit I
PDF
No ratings yet
Unit I
30 pages
UNIT III Notes (BCA407) - 3
PDF
No ratings yet
UNIT III Notes (BCA407) - 3
25 pages
2D Transformation
PDF
No ratings yet
2D Transformation
31 pages
2D Transformations: Computer Graphics
PDF
No ratings yet
2D Transformations: Computer Graphics
25 pages
Chapter Three- Transformations
PDF
No ratings yet
Chapter Three- Transformations
19 pages
2D Transformation
PDF
No ratings yet
2D Transformation
91 pages
Lecture 6 Geometric transformations
PDF
No ratings yet
Lecture 6 Geometric transformations
36 pages
Computer graphics notes
PDF
No ratings yet
Computer graphics notes
27 pages
Chapter-5 2D Transformations Basic Transformations: T T y X y X
PDF
No ratings yet
Chapter-5 2D Transformations Basic Transformations: T T y X y X
6 pages
Transformation in Computer Graphics
PDF
No ratings yet
Transformation in Computer Graphics
10 pages
Lesson 4 - 2D Transformation
PDF
No ratings yet
Lesson 4 - 2D Transformation
29 pages
Computer Graphics: Lecture 06-Transformations
PDF
No ratings yet
Computer Graphics: Lecture 06-Transformations
30 pages
CS 6504-Computer Graphics
PDF
No ratings yet
CS 6504-Computer Graphics
54 pages
Homogenous Coordinate System: Unit 1
PDF
No ratings yet
Homogenous Coordinate System: Unit 1
52 pages
2pdf
PDF
No ratings yet
2pdf
64 pages
Unit 3 Transformation
PDF
No ratings yet
Unit 3 Transformation
39 pages
Transformation
PDF
No ratings yet
Transformation
45 pages
Note10
PDF
No ratings yet
Note10
184 pages
TOPIC 5 2D GEOMETRIC TRANSFORMATIONS
PDF
No ratings yet
TOPIC 5 2D GEOMETRIC TRANSFORMATIONS
11 pages
Transformation
PDF
No ratings yet
Transformation
49 pages
Basic Transformations:: Translation
PDF
No ratings yet
Basic Transformations:: Translation
8 pages
Opengl Primitives: CSE 320 Graphics Programming
PDF
No ratings yet
Opengl Primitives: CSE 320 Graphics Programming
32 pages