user3325287
user3325287

Reputation: 39

How do you rotate a quaternion a specified angle around the y axis?

I'm not quite sure if my question has been asked before in general terms. Whenever it has been asked, it is in terms of a specific language.

Let's say I have an objects rotation represented as a quaternion q = {w, x, y, z}.

I want to rotate this quaternion A radians around the y axis.

Since quaternions are already a measure of rotation, should I just add (or multiply) another quaternion representing the desired rotation to q? How would one go about this?

Thanks for your help.

Upvotes: 3

Views: 2626

Answers (1)

minorlogic
minorlogic

Reputation: 1916

You are right

Since quaternions are already a measure of rotation, should I just add (or multiply) another quaternion representing the desired rotation to q?

You should multiply current rotation quaternion with desired rotation quaternion. Depending on, local frame "Y" or global frame "Y" you should multiply from left to right or right to left.

Upvotes: 2

Related Questions