Thread: Quaternions
View Single Post
  #5  
Old 06-11-2008, 05:48 PM
farshizzo farshizzo is offline
WorldViz Team Member
 
Join Date: Mar 2003
Posts: 2,849
In my previous post I explained what the values mean. So given the quaternion rotation of [0,1,0,0], this would mean a 180 degree rotation around the Y axis (2 * acos(0) = 180 degrees). Printing the euler and axis-angle values of the main view after applying the quaternion will confirm this. Adding the following code at the end of the script:
Code:
print viz.MainView.getEuler()
print viz.MainView.getAxisAngle()
resulted in the following output:
Code:
[-180.0, 0.0, 0.0]
[0.0, -1.0, 0.0, 180.0]
FYI, Vizard color values range from 0-1, not 0-255.
Reply With Quote