Jump to content

  • Log In with Google      Sign In   
  • Create Account

tom_mai78101

Member Since 09 Jan 2007
Offline Last Active Today, 12:17 AM

Posts I've Made

In Topic: What is the Quaternion equivalent for multiplying two 3x3 rotation matrices t...

10 September 2016 - 01:28 AM

Ah, it seems I was missing a conjugate to achieve rotation multiplication with quaternions.

No wonder I was confused about this. I will heed your warning.

Is there anything else I am missing in regards to quaternion alternatives to rotation matrix multiplications?

In Topic: What is the Quaternion equivalent for multiplying two 3x3 rotation matrices t...

09 September 2016 - 11:38 PM

The result of composing two rotations depends on the order in which they are applied, so you may have to be a bit careful with the order of operands. In particular, it could be the case that your first operation should be `total = local_rotation * new_rotation', but it's hard to know without being familiar with the exact conventions you are using.

 

The order I'm using is the order going from the left to the right. Same with the example I used in the GIF at the very top. I thought I was consistent enough and therefore there's no need to explain or define the multiplication order for both the Mat3x3 and the quaternions. Sorry.

 

As for the code snippet I mentioned, I was referring to your quote saying:

 

 

The equivalent of matrix multiplication when using quaternions is... quaternion multiplication! (Surprise!)

 

To me, it sounds like you were referring that, assuming the order of operations is exactly the same (going from left to right, and the placement is

 

result = old * new

 

The pattern of the following operation:

 

Mat3x3 result = Mat3x3 old * Mat3x3 new, where operator* denotes the multiplication, and Mat3x3 is the type.

 

Is exactly the same, literally and logically, as the following operation (just the pattern):

 

Quaternion result = Quaternion old * Quaternion new, where operator* denotes the multiplication, and Quaternion is the type.

 

I would like to seek clarification on this. Thanks again.


In Topic: What is the Quaternion equivalent for multiplying two 3x3 rotation matrices t...

09 September 2016 - 08:58 PM

The equivalent of matrix multiplication when using quaternions is... quaternion multiplication! (Surprise!)

 

So, this is correct?

// Generate new local_rotation, matrix-wise
// local_rotation = rotation matrix representing the current orientation
// new_rotation = rotation matrix representing the difference. (Rotation difference from new_rotation to local_rotation).
// total = rotation matrix representing (the final new orientation)
total = local_rotation * new_rotation

// Generate new local_rotation, quaternion-wise
// local_rotation = quaternion representing the current orientiation.
// total = quaternion representing (the local_rotation + the difference from the old orientation to the the final new orientation.)
total = local_rotation * total

In Topic: Porting a physics engine: What do these variables stand for?

07 September 2016 - 08:59 PM

Were comments added after the thread was started? Because there are comments explaining them right in those areas:
 

// in stands for "incoming"

// out stands for "outgoing"

// I stands for "incident"

// R stands for "reference"

 
// extent, as in the extent of each OBB axis

 
But yeah, those variable names... huh...

 
Yep, just added them in. Unfortunately I didn't come up with the names for a lot of these things. Extent. Incident. Bleh. Also it's much easier to just derive things on paper and copy down into the code the equations, so a lot of abstract symbols come up, like e and whatnot. Apologies if any of that is confusing.

Hopefully, some of the issues/pull requests are handled. I noticed there is one which resolved some other confusing parts in your code, but I have no idea if it is better.

Thanks again.

In Topic: Porting a physics engine: What do these variables stand for?

07 September 2016 - 07:53 PM

Not sure. Nonetheless, yay! Thanks.

PARTNERS