3D Graphics and Virtual Reality
Practical exercise 1 - Example answers
Virtual reality systems
Answer 1. (4 marks)
One mark for each description of the two terms. Two extra marks awarded for explaining any interrelations. Terms can be any two of the following:
Answer 2. (2 marks)
A Window-on-world VR system uses standard desktop computing facilities. In particular, a desktop monitor is used for output and a keyboard, mouse, space-orb, or other non-immersive control device can be used for input. A Fish-tank VR system is based upon a standard WoW system, with the addition of LCD shutter glasses to create stereoscopic vision. This is coupled with a head tracking device which the system uses to change the viewing perspective (along a 2D plane) as the user moves their head. This gives a much greater sense of depth by providing motion parallax as a depth cue.
Answer 3. (2 marks)
An augmented reality system overlays information upon the user’s view of the real world, they are still fully aware of their real world surroundings.
Answer 4. (4 marks)
Not applicable for example answer.
Matrix multiplication
Answer 5. (1 mark)
=
Answer 6. (1 mark)
=
Answer 7. (1 mark)
= You cannot multiply these matrices.
Answer 8. (2 marks)
=
Answer 9. (2 marks)
= ….
Answer method 1 |
Answer method 2 |
Answer 10. (3 marks)
= =
Note that the second and fourth matrices are identity matrices and can be simply ignored.
Answer 11. (1 mark)
=
2D Transformations
Answer 12. (6 marks)
Allocate one mark for each correct answer. The image above shows the original object.
Answer 12(a). |
Answer 12(b). |
Answer 12(c). |
Answer 12(d). |
Answer 12(e). |
Answer 12(f). |
Answer 13. (7 Marks)
a) A scaling factor of (0.5, 1.5) performed centred on the origin.
You would use the transformation :
Filling in the correct values would give :
Multiplying this by the object’s vertices gives the following operation. Note that this operation has been done using a single matrix multiplication by creating a large matrix containing all of the object’s vertices.
The new position of the object would be :
b) A translation by (-2.0, 1.0).
You would use the transformation :
Filling in the correct values would give :
Multiplying this by the object’s vertices gives the following operation.
The new position of the object would be :
c) A rotation of 30° in a counter-clockwise direction, centred on the origin. Note: the convention used has positive rotation angles going counter-clockwise about the origin.
You would use the transformation :
Filling in the correct values would give :
Multiplying this by the object’s vertices gives the following operation.
The new position of the object would be :
Direction cosines
Answer 14. (6 marks)
The transformation matrices would be derived as :
a)
b)
c)
XYZ angles
Answer 15 (2 marks).
One possible solution is:
Answer 16. (2 marks)
One possible solution is :
Answer 17. (2 marks)
One possible solution is :
Compound transformations
Answer 18. (6 marks)
Mistakes happen - this is one of them :-) The question was supposed to say "using your answer from question 15" instead of from question 16, which is less straight forward. Because question 16 used Euler angles to calculate the roll, pitch and yaw angles, we must first convert this sequence into its equivalent fixed-angle sequence before calculating the matrices. If, however, you don’t spot this and answer the question normally as if using fixed angles, you will still be given full marks - my mistake!
One other thing to note is that there is more than one correct answer for question 16, so even if you don’t get exactly the same answer as given here, you can still get full marks.
From Question 16, Euler sequence :
First thing we must do is calculate the equivalent fixed angle sequence. This is done by simply reversing the order of application. The sequence now becomes:
Also, we are working the other way round this time (i.e. we are finding the rotated co-ordinates from the world co-ordinates), so we must use the inverse transforms:
This equates to the following. Note that inverse transforms simply use the transpose of the transformation matrices.
Evaluating all sine and cosine terms :
Removing the identity matrix on the left hand side:
Multiplying this out gives our transformation matrix. We can check this is right by comparing it to the answer for Question 14(a). Note that it is the same as the direction cosine result.
Now, applying it to the point (3, -2, 2) gives :
Peter Young
University of Durham
peter.young@durham.ac.uk