# quaternion and -quaternion: what is different?

This topic is 3662 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

I am using quaternions to store orientations and never had any problems. Now I am also interpolating between quaternions and in some rare cases, the interpolation looks wrong (going the longer way). When this happens, I rotate one of the the quaternion around one of its axes by 360 degrees and then the interpolation is ok! The euler angles between the quaternion and the 360-degree rotated quaternion are same, but the rotated quaternion appears to have been multiplied by -1. My question is: what is the difference between q=(w,x,y,z) and -q=(-w,-x,-y,-z)? To me it appears that q and -q don't make a difference when representing an orientation, but for interpolation, it makes a difference. To fix the interpolation problem, I first do a scalar product between the two quaternions and if the result is negative, I multiply one by -1, and then my interpolations are always ok

##### Share on other sites
Yes - q represents the same rotation as -q

and

Yes - you need to negate one quaternion when slerping if the dot product is negative.

Thanks MrRowl!

1. 1
2. 2
3. 3
Rutin
21
4. 4
khawk
14
5. 5

• 9
• 11
• 11
• 23
• 12
• ### Forum Statistics

• Total Topics
633655
• Total Posts
3013187
×