#### Archived

This topic is now archived and is closed to further replies.

# Rotation matrix

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

## Recommended Posts

I like the quaternion way of rotate-by-angle-about-axis, but the quat->matrix is ugly. Is there a simpler way to build a matrix which rotates by theta about V? BTW, when looking down the vector, the rotation is counter-clockwise, right? ******** A Problem Worthy of Attack Proves It''s Worth by Fighting Back

##### Share on other sites
You can just use your quaternions to rotate your vertices directly without using a 4x4 matrix at all.

##### Share on other sites
could you please tel me how kdogg, i cant figure out on my own...

walkingcarcass: check out the last tutorial on this site about quaternions. it should answer all your questions.

##### Share on other sites
To rotate a vector v, represent v as [0, v]. Where q is the rotation quaternion:

Rot(v) = q * v * q-1

multiplication of quaternions:

[s1,v1]*[s2,v2] = [s1*s2 - v1[dot]v2, s1*v2 + s2*v1 + v1[cross]v2]

inverse of a quaternion:

q-1 = (1/||q||)2*[s,-v]

##### Share on other sites
I already know quaternions. I want their equivalent matrix, not converting or substituting.

********

A Problem Worthy of Attack
Proves It''s Worth by Fighting Back

1. 1
2. 2
Rutin
20
3. 3
khawk
17
4. 4
A4L
14
5. 5

• 12
• 16
• 26
• 10
• 44
• ### Forum Statistics

• Total Topics
633759
• Total Posts
3013720
×