什么是四元数旋转? [英] What's a quaternion rotation?

查看:47
本文介绍了什么是四元数旋转?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

四元数旋转是否只是一个带有物体将向其旋转的 X、Y、Z 的向量,以及一个使物体绕其轴旋转的滚动?

Is quaternion rotation just a vector with X,Y,Z which the object will rotate towards, and a roll which turns the object on its axis?

有那么简单吗?

意思是如果你有 X=0、Z=0 和 Y=1,物体会朝上吗?
如果您有 Y=0、Z=0 和 X=1,对象将面向右侧?

Meaning if you have X=0, Z=0 and Y=1 the object will face upwards?
And if you have Y=0, Z=0 and X=1 the object will face to the right?

(假设 X 右,Y 上和 Z 深度)

(assuming X right, Y up and Z depth)

推荐答案

四元数有 4 个分量,它们可以与一个角相关和一个轴向量 n.旋转将使对象绕轴 n 旋转角度θ.

A quaternion has 4 components, which can be related to an angle θ and an axis vector n. The rotation will make the object rotate about the axis n by an angle θ.

例如,如果我们有一个像这样的立方体

For example, if we have an cube like

 ______
|  6  
| \_____     z
|5 |    | : y ^
  | 4  |    |
  |____|     +--> x

然后旋转 90°绕轴 (x=0, y=0, z=1) 将从左到前旋转5"面.

Then a rotation of 90° about the axis (x=0, y=0, z=1) will rotate the "5" face from the left to the front.

 ______
|  6  
| \_____      z
|3 |    | :  x ^
  | 5  |     |
  |____|  y<--+

(注意:这是旋转的轴/角度描述,这是OP混淆的.有关四元数如何应用于旋转,请参阅http://en.wikipedia.org/wiki/Quaternions_and_spatial_rotation)

(Note: This is the axis/angle description of rotation, which is what OP confuses. For how quaternion is applied to rotation, see http://en.wikipedia.org/wiki/Quaternions_and_spatial_rotation)

这篇关于什么是四元数旋转?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆