Example – 2 (from Exams)
Rotate a triangle placed at A(0,0), B(1,1) and C(5,2) by an angle 45 with respect to point P(-1,-1).
The calculations available for computer graphics can be performed only at origin. It is a case of composite transformation which means this can be performed when more than one transformation is performed.
The following composite transformation matrix would be performed as follows.
The composite rotation matrix would be = Positive translation * Rotation (45degree) * Negative translation.
Substitute of values of translation and rotation angle.
Multiply the resultant rotation matrix with the triangle matrix.
The final resultant matrix will be as follows.
Problem Statement
Example -2:
Rotate a triangle placed at A(0,0), B(1,1) and C(5,2) by an angle 45 with respect to origin.
In this case since one of the edges of the triangle (A) is already at origin so after performing the transformation the values of A should not change, which will act as a check. We will multiply the object matrix with the rotation matrix to get the solution.
Remember: If direction of the rotation is not given then always assume it be positive.
The more complex problem is handled in the example two where the rotation is happening with respect to a point other than origin.
S-1: The triangle coordinates should also be written in the matrix form, shown as follows. The rotation matrix is also given below.
S-2: Put the value of angle in the rotation matrix (Angle given in problem statement is 45 degrees. Also put the values of cos 45 and sin 45 degrees in the matrix. The value of sin and cos 45 degrees is 1/sqrt(2).
S-3: Multiply these matrices to get the resultant matrix, which would describe the new coordinates of the edges of the triangle after 45 degrees rotation.
NOTES UNIT-2 ENTREPRENEURIAL PLANNING CLASS-XII SUBJECT- ENTREPRENEURSHIP
There are two ways by which you can see some objects colorful, let's say RED…
What is the formula of Lorentz force q = charge B = Magnetic Fields E…
MCQs on Electrostatic Potential & Capacitance - Chapter 2 - Class 12 CBSELove to Learn…
A. Which out of the following are conductors Metal Human Body Animal Bodies Earth All…
MCQs with answer explanation on - Solutions Chapter -2 Class 12 Prepared by Experts MCQ…