# Three-week Recap

This session is designed to designed to tie up loose ends from 3D modelling and camera projection. It contents will therefore depend on the challenges encountered in the three first sessions.

# Learning Outcomes

• Be able to use homogeneous coordinates to model and manipulate motion in 3D
• Be able to calculate image co-ordinates from 2D co-ordinates
• Understand the relationships between 3D and the 2D projection and between different representations and co-ordinate systems.

# Briefing and questions

• Quaternions. Ma (2004) Appendix 2.A.

# Exercises

## Calculations in Homogeneous Co-ordinates

1. Review the stage turntable exercise from last week. Use homogeneous co-ordinates to find the global co-ordinates of the actress (item 5). Check that your calculations match with what you did with heterogeneous co-ordinates.
2. Given a rotational matrix $\begin{bmatrix} \cos(\pi/6) & -\sin(\pi/6) & 0 \\ \sin(\pi/6) & \cos(\pi/6) & 0 \\ 0 & 0 & 1 \end{bmatrix}$ and a translation $$\vec{v}=[1,0,2]$$.

What are the homogenous matrices describing each of the following operations:
• rotate by $$R$$ and then translate by $$\vec{v}$$
• translate by $$\vec{v}$$ and then rotate by $$R$$
3. Review the crane exercise from last week and redo it using homogenous co-ordinates. Check that your calculations match regardless of the method used.
4. Suppose you have rotated by $$R$$ and then translated by $$\vec{v}$$ as given in the previous exercise. What is the homogeneous matrix to undo this operation?

## Exercises from Ma (2004)

• Exercises are from Ma 2004 page 62ff.
• Exercise 3.5
• Exercise 3.6
1. Exercise 2.11. To calculate eigenvalues and -vectors in Python, you can use numpy.linalg.eig.
2. Exercise 2.7.
3. Exercise 2.10.
4. Ma (2004:40) Exercise 2.14. Hint: start by drawing
5. Ma (2004:40) Exercise 2.13

# Debrief

I made this sample code in for the class of 2022. It shows one way of dealing with homogeneous co-ordinates together with the plotting tools that we have used.