3D Graphics and Virtual Reality
Practical exercise 1
Introduction
This practical consists of a (fairly large) number of questions which cover most of the material from lectures 1, 2 and 3 of the course. The deadline for this practical is the start of the practical session in Week 18, but you will have all of the Week 17 practical session to spend on it. The deliverable for this exercise is a list of answers to all the questions on this sheet, showing full working wherever applicable. A set of example answers will be made available shortly after the deadline.
The total number of marks available for these questions is 70.
Virtual reality systems
Question 1. (5 marks)
Show each of the major components within the architecture of a typical VR system. Briefly describe the purpose of each component.
Question 2. (6 marks)
Visual realism, image resolution, frame rate and latency are all important factors which affect the quality and usability of a VR system. Explain what each term means and how they are interrelated.
Question 3. (2 marks)
Explain the difference between an immersive VR system and an augmented reality system.
Question 4. (2 marks)
Explain what sort of system the term "Fish tank VR" refers to.
Question 5. (6 marks)
List three applications of virtual reality systems and briefly describe the advantages which VR provides in these applications.
Matrix multiplication
Evaluate the following matrix multiplication operations:
Question 6. (1 mark)
Question 7. (1 mark)
Question 8. (1 mark)
Question 9. (2 marks)
Question 10. (2 marks)
Question 11. (2 marks)
Question 12. (1 mark)
2D Transformations
Question 13. (6 marks)
The image above shows a square of size 2 units by 2 units, centred about the origin of this co-ordinate system. Show the approximate resultant position of the square when each of the following transformations is applied to it. Note: do not apply these transformations in succession. In each case begin with the original square’s position.
The following transformations should all be performed with the origin as centre:
a) translation by (2, -3).
b) scaling by (2.5, 0.5).
c) rotation by 45° clockwise.
Now, show the approximate resultant position of the square when the following three transformations are applied to the original square. In this case, perform all transformations with the point (-1, 1) as the centre. Remember that this new centre is NOT the centre of the box (so dont move the box!), it is the centre for the transformations. Note: Do not apply these transformations in succession, in each case begin with the original object.
d) translation by (-1, -1)
e) scaling by (0.5, 2.0)
f) rotation by 90° counter-clockwise.
Question 14. (7 Marks)
The image above shows a 2-dimensional, five-sided object, with each of its vertices numbered from one to five. For each of the following (a to c), show which transformation matrix you would use (Note : you must use homogenous co-ordinates in each case), fill in the appropriate values then calculate the new position of the object using this transformation matrix. In each case give the new co-ordinates of each of the vertices and sketch the new position and orientation of the object.
1 extra mark will be awarded if you can think of a way to transform all vertices on the object using a single matrix multiplication. Note: Do not apply these transformations in succession, in each case begin with the original object.
a) A scaling factor of (0.5, 1.5) performed centred on the origin.
b) A translation by (-2.0, 1.0).
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.
Direction cosines
Question 15. (6 marks)
A transformation matrix can be constructed using direction cosines to transform points from one frame of reference into another. The matrix for this operation is given as:
where :
Cx_{x}, Cx_{y}, and Cx_{z} are the direction cosines of the VO’s x-axis with respect to the x, y and z world co-ordinate axes.
Cy_{x}, Cy_{y}, and Cy_{z} are the direction cosines of the VO’s y-axis with respect to the x, y and z world co-ordinate axes.
Cz_{x}, Cz_{y}, and Cz_{z} are the direction cosines of the VO’s z-axis with respect to the x, y and z world co-ordinate axes.
For each of the following cases (a to c), derive the transformation matrix for the rotated co-ordinate system using direction cosines. Each figure is shown with the world axes as the longer, thinner set of axes. The rotated co-ordinate system is shown with the smaller, thicker, coloured axes.
Figure DC1.
a) In this example, each axis of the rotated co-ordinate system lies perpendicular to an axes in the world co-ordinate system.
Figure DC2.
b) Again, each axis of the rotated co-ordinate system lies perpendicular to an axes in the world co-ordinate system.
Figure DC3
c) This example is slightly different. The angle between the X or Y axes of the rotated co-ordinate system and the X or Z axes of the world co-ordinate system is 45° .
XYZ angles
Question 16 (2 marks).
Calculate the Roll, Pitch and Yaw sequence using XYZ Fixed angles, which is necessary to orientate the smaller co-ordinate system as shown in figure DC1 above. Make sure you get the sign of the rotations correct, we are using a right-handed grip-rule convention in this example.
Question 17. (2 marks)
Calculate the Roll, Pitch and Yaw sequence using XYZ Euler angles, which is necessary to orientate the smaller co-ordinate system as shown in figure DC2 above. Make sure you get the sign of the rotations correct, we are using a right-handed grip-rule convention in this example.
Question 18. (2 marks)
Calculate the Roll, Pitch and Yaw sequence using XYZ Fixed angles, which is necessary to orientate the smaller co-ordinate system as shown in the following figure DC3 above. Make sure you get the sign of the rotations correct, we are using a left-handed grip-rule convention in this example. The angle between the X or Y axes of the rotated co-ordinate system and the X or Z axes of the world co-ordinate system is 45° .
Compound transformations
Question 19. (6 marks)
Using your answer from Question 16, create a single transformation matrix by compounding the individual Roll, Pitch and Yaw matrices. Use this resultant matrix to transform a point at co-ordinate (3, -2, 2) from the world co-ordinate system into the rotated co-ordinate system. Show your working out and find the new co-ordinate for this point. Don’t forget to use the transpose matrices for Roll, Pitch and Yaw.
Face Sets
Question 21. (8 marks)
The two figures above show an eight-sided object constructed from 6 vertices. The vertices are numbered from 0 to 5 and have the following XYZ co-ordinates.
Vertex |
Co-ordinate |
0 |
1.0, 0.0, 1.0 |
1 |
-1.0, 0.0, 1.0 |
2 |
-1.0, 0.0, -1.0 |
3 |
1.0, 0.0, -1.0 |
4 |
0.0, 3.0, 0.0 |
5 |
0.0, -3.0, 0.0 |
Create a face set from this vertex list which would re-create the object above. Create each facet as a list of vertices, with a clockwise order indicating the front of a face. You should finish with 8 facets. Note: this is not a VRML question - simply listing the faces will suffice.
Peter Young,
University of Durham