# Anim8or Community

• January 25, 2022, 03:38:04 am
• Welcome, Guest

### 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"

Pages: [1]

### AuthorTopic: ASL Quaternion Functionality  (Read 5493 times)

#### Steve

• Hero Member
• Posts: 2045
##### 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:

subtraction: Q - Q
multiplication: Q * Q
Logged

#### Raxx

• Hero Member
• Posts: 1482
##### 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

• Hero Member
• Posts: 2045
##### 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

• Hero Member
• Posts: 1482
##### 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
Logged