Anim8or Community

Please login or register.

Login with username, password and session length
Advanced search  

News:

An update to Anim8or, v1.00b, is available with a few bug fixes. Get your copy HERE. See the "ReadMe" file for details.

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

Harvey Birdman

  • Newbie
  • *
  • Posts: 3
    • View Profile
Quaternion->Euler Angle -> Quaternion?
« on: July 06, 2008, 11: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: 157
    • View Profile
Re: Quaternion->Euler Angle -> Quaternion?
« Reply #1 on: July 07, 2008, 12:25:58 am »

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 07, 2008, 12:47:46 am »

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 07, 2008, 03:37:51 am »

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 07, 2008, 03:46:00 am by Harvey Birdman »
Logged