Euler Rotation: Difference between revisions
(True Euler Rotation) |
(Note: using MATLAB notation) |
||
Line 28: | Line 28: | ||
== Rotation Matrices == | == Rotation Matrices == | ||
'''Note:''' The following example uses MATLAB notation for the matrix transformation. | |||
[cos(''γ'') sin(''γ'') 0; -sin(''γ'') cos(''γ'') 0; 0 0 1] * ... | [cos(''γ'') sin(''γ'') 0; -sin(''γ'') cos(''γ'') 0; 0 0 1] * ... | ||
[1 0 0; 0 cos(''α'') sin(''α''); 0 -sin(''α'') cos(''α'')] * ... | [1 0 0; 0 cos(''α'') sin(''α''); 0 -sin(''α'') cos(''α'')] * ... | ||
[cos(''α'') sin(''α'') 0; -sin(''α'') cos(''α'') 0; 0 0 1] * ... | [cos(''α'') sin(''α'') 0; -sin(''α'') cos(''α'') 0; 0 0 1] * ... | ||
([x<sub>0</sub> y<sub>0</sub> z<sub>0</sub>]') = [x y z]' | ([x<sub>0</sub> y<sub>0</sub> z<sub>0</sub>]') = [x y z]' |
Revision as of 18:15, 21 April 2007
Definitions
Euler - Pronounced Oiler; discovered that as 1 is continuously compounded, it reaches a number, e. However, Euler rotation is taking a 3-dimensional axes set and rotating them about the z-axis followed by a forward or backward rotation to create a new axes set. For objects that inherit the property 'eulerrotation', the format is supposedly "Δα Δβ Δγ". Read further for a better explanation.
θ: greek letter theta
φ: greek letter phi
theta and phi are commonly used in trigonometry for angles (but phi is most commonly used as a constant: 1.618...).
α: 1st greek letter alpha. For our purposes, it will represent The angle between the original x axis and the normal vector(1).
β: 2nd greek letter beta. For our purposes, it will represent the forward or backward "tilt".
γ: 3rd greek letter gamma. For our purposes, it will represent the angle between the normal vector(1) and the new x axis.
Therefore, images and text could be rotated, something that could not be done before, so that said image or text would have a three-dimensional effect. If all said is true, eulerrotation = "0 -pi/3 0"; for text would project it in a Star Wars-like fashion.
sin(θ) = y / r (Δy of a point from the center on a circle with radius r) cos(θ) = x / r (Δx of a point from the center on a circle with radius r) sin(θ ± φ) = sin(θ) cos(φ) ± cos(θ) sin(φ) -cos(θ ± φ) = -cos(θ) cos(φ) ± sin(θ) sin(φ)
In addition (not really useful):
tan(θ) = sin(θ) / cos(θ) cot(θ) = cos(θ) / sin(θ) sec(θ) = 1 / cos(θ) csc(θ) = 1 / sin(θ)
(1) The normal vector is the vector normal to the original z and the new z axes. This can be calculated through cross product.
Rotation Matrices
Note: The following example uses MATLAB notation for the matrix transformation.
[cos(γ) sin(γ) 0; -sin(γ) cos(γ) 0; 0 0 1] * ... [1 0 0; 0 cos(α) sin(α); 0 -sin(α) cos(α)] * ... [cos(α) sin(α) 0; -sin(α) cos(α) 0; 0 0 1] * ... ([x0 y0 z0]') = [x y z]'