代写 R math graph COMP330 Assignment 2 2018- Transformations

COMP330 Assignment 2 2018- Transformations
Due: Week 8, Friday May 3, 2018 6:00pm. Value: 10%. Marked out of 100.
Objective
The purpose of this assignment is to test your knowledge of:
• 2D & 3D transformations: translation, rotation, scale and shear
• Homogeneous matrices
• Nested Coordinate frames
Instructions
Throughout this assignment, all diagrams that you draw should be carefully drawn to scale using graph paper that you can download from the Internet. Sketches can be done by hand and scanned, or made using a suitable drawing program. Make sure there is a clear distinction at all times between the object and the axes in your diagrams.
You may want to use a matrix calculator for some questions. We recommend WolframAlpha:
https://www.wolframalpha.com/input/?i=matrix+multiplication+calculator
You will be submitting your solution as a PDF (see below) so ensure that you allow time for scanning your work to prepare your final PDF submission. Also, make sure that your scanned document will be clearly legible – easy to read and clear for marking.
In the following questions we will use this notation for transformations: 2D Transformations
• T(dx, dy) – translate by dx units in the x direction and dy units in the y direction
• R(theta) – rotate anticlockwise by angle theta
• S(sx, sy) – scale by sx in the x direction and sy in the y direction
• Sh(h,v) – shear by h units horizontally and v units vertically.
3D Transformations
• T(dx, dy, dz) – translate by dx units in the x direction, dy units in the y direction and dz units in the z direction
• Rx(theta) – rotate about the x axis by angle theta
• Ry(theta) – rotate about the y axis by angle theta
• Rz(theta) – rotate about the z axis by angle theta
• S(sx, sy, sz) – scale by sx units in the x direction, sy units in the y direction and sz units in the z
direction

Question 1. Sketching Transformations in 2D [30 marks]
Figure 1 below shows a flag made up of four vertices with coordinates given in a local coordinate frame.
Figure 1: A triangular flag.
Draw the result of applying each of the following transformations to the flag. [5 marks each]
a) R(180°)
b) S(2,-1)
c) T(2,1) R(90°)
d) R(-90°) T(-1,0)
e) R(45°) S(2,1)
f) S(2,1) R(45°)

Question 2: 2D Homogeneous Matrices [30 Marks]
For each of the following homogenous matrices, write the decomposition into simple 2D transformations (translation, rotate, scale and shear). [6 Marks each]
For example, the matrix:
Can be written as:
0 −1 1
a) 𝑀=#1 0 0′
001
010
b) 𝑀=#2 0 0′
001
110
c) 𝑀=#−1 1 0′
001
100
d) 𝑀=#−1 1 0′
001
−0.5 0.866 0
e) 𝑀 = #0.866 0.5 0′
001
201 𝑀=#0 1 2′
001 𝑀 = 𝑇(1,2)𝑆(2,1)

Question 3: 3D Transformations [40 Marks]
Consider the following model aircraft carrier with origin and coordinate frame as indicated.
Figure 2: Model aircraft carrier
a) Is this a right-handed or left-handed coordinate system? [5 marks]

The aircraft carrier initially sits at the dock at point D, facing north. It travels 1000 metres north then turns 90° to face the east, as shown in Figure 3.
Figure 3: The aircraft carrier (a) in the dock, (b) after travelling 1000m north, (c) after turning 90° east.
Assume a world coordinate frame with D as the origin. The x-axis points west, the y-axis points vertically up and the z-axis points north. One unit = one metre.
b) What is the matrix 𝑀2345→789: representing the aircraft carrier’s final coordinate frame relative to the dock, expressed as a product of simple 3D transformations (T, Rx, Ry, Rz, S)? [5 marks]
c) What the value of 𝑀2345→789: as a homogeneous matrix? [5 marks]

A jet sits on the deck of the aircraft carrier, as shown in Figure 4:
Figure 4: A jet sitting on the deck of the aircraft carrier.
The jet is 10m behind the origin of the aircraft carrier and facing directly to the rear.
d) What is the matrix 𝑀 representing the jet’s coordinate frame relative to the aircraft ;<=→2345 carrier, expressed as a product of simple 3D transformations (T, Rx, Ry, Rz, S)? [5 marks] e) What is the matrix 𝑀 representing the jet’s coordinate frame relative to the dock, ;<=→789: expressed as a product of simple 3D transformations (T, Rx, Ry, Rz, S)? [5 marks] f) What the value of 𝑀 as a homogeneous matrix? (show your working) [5 marks] ;<=→789: The jet takes off and climbs at a 30° angle for 100m, as shown in figure 5: Figure 5: The jet takes off from the aircraft carrier. g) What is the homogeneous matrix R representing this 30° rotation in pitch? [5 marks] h) What is the matrix 𝑀 representing the jet’s new coordinate frame relative to the ;<=→789: dock, expressed as a product of simple 3D transformations (T, Rx, Ry, Rz, S)? [5 marks] Submission Submit your solutions to this assignment as a PDF file. Submissions in another file format will lose 1 mark. You may prepare your entire assignment on paper then scan it direct to PDF for submission, or you may scan answers to specific questions and assemble your final submission in a word processing program before converting that to PDF for submission. Both drawings and mathematics may be done by hand on paper and scanned or carefully photographed. Take care when scanning or photographing your work to ensure that it has good contrast and is clearly legible in the final PDF document. Take care if you are photographing sketches that they are not noticeably distorted – scanning is definitely a better option. Submit your PDF file through iLearn.