qrot3d
所属分类:matlab编程
开发工具:matlab
文件大小:68KB
下载次数:307
上传日期:2006-06-08 21:07:12
上 传 者:
happybirthday
说明: 四元数实现的三维空间的表达形式,具有表达式简单,运算精度高,占有存储空间小等优点。
(quaternion achieve the three-dimensional space of expression, the expression is simple, high precision computing, possession of small storage space advantages.)
文件列表:
qrot3d (0, 2005-04-30)
qrot3d\Makefile (766, 2005-03-11)
qrot3d\qrot3d.c (6655, 2005-04-30)
qrot3d\qrot3d.def (38, 2005-01-12)
qrot3d\qrot3d.dll (49152, 2005-04-30)
qrot3d\qrot3d.m (949, 2005-03-11)
qrot3d\qrot3d.mexglx (11438, 2005-04-30)
qrot3d\qrot3d.ncb (101376, 2005-04-30)
qrot3d\qrot3d.o (4916, 2005-04-30)
qrot3d\qrot3d.sln (901, 2005-01-12)
qrot3d\qrot3d.suo (8192, 2005-04-30)
qrot3d\qrot3d.vcproj (3854, 2005-03-11)
Name: qrot3d
Author: Steven Michael (smichael@ll.mit.edu)
Date: 3/10/2005
############################################################
The following code implements quaternion rotation on a
3-D set of data.
for a reference, see:
http://mathworld.wolfram.com/Quaternion.html
############################################################
Compilation:
The base distribution includes binary MATLAB functions for Linux and
Windows. The functions were compiled with Matlab R14. I have not
tried them with other versions, but they should work. The Windows
compiler used is MS Visual Studio.NET 2003 (v7.1). The linux compiler
is gcc version 2.96 (RedHat Linux 7.3).
To compile in Linux, simply type "make" in the base directory.
Some variables may need to be changed in the Makefile depending
upon MATLAB version and C compiler.
I've included the MS Visual Studio project for compiling the
"qrot3d.dll" file as well.
############################################################
Example Usage:
rotation of a dataset about the Z axis by an angle of pi/3
data = rand(10000,3);
omega = [0 0 1];
theta = pi/3;
rotdata = qrot3d(data,omega,theta)
rotation of the dataset about a pre-defined quaternion
data = rand(10000,3);
omega = [0 0 1];
theta = pi/3;
q = [cos(theta/2), omega.*sin(theta/2)];
rotdata = qrot3d(data,q);
###########################################################
Fixes:
4/29/05
Fix problem with double precision rotation
近期下载者:
相关文件:
收藏者: