Revision 40ae6bcf241d1e1390e48c7241aacf0ff9fe3cdc (click the page title to view the current version)

3D Mathematics

Reading Ma (2004) Chapter 2 + Appendix A

Briefing

  1. Change of Basis

Exercises

A stage turntable

Let’s try a little 2D exercise before we move to 3D. Consider a theatre stage with a turntable.

The global co-ordinate system is defined with the origin at a seat in the middle of the audience. The \(y\)-axis points directly towards the stage, and the \(x\)-axis is perpendicular, pointing towards the right hand side.

The turntable has its centre at \((0,10)\) in the global co-ordinate system. The centre of the turntable is also the origin of its local co-ordinate system. An actor stands on the turntable at the point \((0,1)\) in the local co-ordinate system.

  1. Draw and annotate the situation.
  2. Suppose first that the turntable is turned so that its local \(y\)-axis is aligned with the global one. Where is the actor located in the globale co-ordinate system
  3. Suppose the turntable turns clockwise by an angle \(\alpha\). Write down the corresponding rotation matrix.
  4. What becomes the new position of the actor in the global co-ordinate system?
  5. An actress was positioned at some local co-ordinates \((x,y)\). What is her global position before and after the rotation by \(\alpha\).
  6. Note that you can calculate the positions of the two actors either directly by simple geometric observations and by means of linear algebra and a change of basis. You should try both and compare the results for validation.

A crane

Crane illustration
Crane illustration

Imagine a crane or robot arm with two booms as shown in the figure. We want to calculate the position of the hand of the arm (i.e. point \(A\)), given the position of the two joints.

  • The first boom
    • has its base in the global origin.
    • can rotate around the \(z\)-axis (the vertical axis).
    • has length \(a\) and extends along the \(z\)-axis.
  • The second boom
    • has its base at the tip of the first boom.
    • has length \(b\).
    • is jointed so that it can rotate around the \(y\)-axis. Note that this is the \(y\)-axis in the local co-ordinate system of the first boom, which may rotate in the global co-ordinate system.
  • Write \(\alpha\) for the angle of rotation around the base, and \(\beta\) for the angle in the joint. Suppose the second boom extends vertically when \(\beta=0\).

Note that each joint and boom can be described in a local co-ordinate system induced by the preceeding joints and booms in the system.

Step 1. Some concrete numbers

Suppose \(a=1\), \(b=2\), and \(\alpha=0\). Let \(\beta=\pi/4\) so that the second boom is horisontal. Draw this situation and calculate the global co-ordinates of the hand (\(A\)).

Step 2. General solution

Now we will work with general algebraic values, \(a\), \(b\), \(\alpha\), and \(\beta\). To calculate the position of \(A\), we should start with the hand in a local co-ordinate system and work backwards towards the base.

Point \(A\) is the origin in the co-ordinate system of the hand.

  1. Calculate its position of \(A\) in the co-ordinate system of the joint.
  2. Calculate its position of \(A\) in the co-ordinate system of the base.

Note that each change of co-ordinate system comprises a rotation and a translation. If you prefer, you may consider four distinct co-ordinate systems (instead of two) such that each change of basis makes either a rotation or a translation.

Properties of the rotation matrix.

This is based on Exercise 2.6 from Ma (2003:38).

Consider two transformation matrices:

\[ R_1= \begin{bmatrix} \cos \theta & -\sin\theta \\ \sin\theta & \cos \theta \end{bmatrix} \quad R_2= \begin{bmatrix} \sin \theta & \cos\theta \\ \cos\theta & -\sin \theta \end{bmatrix} \]

  • For each matrix, what is the determinant?
  • For each matrix, is it orthogonal?

Consider two points \(\vec{a}=(1,1)\) and \(\vec{b}=(0,1)\). Apply each transformation to both points, and draw the six points \(\vec{a},\vec{b},\vec{a}R_1,\vec{b}R_1,\vec{a}R_2,\vec{b}R_2\) in the same co-ordinate system.

  • Are they both rigid-body transformations (rotation)?
  • If they are not rotations, what are they then?

Exercises from Ma (2003)

Note. Exercises in parentheses are optional. Please skip these unless you have a lot of time.

These exercises are from Ma 2004 page 38ff

  1. Exercise 2.1 a+d. (See Definition A.12 page 446.)
  2. Exercise 2.3. (See Definition A.13 page 447.)

Debrief

Solution drafts

Exercise 2.1

Definition of a linear function

\[f(C\cdot X) = C\cdot f(X)\]

\[f(X+Y) = f(X) + f(Y)\]

If we take a function \(f(X) = X\cdot A\cdot X\) we can test if this is true, e.g.

\[f(X+Y) = (X+Y)A(X+Y) = (XA+YA)(X+Y) = XAX + XAY + YAX + YAY = f(X) + XAY + YAX + f(Y)\]

In this case we get two terms which we should not have had if the function were linear, and they are not zero in the general case. Hence this function is not linear. Similar calculations can be made for the function in the exercise.