Message Boards Message Boards

2 Replies
0 Total Likes
View groups...
Share this post:

Can anyone see my error in how I am using the RotationMatrix function?

I am working with tensors for the first time and am trying to solve some simple problems with the inertia tensor in 3-D. All goes well until I try some simple coordinate system rotations using the RotationMatrix function. I have built a very simple notebook to illustrate my problem. I have a particle located at a point {a,a,0} in my basis coordinates. I then rotate the coordinate system by 30 degrees about the x-axis.

I expect the transformed x' to be the same as x and it is, I expect y' to be positive and > a and it is, BUT I expect z' to be non-zero and negative but it isn't.

This must be trivial but I cannot find a FAQ on this community and so I am looking for your help.

Thanks in advance, David

POSTED BY: David Mackay
2 Replies

RotationMatrix rotates the vectors, not the coordinate system. Either change the sign of your angle or transpose your matrix if you want to rotate the coordinates.

POSTED BY: John Doty

Thank you John. I

POSTED BY: David Mackay
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
or Discard

Group Abstract Group Abstract