7
$\begingroup$

The rotation matrix about y axis should look like

$$\left[ \begin{array}{ccc} \cos\frac{\pi}{2} & 0 &\sin\frac{\pi}{2}\\ 0 & 1 & 0\\ -\sin\frac{\pi}{2} & 0 &\cos\frac{\pi}{2}\\ \end{array} \right] = \left[ \begin{array}{ccc} 0 & 0 &1\\ 0 & 1 & 0\\ -1& 0 &0\\ \end{array} \right] $$

Now, I pictured this rotation, and it should look like rotation about y axis, counterclockwise

enter image description here

I drew $(1,1,1)$ vector in original coordinate system, and in the new coordinate system, the vector should be $(-1,1,1)$ enter image description here

BUT! the matrix calculation gives otherwise.

$$ \left[ \begin{array}{ccc} 0 & 0 &1\\ 0 & 1 & 0\\ -1& 0 &0\\ \end{array} \right] \left[ \begin{array}{c} 1\\ 1\\ 1 \end{array} \right] =\left[ \begin{array}{c} 1\\ 1\\ -1 \end{array} \right] $$

Am I missing something?


Okay, it seems like I should rotate vector instead of coordinate system.

Then, How can you explain rotation about z axis?

enter image description here

The rotation matrix is $$ \left[ \begin{array}{ccc} \cos\frac{\pi}{2} &\sin\frac{\pi}{2} & 0\\ -\sin\frac{\pi}{2} &\cos\frac{\pi}{2} & 0\\ 0 & 0 & 1 \end{array} \right] = \left[ \begin{array}{ccc} 0 & 1 &0\\ -1 & 0 & 0\\ 0& 0 &1\\ \end{array} \right] $$

But... calculation is correct. $$ \left[ \begin{array}{ccc} 0 & 1 &0\\ -1 & 0 & 0\\ 0& 0 &1\\ \end{array} \right] \left[ \begin{array}{c} 1\\ 1\\ 1 \end{array} \right] =\left[ \begin{array}{c} 1\\ -1\\ 1 \end{array} \right] $$

IF you rotate the vector, then in the picture, it should be $(-1,1,1)$

enter image description here


Oh. god.... I think I am looking at the wrong source.

My book tells

enter image description here

well, clearly, googling gives me

enter image description here

http://what-when-how.com/the-3-d-global-spatial-data-model/rotation-matrix-derivation-the-3-d-global-spatial-data-model/

I think I solved my case. Thank you all.

$\endgroup$
8
  • $\begingroup$ You added $ (1,1,1)$ TO WHAT? $\endgroup$
    – guestDiego
    Jun 1, 2016 at 15:40
  • $\begingroup$ Sorry. edited the sentence. $\endgroup$
    – user65452
    Jun 1, 2016 at 15:42
  • $\begingroup$ the matrix is transforming the vector in the first space to another vector in the same space... $\endgroup$
    – danimal
    Jun 1, 2016 at 15:42
  • $\begingroup$ How is it "what was previously the x-axis is now NEGATIVE z axis" ? not positive z axis? $\endgroup$
    – user65452
    Jun 1, 2016 at 15:48
  • $\begingroup$ I don't understand why: "I drew (1,1,1) vector in original coordinate system, and in the new coordinate system, the vector should be (−1,1,1) ". In fact, the rotation matrix maps (1,1,1) to (1,1,-1). The matrix transform the vector. It doesn't express the old vector in the new basis. I think you are missing two different things $\endgroup$
    – guestDiego
    Jun 1, 2016 at 15:48

3 Answers 3

6
$\begingroup$

It seems that you are confusing active and passive rotations.

Your matrix $R$, applied to a vector $v$, give you a rotated vector $v'=Rv$ that is expressed in the same reference system than $v$ and this is called an active transformation.

If you don't change the vector but rotate the axis of the referenc system, than this is called a passive transformation and it is represented by the inverse matrix $R^{-1}$, in the sense that the coordinates of the old vector in the new reference systems are $v''=R^{-1}v$.

$\endgroup$
3
  • $\begingroup$ I edited my question. why is that rotation about y axis gives wrong answer and rotation about z axis gives right answer? $\endgroup$
    – user65452
    Jun 1, 2016 at 16:23
  • $\begingroup$ I don't understand your comment. Anyway, the difference between active and passive rotation is the same for any axis of rotation. $\endgroup$ Jun 1, 2016 at 16:41
  • $\begingroup$ Oh. well, I was using wrong matrix. see my edited question. $\endgroup$
    – user65452
    Jun 1, 2016 at 16:47
3
$\begingroup$

@Emilio Novati Explained very well about the rotation. But I spent some time draw this picture, so I'll post it.

You misunderstood the rotation matrix. You should rotate the vector counterclockwisely, instead of rotate the coordinate system.

enter image description here

$\endgroup$
3
  • $\begingroup$ I edited my question. can you explain to me? $\endgroup$
    – user65452
    Jun 1, 2016 at 16:20
  • $\begingroup$ Well, I solved my case. I think your answer gave me a hint. $\endgroup$
    – user65452
    Jun 1, 2016 at 16:35
  • $\begingroup$ @user65452: Notice that your final matrices A.1, A.2 and A.3 are in fact the $R^{-1}$ mentioned in Emilio Novati's answer. So to perform the rotation of vector, you should use the matrix that switches the signs of $\sin\theta$. Anyway your book is definitely incorrect. $\endgroup$
    – KittyL
    Jun 1, 2016 at 16:50
1
$\begingroup$

I believe that you are viewing the problem backwards. The matrix $$ A=\begin{pmatrix} 0 & 0 & 1 \\ 0 & 1 & 0 \\ -1 & 0 & 0 \end{pmatrix} $$ rotates a vector into a new, rotated frame, according to what you are describing with your images. However, what you are asking is, "What matrix brings me from the rotated frame back to the original frame", which would be the inverse of $A$, i.e. $$ A^{-1} = \begin{pmatrix} 0 & 0 & -1 \\ 0 & 1 & 0 \\ 1 & 0 & 0 \end{pmatrix}. $$

$\endgroup$
2
  • $\begingroup$ the rotation of a vector along the Y axis by an angle $\theta$ is the same rotation of the landmark OXZ along the Y axis by the angle $-\theta$ . i think, this is where there is confusion with the Schema. $\endgroup$
    – m.idaya
    Jun 1, 2016 at 16:13
  • $\begingroup$ sorry, the comment for the autor user65452, thanks $\endgroup$
    – m.idaya
    Jun 1, 2016 at 16:15

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .