Difference between revisions of "Rotation"
(→Three-dimensional) |
|||
Line 163: | Line 163: | ||
===Three-dimensional=== | ===Three-dimensional=== | ||
+ | |||
+ | The properties of two-dimensional rotation can also be used for three-dimensional rotation. In three-dimensional space three basic types of rotation are regarded: rotation around x-, y- and z-axis. | ||
[[Category:Article]] | [[Category:Article]] | ||
[[Category:Transformations]] | [[Category:Transformations]] |
Revision as of 15:17, 12 June 2014
← Back: Scaling | Overview: Transformations | Next: Homogeneous coordinates → |
Rotation is a transformation where the coordinates are rotated around the origin of the coordinate system. In this article rotation is first described for two dimensions and based on the two-dimensional transform matrix, rotation in three-dimensional space is presented.
Two-dimensional
The figure on the right shows an example, where the vector is rotated by around the origin, what results in vector . The length of the vector is assumed as and so the length of is as well. The initial angle of relative to the x-axis is . Hence the resulting coordinates and can be computed as follows:
|
|
Using the addition theorems of sine and cosine leads to:
|
|
Regarding the vector and its angle to the x-axis, equals and equals . By applying this the above equations can be reformed to:
|
|
These two equations for and can also be written in matrix notation:
So the transformation matrix for rotation about in two dimensions is:
Example: rotation in two-dimensional space
The rotation of a rectangle corresponds to the rotation of each of the three position vectors of the corners individually. The red rectangle is the initial one. If it is rotated by 30 degrees, the result is the blue rectangle. The corresponding transformation matrix is: The green rectangle is obtained by rotating the red rectangle by 90 degrees. This corresponds to the following transformation matrix: Another possibility to obtain the green rectangle is rotating the blue rectangle by 60 degrees. Then the transformation matrix is: The back transformation of the blue rectangle to the red rectangle for example is done by the following transformation matrix: |
Three-dimensional
The properties of two-dimensional rotation can also be used for three-dimensional rotation. In three-dimensional space three basic types of rotation are regarded: rotation around x-, y- and z-axis.