#1
|
|||
|
|||
Rotation and Euler
When I rotate and object with obj.rotate(0,90,30) and then get the
Euler angles with obj.get(viz.EULER), in Viz 2.5 I get [-21.9, 90, 8.06], but in Viz 3 I get [75, 90, 105]. Why the difference. Which is correct? Why aren't the Euler angles the same as the angles in the rotate command? |
#2
|
|||
|
|||
The algorithm to extract the euler angles from a rotation matrix was slightly modified in Vizard 3.0. However, all the values are correct. This is simply the nature of euler angles. There are multiple ways to represent one orientation using euler angles. If you converted each of those euler angles into a quaternion, you would get roughly the same value:
Code:
>>>vizmat.EulerToQuat(0,90,30) [0.68301272392272949, -0.1830126941204071, 0.1830127090215683, 0.68301272392272949] >>>vizmat.EulerToQuat(-21.9,90,8.06) [0.68307656049728394, -0.18277427554130554, 0.18277427554130554, 0.68307656049728394] >>>vizmat.EulerToQuat(75,90,105) [0.68301272392272949, -0.18301267921924591, 0.18301267921924591, 0.68301272392272949] |
|
|