开发者

How to convert quaternion to angle?

Is there a formula to convert a quaternion to an angle?

Looking to do something on the iPhone using the Core Motion A开发者_运维技巧PI and the gyro so that based on data I receive from it (in the form of quaternions) I can project a UIView on the screen.

Thanks


Yes, see Quaternions and spatial rotation. The unit quaternion (w, x, y, z) represents a rotation about the axis (x, y, z) of an angle of 2*cos-1(w).

Note that this is only true of unit quaternions. Non-unit quaternions do not represent rotations.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜