Saturday, February 13, 2010

3D Transformation Matrix Summary and Derivations

Translate
Translate

Derivation
Scale
Scale

Derivation
Rotate Around z-axis
Counter-Clockwise
Rotate around z-axis, counter-clockwise

Derivation
Clockwise
Rotate around z-axis, clockwise

Derivation
Rotate Around y-axis
Counter-Clockwise
Rotate around y-axis, counter-clockwise

Derivation
Clockwise
Rotate around y-axis, clockwise

Derivation
Rotate Around x-axis
Counter-Clockwise
Rotate around x-axis, counter-clockwise

Derivation
Clockwise
Rotate around x-axis, clockwise

Derivation
Rotate Around Arbitrary Axis 
—Defined by the unit vector (u, v, w)
Counter-Clockwise
Rotate around arbitrary axis, counter-clockwise
Derivation
Clockwise
Rotate around arbitrary axis, clockwise
Derivation

Derivation: Translate
Translate

Derivation: Scale
Scale

Derivation: Rotate Around z-axis (Counter-Clockwise)
Counter-Clockwise Rotation Around Z

Counter-Clockwise Rotation Around Z (Derivation)

Derivation: Rotate Around z-axis (Clockwise)
Clockwise Rotation Around Z
Clockwise Rotation Around Z (Derivation)
Derivation: Rotate Around y-axis (Counter-Clockwise)
Counter-Clockwise Rotation Around Y
Counter-Clockwise Rotation Around Y (Derivation)
Derivation: Rotate Around y-axis (Clockwise)
Clockwise Rotation Around Y
Clockwise Rotation Around Y (Derivation)
Derivation: Rotate Around x-axis (Counter-Clockwise)
Counter-Clockwise Rotation Around X
Counter-Clockwise Rotation Around X (Derivation)
Derivation: Rotate Around x-axis (Clockwise)
Clockwise Rotation Around X
Clockwise Rotation Around X (Derivation)
Derivation: Rotate Around Arbitrary Axis (Counter-Clockwise)
  1. Rotate vector around z-axis (clockwise): Rz
  2. Rotate vector around y-axis (clockwise): Ry
  3. Rotate around vector (counter-clockwise): R
  4. Rotate vector around y-axis (counter-clockwise)*: Ry-1
  5. Rotate vector around z-axis (counter-clockwise)*: Rz-1
* The inverse of a rotation matrix is the same as the rotation matrix for the same angle in the opposite direction.
Total Rotation Transformation: Rz-1Ry-1RRyRz
= (Rz-1Ry-1)(R)(RyRz)
First and Last Rotations (Rz and Rz-1)
Rotate vector into xz-plane
Rotate vector into xz-plane (Derivation)
Second and Second-to-Last Rotations (Ry and Ry-1)
Rotate vector to z-axis
Rotate vector to z-axis (Derivation)
Middle rotation (R)
Rotate around vector (counter-clockwise)
First two rotations combined (RyRz)
RyRz
Final two rotations combined (Rz-1Ry-1)
Rz-1Ry-1
Final three rotations combined (Rz-1Ry-1R)
RRyRz
Entire transformation ((Rz-1Ry-1R)(RyRz))
Full rotation matrix
Full Rotation Matrix: First Row
Full rotation matrix: Second row
Full rotation matrix: Third row
Derivation: Rotate Around Arbitrary Axis (Clockwise)
See the previous section, and change the sign of each sin() function.

No comments:

Post a Comment