3D Graphics and Virtual Reality

Practical exercise 1

Introduction

This practical consists of a number of questions which cover most of the material from lectures 1, 2 and 3 of the course. You have one week to complete this practical, the answers to which must be handed in at the beginning of the following weeks practical. 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 54.

Virtual reality systems

Question 1. (4 marks)

Visual realism, image resolution, frame rate and latency are all important factors which affect the quality and usability of a VR system. Explain briefly what ANY TWO of these terms mean and how those two are interrelated.

Question 2. (2 marks)

Explain the difference between a standard Window-on-world VR system and a Fish-tank VR system.

Question 3. (2 marks)

Explain what the term "Augmented Reality" refers to.

Question 4. (4 marks)

Describe 1 other application of VR that is NOT mentioned in the lecture notes. Briefly describe the advantages which VR provides in this application.

Matrix multiplication

Evaluate the following matrix multiplication operations:

Question 5. (1 mark)

Question 6. (1 mark)

Question 7. (1 mark)

Question 8. (2 marks)

Question 9. (2 marks)

Question 10. (3 marks)

Question 11. (1 mark)

2D Transformations

Question 12. (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. These transformations are intended as just "mental" exercises, so you do not need to show any working. However, you should try and be as accurate as possible with your sketches.

The following transformations should all be performed with the origin as centre:

a) translation by (-1, 2).

b) scaling by (2.0, 0.5).

c) rotation by 45° counter-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. Note: do not apply these transformations in succession, in each case start with the original square.

d) translation by (1, -1)

e) scaling by (1.5, 2.0)

f) rotation by 90° clockwise.

Question 13. (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 start 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 14. (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 :

Cxx, Cxy, and Cxz are the direction cosines of the VO’s x-axis with respect to the x, y and z world co-ordinate axes.

Cyx, Cyy, and Cyz are the direction cosines of the VO’s y-axis with respect to the x, y and z world co-ordinate axes.

Czx, Czy, and Czz 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 axis 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 15 (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 16. (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 17. (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 right-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 18. (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.

 

Peter Young
University of Durham

peter.young@durham.ac.uk