Coordinate Systems
Coordinate Systems
- Linear Algebra Review
- Vector Spaces
- Coordinate Transformations
- Euler Angles
- Quaternions
Linear Algebra Review
Handed
Coordinate System
Thumb is x, Index finger is y, middle finger is z
left handed
unity
right handed
unreal
Notations
Scalar
Vector
- Column vector, dim=n*1
- Row vector, dim=1*n
Unit Vectors:
Vector magnitude (length)
Matrix
Matrix transpose
Dot product
angel between 2 vec
Projection
Cross product
Where is 右手法则测出来的方向,食指是q,中指是r=》拇指是n
cross product equivalent matrix
Alignment to target
Given , v -> t
angle:
axis:
(两个向量形成平面的法向量)
Coordinate Transformations
Frames of Reference 参考系
- rotate
- translate
- Scale
Pure Rotation
Rotation of coordinate system about the x-axis by angle, is counterclockwise
v1 in Frame 1 to the Frame 0
Rotation Matrix:
$R_10=(R_01)T=(R_01)^{-1}\Rightarrow $ Orthonormal Matrix
绕 ( y ) 轴旋转 ( ) 角度的旋转矩阵可以表示为:
将点 ((x, y, z)) 旋转到新的位置 ((x', y', z')) ,其中 ( \theta ) 是绕 ( y ) 轴的旋转角度。
Euler Angles
roll, pitch, yaw
Phi, theta, Psi
Order of 3 rotations about local axis
y -> z -> x
z->y->x
Fixed Angles
??
Order of 3 rotations about world axis
x->y->z
Pure Translation
translation vector:
Pure Scale
Scale matrix:
Homogeneous Transform
homogeneous vector 齐次坐标
homogeneous transform matrix:
Transformation
- transformation w.r.t. local axes => post multiply
- transformation w.r.t. world axes => pres multiply
Operations
multiplication
inverse
Product of inverse => reverse order of individual inverse
Frames of Reference
Frame of Reference:
Global (World) Frame:
Convert
rotated frame to unrotated frame
Rotation matrix transform vectors from the rotated frame to the unrotated(F0)
Local to global
body to world
child to parent
Local & Global
sequences of transforms => order of
- post-multiply=>local axis
- pre-multiply=>global axis
Example questions:
Given p0, compute p3:
Given F1, F2, compute H12:
Convert handed
Converting form left handed to right handed Coord System
Position:
Euler Angles:
Quaternions
Axis: , Angle:
Background
Problems of Euler Angles representing rotations
axes colinear => "Gimbal lock"
Gimbal locked airplane.
When the pitch (green) and yaw (magenta) gimbals become aligned, changes to roll (blue) and yaw apply the same rotation to the airplane.
Operations
Add:
Mul:
if w.r.t world:
if w.r.t local
Mag:
Inv:
几何意义,角度不变,轴取反
Usage
Rotate axis by quaternion q
Post dot product
Rotate axis by angle (of q)
Computation
Given vector v1, v2
Angle: dot prodcut, law of cosine
Axis: cross product
Orientation Representation Conversion
Quiz
- Rotation Matrix
- Eular Angles
- Quaternions
Q => R
R => Q
E => Q
R => E
E => R
related to sequence, detail see reference