Euler Rotation: Difference between revisions
No edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
''' | == 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''<br /> | |||
''φ'': greek letter ''phi''<br /> | |||
''theta'' and ''phi'' are commonly used in trigonometry for angles (but phi is most commonly used as a constant: 1.618...).<br /> | |||
''α'': 1<sup>st</sup> greek letter ''alpha''. For our purposes, it will represent The angle between the original x axis and the normal vector<sup>(1)</sup>.<br /> | |||
''β'': 2<sup>nd</sup> greek letter ''beta''. For our purposes, it will represent the forward or backward "tilt".<br /> | |||
''γ'': 3<sup>rd</sup> greek letter ''gamma''. For our purposes, it will represent the angle between the normal vector<sup>(1)</sup> and the new x axis.<br /> | |||
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(''θ'') | |||
<hr width="33%" NOSHADE> | |||
<sup>(1)</sup> The normal vector is the vector normal to the original z and the new z axes. This can be calculated through [[Cross Product|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] * ... | |||
([x<sub>0</sub> y<sub>0</sub> z<sub>0</sub>]') = [x y z]' |
Revision as of 08:15, 1 July 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]'