WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 02-15-2007, 10:16 AM
Jerry Jerry is offline
Member
 
Join Date: Jun 2004
Posts: 105
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?
Reply With Quote
  #2  
Old 02-15-2007, 10:26 AM
farshizzo farshizzo is offline
WorldViz Team Member
 
Join Date: Mar 2003
Posts: 2,849
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]
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 12:11 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Copyright 2002-2023 WorldViz LLC