Anim8or Community

Please login or register.

Login with username, password and session length
Advanced search  

News:

Ian Ross has just released a book on Anim8or. It's perect for a beginner and a good reference for experienced users. It contains detailed chapters on every aspect, with many examples. Get your own copy here: "Anim8or Tutorial Book"

Author Topic: Quaternion->Euler Angle -> Quaternion?  (Read 6593 times)

Harvey Birdman

  • Newbie
  • *
  • Posts: 3
    • View Profile
Quaternion->Euler Angle -> Quaternion?
« on: July 06, 2008, 07:53:12 pm »

Has anyone (the author?) ever published conversion forumulas for converting Anim8or orientation quaternions to Euler angles and vice versa? I'm working on porting paths to an application that requires orientation data in Euler angle format; it also has a different coordinate system orientation. My first attempt to derive conversion formulas seems to have gone south somewhere; I'm hoping someone has a known good set I could peek at.
Logged

NickE

  • Full Member
  • ***
  • Posts: 167
    • View Profile
Re: Quaternion->Euler Angle -> Quaternion?
« Reply #1 on: July 06, 2008, 08:25:58 pm »

Anim8or uses regular quaternions.  One can convert quaternions to Euler angles readily.  The formulas shown on the Wikipedia page at http://en.wikipedia.org/wiki/Conversion_between_quaternions_and_Euler_angles work.  In the nomenclature of the Wikipedia, the q0 is the same as w, q1 is x, etc.

If you need help writing a script to do the conversion, let me know.


Logged

Suppastar

  • Jr. Member
  • **
  • Posts: 65
    • View Profile
Re: Quaternion->Euler Angle -> Quaternion?
« Reply #2 on: July 06, 2008, 08:47:46 pm »

Ouch, After reading that Wiki page my brain hurts :P

What are these Euler Angle's used for? Precise 3D to real-life measurement?
Logged

Harvey Birdman

  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: Quaternion->Euler Angle -> Quaternion?
« Reply #3 on: July 06, 2008, 11:37:51 pm »

Thanks, Nikke. I was hoping for the permutation specific to the axes arrangment in Anim8or, but the general form on the Wiki page looks like it'll adapt readily enough. Thanks! (And thanks for the q0-w confirmation. That eliminated another nagging doubt.)

Suppastar - they're both (quaternions and euler angles) used for keeping track of the rotational orientation of an object as it's being moved around. Some things are easier and/or more efficient to calculate with Euler Angles, others with Quaternions, so bouncing from one representation to another is common.
« Last Edit: July 06, 2008, 11:46:00 pm by Harvey Birdman »
Logged