# defining a pure rotation

This topic is 3627 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

I have an object which I can grab and move. There is a gmtl 4 x 4 matrix associated with it. I wish to rotate the object in x y and z axis in such a way that the translation component always remain 0. Essentially I wish to restrict translation when I am rotating the object in the 3 axis so that it becomes a pure rotation. How can I do this ? Should I assign NULL values to the translation component in the matrix after the motion is defined so that it becomes a pure rotation ? Please help Thanks

##### Share on other sites
Not null values, but zero.
Have you checked to see whether the gmtl provides functions to create a rotation matrix from a more intuitive representation (like Euler angles)?

##### Share on other sites
2 questions

1st. When I assign 0 values to the translation component, it essentially means the top 3 values on the last column of the matrix right ?

2nd. I have not looked at other ways like Euler representations. But I would definitely look at functions which make a pure rotation matrix out of a general matrix. As far as I can remember there are functions which do that.

Thanks a lot

##### Share on other sites
1) That's right.

2) There may be functions that will create a rotation matrix from another representation, this would be handy as you can specify the rotation in an intuitive way and the translation component will be all zeroes. There may also exist a function that will extract the 3x3 rotation matrix from a 4x4 matrix. I've never used the GMTL so I don't know whether these functions are provided, if not you can always write them yourself.

##### Share on other sites
How can I make sure that the 3 rotations I make along the x,y, and z axis are perfectly orthogonal ?

1. 1
2. 2
3. 3
Rutin
16
4. 4
5. 5

• 12
• 26
• 10
• 11
• 9
• ### Forum Statistics

• Total Topics
633723
• Total Posts
3013545
×