Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

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.

share|improve this question
    
"...rotate in-place 45 degrees to its right..." - with respect to which axis? –  J. M. Aug 10 '11 at 8:41
    
@J. M. The plane axis, as the tank stands on the plane. –  Christian Rau Aug 10 '11 at 15:57
add comment

2 Answers

up vote 2 down vote accepted

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}

share|improve this answer
add comment

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$$

where

\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$.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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