Rotation representation
来源:互联网 发布:nginx rtmp下载 编辑:程序博客网 时间:2024/06/06 17:49
Rotation representation
星期四, 31. 八月 2017 03:28下午
Outline
- Rotation representation
- Outline
- Rollpitchyaw
- Quaternions
- Definition
- Rules
- Quaternions and Rotations
- Geometric Explanation of Quaternions
- Applications Spherical Linear intERPolationSLERP
Roll,pitch,yaw
roll: 翻滚 沿着x轴旋转
pitch: 倾斜,坠落 沿着y轴旋转
yaw: 偏航 沿着z轴旋转
Quaternions
* Definition:
- i2 = j2 = k2 =-1
- ij = k, jk = i, ki = j, ji = -k, kj = -i, ik = -j
- q = s + x i + y j + z k
* Rules:
- q1 q2 ≠ q2 q1
- (q1 q2) q3 = q1 (q2 q3)
- (q1 + q2) q3 = q1 q3 + q2 q3
- q1 (q2 + q3) = q1 q2 + q1 q3
- α (q1 + q2) = α q1 + α q2 (α is scalar)
- (αq1) q2 = α (q1q2) = q1 (αq2) (α is scalar)
- Norm: |q|2= s2 + x2 + y2 + z2 (|q|2 != q*q= s2 - x2 - y2 -z2+2s(xi+yj+zk))
- Conjugate: q* = s-xi-yj-zk
- Inverse: q-1=q*/|q|2
- unit quaternion: |q| = 1 –> q-1= q*
* Quaternions and Rotations
Rotations are represented by unit quaternions.
|q|2= s2 + x2 + y2 + z2 = 1Let (unit) rotation axis be [ux, uy, uz], and angle θ
Corresponding quaternion is q = cos(θ/2) + sin(θ/2)uxi+sin(θ/2)uyj+sin(θ/2)uzk
Composition of rotations q1 and q2: q = q2 q1≠ q1 q2(not commute)Quaternion-xyzw:
x = ux * sin(θ / 2)
y = uy * sin(θ / 2)
z = uz * sin(θ / 2)
w = cos(θ / 2)Let v be a (3-dim) vector and let q be a unit quaternion:
the corresponding rotation transforms vector v to q v q-1 ,where v = 0+xi+yj+zk = [i,j,k] * [x;y;z]
q v q-1 = [i,j,k] *(R [x;y;z]) (s化为0了)For q = a+bi+cj+dk, R can be expressed as below…
Quaternions q and -q give the same rotation
* Geometric Explanation of Quaternions
- A quaternion is a point on the 4-D unit sphere.
- Interpolating rotations corresponds to curves on the 4-D sphere
(两点+圆心总能作出一个圆,由该圆为大圆可以得到一个球,该大圆的法线方向为旋转轴,两点的弧对应的角度为绕该轴的旋转角,这些是最开始定义中,q = cos(θ/2) + sin(θ/2)uxi+sin(θ/2)uyj+sin(θ/2)uzk 里面的ux uy uz 和θ)
* Applications: Spherical Linear intERPolation(SLERP)
- Situation:Interpolate along the great circle on the 4-D unit sphere(changing from one rotation state to another)
- Solution: pick the shortest(SLERP)
cos(θ)=q1q2 =s1s2+x1x2+y1y2+z1z2
u: from 0–>1
qm = sm + xm i + ym j + zm k, m =1,2
The above formula does not produce a unit quaternion and must be normalized, replace q by q / |q| - Realization:
- Improvement:
To be more smooth:combined with spline.
From http://run.usc.edu/cs520-s12/quaternions/quaternions-cs520.pdf
- Rotation representation
- sparse representation
- sparse representation
- data representation
- Sparse Representation
- word representation
- Word Representation
- Rotation transformation
- 2.rotation
- string rotation
- IOS6 rotation
- transform.rotation
- iOS rotation
- Rotation Matrix
- array rotation
- android rotation
- iOS Rotation
- rotation*vector3
- 小结
- Android双击屏幕动态实现全屏(隐藏标题栏状态栏)
- 242. Valid Anagram
- 使用zmq,probuf,缓冲池实现序列化和反序列化框架(一)-使用ConcurrentLinkedQueue实现缓冲池
- 如何正确管理DCS备件
- Rotation representation
- 大数据技术的应用现状与展望
- Linux执行可执行文件提示No such file or directory的解决方法
- 关于codeblocks出现can't find compiler的解决方法
- 斐波那契数列-java编程:三种方法实现斐波那契数列
- 微信小程序实例源码大全
- Excel 表格导出方法
- Redis启动方式
- JavaScript高级程序设计(第3章 基本概念)