游戏开发论坛

 找回密码
 立即注册
搜索
查看: 2467|回复: 3

ogre中四元数的问题

[复制链接]

5

主题

11

帖子

17

积分

新手上路

Rank: 1

积分
17
发表于 2007-8-15 17:01:00 | 显示全部楼层 |阅读模式
在camera以及其他的涉及位置和方位变换的地方都使用了四元数的乘,有点不明白,四元数乘以一个向量怎样说明一个方向呢?请高人指教!

2

主题

429

帖子

435

积分

中级会员

Rank: 3Rank: 3

积分
435
发表于 2007-8-16 00:13:00 | 显示全部楼层

Re:ogre中四元数的问题

While walking by the Royal Canal in Dublin on a Monday in October 1843, Hamilton realized
that four numbers are needed to describe a rotation followed by a scaling. One number describes
the size of the scaling, one the number of degrees to be rotated, and the last two numbers
give the plane(*) in which the vector should be rotated.

After this insight, Hamilton found a closed multiplication for four-dimensional complex numbers of the form ix + jy + kz, where i2 = j2 = k2 = ijk = 􀀀1.

Hamilton dubbed his four-dimensional complex numbers quaternions.
The parallel to ordinary complex numbers stems from the imaginary parts.
A quaternion is usually written [s; v]; s 2 R; v 2 R3 . Here s is called the scalar part, and
v = (x; y; z) is the vector part.

===========
* The xy plane can be rotated to any plane in xyz space through the origin by giving the rotation angles about the x and y axes.

摘自:Quaternions, Interpolation and Animation 可以搜搜,详细讲四元数的。

PS: 不过这种涉及本质的问题,不太好有直观的认识。如矩阵为什么能表示旋转?显然不是直观上的乘法这么简单。所谓的“第二代数学模型”。

0

主题

3

帖子

7

积分

新手上路

Rank: 1

积分
7
发表于 2007-8-16 12:53:00 | 显示全部楼层

Re: ogre中四元数的问题

四元数的含义是围绕某一特定旋转轴旋转某一特定的角度,
将四元数表示的旋转作用于一个向量有其特殊的定义,
具体四元数也好,旋转矩阵也好,只是一个数学上的表示方法而已。
真正的目的还是对向量的分量进行操作。

5

主题

11

帖子

17

积分

新手上路

Rank: 1

积分
17
 楼主| 发表于 2007-8-16 18:16:00 | 显示全部楼层

Re: ogre中四元数的问题

谢谢楼上的解答!
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

作品发布|文章投稿|广告合作|关于本站|游戏开发论坛 ( 闽ICP备17032699号-3 )

GMT+8, 2026-1-25 10:33

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表