Jump to content

View more

Image of the Day

Isn't this a lovely apple tempart placeholder thing  #gamedev worth a #screenshotsaturday even I would say. https://t.co/fQH1d0ySIG
IOTD | Top Screenshots

The latest, straight to your Inbox.

Subscribe to GameDev.net's newsletters to receive the latest updates and exclusive content.


Sign up now

Basic rotation matrices are clockwise !

2: Adsense

Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.


  • You cannot reply to this topic
4 replies to this topic

#1 hbdevelop1   Members   

113
Like
0Likes
Like

Posted 10 January 2013 - 08:18 PM

Hello,

I have noticed that the basic 3D rotation matrices in  http://en.wikipedia.org/wiki/Rotation_matrix

rotate vectors clockwise and not counter-clockwise, when the axis about which they occur points toward me !


For example: the following operation yields the vector (0,1,0)
[1      0      0     ]   [0]
[0  cos(90)  sin(90) ] X [0]
[0  -sin(90) cos(90) ]   [1]


Am I missing something ?

Thank you for your help



#2 weeska   Members   

261
Like
0Likes
Like

Posted 11 January 2013 - 12:53 AM

This Rotation Matrix rotates a vector around the x-axis by 90 degrees. Your vector initially points toward the z-axis and after the rotation it points in y-direction. I think this is counter-clock-wise as it's written in the article.

Edited by weeska, 11 January 2013 - 12:54 AM.


#3 Hodgman   Moderators   

50368
Like
0Likes
Like

Posted 11 January 2013 - 01:18 AM

I'm guessing this depends on whether you're using the left or right handed convention.



#4 0r0d   Members   

1835
Like
0Likes
Like

Posted 11 January 2013 - 02:20 AM

Hello,

I have noticed that the basic 3D rotation matrices in  http://en.wikipedia.org/wiki/Rotation_matrix

rotate vectors clockwise and not counter-clockwise, when the axis about which they occur points toward me !


For example: the following operation yields the vector (0,1,0)
[1      0      0     ]   [0]
[0  cos(90)  sin(90) ] X [0]
[0  -sin(90) cos(90) ]   [1]


Am I missing something ?

Thank you for your help

 

I think the problem is that the given matrix is a row-major matrix, which means row vectors.  You're trying to use it as a column-major w/ column vector.

 

So the operation you want to do is really:

 

[0 0 1] X [1      0      0     ] = [0 -1 0]
          [0  cos(90)  sin(90) ]
          [0  -sin(90) cos(90) ]

 

Remember when you look at a matrix it's very important if it's row-major or column-major and right-handed vs left-handed.  The above matrix gives you the correct result if it's right-handed row-major.



#5 Mercile55   Members   

136
Like
0Likes
Like

Posted 20 January 2013 - 07:40 PM

Hello,

I have noticed that the basic 3D rotation matrices in  http://en.wikipedia.org/wiki/Rotation_matrix

rotate vectors clockwise and not counter-clockwise, when the axis about which they occur points toward me !


For example: the following operation yields the vector (0,1,0)
[1      0      0     ]   [0]
[0  cos(90)  sin(90) ] X [0]
[0  -sin(90) cos(90) ]   [1]


Am I missing something ?

Thank you for your help

Your example gives (0,-1,0).

it should be:

[1      0      0     ]   [0]
[0  cos(90) -sin(90) ] X [0]
[0  sin(90)  cos(90) ]   [1]






Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.