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: ASL Quaternion Functionality  (Read 13401 times)

Steve

  • Administrator
  • Hero Member
  • *****
  • Posts: 2126
    • View Profile
ASL Quaternion Functionality
« on: March 05, 2014, 05:51:27 pm »

New quaternion functions:

    point3 QuaternionToRPY(quaternion);
    quaternion slerp(quaternion, quaternion, float);
    quaternion squad(quaternion, quaternion, quaternion, quaternion, float);

New quaternion operators:

    addition: Q + Q
    subtraction: Q - Q
    multiplication: Q * Q
Logged

Raxx

  • Administrator
  • Hero Member
  • *****
  • Posts: 1482
    • View Profile
Re: ASL Quaternion Functionality
« Reply #1 on: March 05, 2014, 07:16:27 pm »

I was able to test the first two!

quaternionToRPY - Works perfect. Translated the shapes' quaternion orientations directly into the RPY that was given in the status bar. Couldn't be happier. I should point out that it's a lowercase 'q' in the function name.

slerp - I plugged the slerp function into my PHUR script, seems to do a better job of slerping than my manual code, as far as I can tell :)
Logged

Steve

  • Administrator
  • Hero Member
  • *****
  • Posts: 2126
    • View Profile
Re: ASL Quaternion Functionality
« Reply #2 on: March 06, 2014, 12:41:21 am »

Darn, it should be a capital Q to be consistent with the others. I thought I'd tested that since I rearranged the code a bit but guess not. I'll have to fix it.

On another note, Raxx, you mentioned a need for the quaternion function lerp in an e-mail a while back. Was that a typo?  I don't have a good definition for it other that a straightforward linear interpretation of the 4 coordinates, which doesn't seem very meaningful. (It does for 2- and 2-dimensional vectors however.)
« Last Edit: March 06, 2014, 04:13:23 pm by Steve »
Logged

Raxx

  • Administrator
  • Hero Member
  • *****
  • Posts: 1482
    • View Profile
Re: ASL Quaternion Functionality
« Reply #3 on: March 06, 2014, 09:58:11 am »

Hm, I'm not entirely sure why I had lerp in there. I think it's safe to just ignore that :P
Logged

Steve

  • Administrator
  • Hero Member
  • *****
  • Posts: 2126
    • View Profile
Re: ASL Quaternion Functionality
« Reply #4 on: March 06, 2014, 04:13:35 pm »

OK, thanks.
Logged