I have this questions and it's really tough for me.

Flat on a plane (with normal N through point P) sits a tank at point Q. The tank's local coordinate system is described by the 3x3 rotation matrix M. How do you update M and Q to make the tank first rotate in-place 45 degrees to its right, followed by moving K units forward? Please express your solution in math, not text. Also explain any assumptions made.

I've been away from using matrix for sometime, any answers or tips on how I should approach this question?

Thank you for the help.

  • $\begingroup$ "...rotate in-place 45 degrees to its right..." - with respect to which axis? $\endgroup$ – J. M. is not a mathematician Aug 10 '11 at 8:41
  • $\begingroup$ @J. M. The plane axis, as the tank stands on the plane. $\endgroup$ – Christian Rau Aug 10 '11 at 15:57

When the tank turns, it does so (presumeably) around the normal to the plane. Since we want to turn in the local coordinate system, so one can think of it as $x_{\text{local}} = M\cdot x_{\text{global}}$ and $x_{\text{local}}' = R\cdot x_{\text{local}}$, where $R$ is the local rotation matrix describing a 45 degree turn.

This leads to the new local coordinate system as \begin{gather} x_{\text{local}}' = R\cdot M\cdot x_{\text{global}}\\ x_{\text{local}}' = M' \cdot x_{\text{global}}\\ M' = R \cdot M \end{gather} where \begin{align} R = \begin{pmatrix} \cos\theta & -\sin\theta & 0 \\ \sin\theta & \cos\theta & 0 \\ 0 & 0 & 1 \end{pmatrix} \end{align} where $\theta = 45^\circ$. Here I chose the local $z$-axis as the normal direction.

When moving forward, it does so in the first axis (if we chose it so) of its local coordinate system, thus \begin{align}Q' = Q + M'\cdot \begin{pmatrix}k & 0 & 0\end{pmatrix}^{\mathrm{T}}\end{align}


Denote by S the global system with the origin $P$ and the normal $N$. Denote by S' the local coordinate system of the tank with the origin $Q$ and z-axis parallel to $N$. Then the transformation between the coordinates $x = (x, y, z)^T$ in the S system and the coordinate $x' = (x', y', z')^T$ in the S' system is given by

$$x = M x' + Q$$

M is the given orthogonal matrix whose columns are the unit vectors of the S' system expressed in the S system and $Q$ is the translation vector also expressed in the S system.

Now the tank rotates about its (local) z-axis by the angle $\theta = -45^\circ$ (ie. to the right) and moves k units ahead, say in the direction of its positive (local) x-axis. This constitutes a new local coordinate system S''. The relation between S' and S'' is given by the general formula:

$$x' = R(\theta) x'' + t$$


\begin{align} R(\theta) = \begin{pmatrix} \cos\theta & -\sin\theta & 0 \\ \sin\theta & \cos\theta & 0 \\ 0 & 0 & 1 \end{pmatrix} \end{align}

is the rotation matrix and

$$t = t(\theta) = k (\cos(\theta), \sin(\theta), 0)^T$$

is the translation vector.

By substituting $x'$ into the first equation we get

$$x = M R(\theta) x'' + M t(\theta) + Q$$

It follows that the matrix $M$ has to be multiplied by the matrix $R(\theta)$ and the vector $Q$ has to be shifted by by the the vector $M t(\theta)$, where $\theta = -45^\circ$.


Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.