Relative to the origin the matrix for the scaling is

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: EME achieve ANSWERS and First Examiner: Paul Aljabar Second Examiner: Daniel Rueckert In order, the transformation can be achieved in four steps: Paper: C317 - Graphics Question: 1 Page 2 of 16 i) Translate the object to the origin ii) Perform a shrink relative to the origin iii) Perform a rotaion around the z-axis iv) Translate the object back to its original centre In fact the order of the shrink and the rotation, in this case, do not matter and reversing them would give the same result. Relative to the origin, the matrix for the scaling is the same as in part a: 0 1 0.9 0 00 B 0 0.9 0 0C B C @0 0 0.9 0A 0 0 01 A rotation around 21 Graphics Lecture 11: Slidethe! z-axis by an angle q is given by 0 1 cos q sin q 0 0 B C 0 Transformations" 1 0.9 0 00 B 0 0.9 0 0C B C @0 0 0.9 0A 0 0 01 A rotation around the z-axis by an angle q is given by 0 1 cos q sin q 0 0 B sin q cos q 0 0C B C @ 0 0 1 0A 0 001 So the complete sequence of transformations in matrix form is 0 10 10 1 1 0 0 10 0.9 0 00 0.98 0.17 0 0 B0 1 0 0C B 0 0.9 0 0C B0.17 0.98 0 0C B CB CB C @0 0 1 10A @ 0 A@ 0 0 0.9 0 0 1 0A 000 1 0 0 01 0 001 which evalutes to Marks: 0 0.8820 B0.1530 B @ 0 0 0.1530 0 0.8820 0 0 0.9000 0 0 0 1 B0 B @0 0 0 1 0 0 0 0 1 0 1 10 0C C 10A 1 1 1.1800 1.5300C C 1.0000A 1.0000 4 0 0.8820 B0.1530 B @ 0 0 Transformations" Marks: c 0.1530 0 0.8820 0 0 0.9000 0 0 1 1.1800 1.5300C C 1.0000A 1.0000 For another sequence the object is to shrink, as defined in part a, and to drop vertically downwards by 1 unit each frame. If the animation sequence is made up of a number of frames, numbered consecutively from zero, what is the transformation matrix that should be applied at frame n? Frame n is obtained after n translations downwards by one unit. This means the centre of the object is now at (10, n, 10). 4 vertically downwards by 1 unit each frame. If the animation sequence is made up of a number of frames, numbered Confidential consecutively from zero, what is the transformation matrix that should be Tapplied at frame n? ANSWERS and MARKING SCHEME ransformations" MODEL Department of Computing Examinations – 2011 - 2012 Session First Examiner: Paul Aljabar Second Examiner: Daniel Rueckert Frame n is obtained after n translations downwards by one unit. This Page 3 of 16 means the Question: 1 centre of the object is now at (10, n, 10). Paper: C317 - Graphics The matrix for the transformation can therefore be obtained by multiplying: 0 10 10 10 1 1 0 0 10 1 0 0 10 0.9 0 00 100 10 B0 1 0 0 0C B0 1 0 nC 1C B0 1 0 nC B 0 0.9 B CB CB CB C @0 0 1 10A @0 0 1 10A @ 0 A @0 0 1 0 0.9 0 10A 000 1 000 1 0 0 01 000 1 or, equivalently, 0 10 B0 1 B @0 0 00 0 0 1 0 10 10 100 10 0.9 0 00 n 1C B 0 0.9 0 0C B0 1 0 CB CB 10A @ 0 0 0.9 0A @0 0 1 1 0 0 01 000 Working from the right: 0 100 10 10 0.9 0 0 9 1 1 10 nC C 10A 1 0 1 B0 B @0 0 0 1 0 0 0 0 1 0 10 10 1 100 10 0.9 0 00 n 1C B 0 0.9 0 0C B0 1 0 CB CB A@ 0 10 0 0.9 0A @0 0 1 1 0 0 01 000 Transformations" Working from the right: 0 10 B0 1 B @0 0 00 0 0 1 0 10 10 nC C 10A 1 1 10 0.9 0 0 9 0 0.9nC n 1C B 0 0.9 CB C A@ 0 10 0 0...
View Full Document

Ask a homework question - tutors are online