CS计算机代考程序代写 Tut 2

Tut 2
Qn 1
Suppose an object is to be scaled up in the direction of the X axis by a factor of 1.5, then rotated about the Z axis by 30o and finally translated a distance of (0, 60, 0).
a) Write the composite transformation matrix in homogeneous coordinates.
b) Write the OpenGL code.
c) Suppose the order of translation and rotation are exchanged, will the composite transformation be the same? Why?
Qn 2
The following figure shows four coordinate systems 1, 2, 3, 4 that any point P can be expressed:
Find i) M2¡û1 ii) M3¡û2 iii) M4¡û3 iv) M1¡û4. Express in homogeneous coordinates.
1

Qn 3
The coordinate systems of the control tower and an airplane are shown below:
Up Z
Y North
Control Tower
The position of the plane is (5, 10, 5). The direction of flight is North East with an inclination of 30o . The plane has no banking.
Find the 4 x 4 coordinate system transformation that transforms the plane coordinate system to the control tower coordinate system.
OpenGL Mini-project Progress
Try moving the solid cube in Tutorial 1 around and changing its shape and sizes by the using the commands you learnt.
If you translate the cube by a slightly larger value, you may see it no more. Why?
(0,0,0)
X East
2