Presentation is loading. Please wait.

Presentation is loading. Please wait.

1 KIPA Game Engine Seminars Jonathan Blow Ajou University December 13, 2002 Day 16.

Similar presentations


Presentation on theme: "1 KIPA Game Engine Seminars Jonathan Blow Ajou University December 13, 2002 Day 16."— Presentation transcript:

1 1 KIPA Game Engine Seminars Jonathan Blow Ajou University December 13, 2002 Day 16

2 2 Rotation in 2D Multiplication of complex numbers Complex number representation in polar coordinates (magnitude, angle)

3 3 Euler’s Formula e iθ = cosθ + i sinθ Looking at the derivative of each side

4 4 All rotations in 3D can be expressed as rotation by an angle around an axis Definition of the axis as an eigenvector of the rotation Proof that in 3D all transforms have 1 or 3 (real) eigenvalues So we have 1 or 3 axes of rotation 3 axes means it’s the identity rotation (maybe with scaling)

5 5 Quaternion As an axis/angle representation Re-derivation of qvq*

6 6 Mathematical demonstration that the expression qvq* rotates the vector v Work out the terms, breaking v into components parallel and orthogonal to the axis Show what qvq* does to each of these components

7 7 Multiplying by a Non-Unit Quaternion Scales the vector (demonstration of this) (analogy to 2D case)

8 8 Quaternion Powers What is q 2 ? What is q t ?

9 9 SLERP As q 0 (1-t) q 1 t Rewrite this as q 0 (q 0 -1 q 1 ) t

10 10 Exponential Form of a Quaternion cosθ + y sinθ ; y is axis of rotation e yθ

11 11 The Log of a Quaternion log e yθ = yθ But be careful, the additive log identity doesn’t work here! –It requires commutative multiplication –Demonstration of this on whiteboard –The identity does work if the axes are colinear

12 12 The Exponential Map Is the log of a quaternion –Actually it can also mean the log of an arbitrary transformation matrix, but here we are restricted to quaternions We can interpolate in this space What are the properties of this interpolation?

13 13 The Exponential Map It interpolates at constant speed, but it is not the same function as slerp Therefore it cannot possibly follow the shortest path of interpolation –(otherwise they’d be the same function!) Indeed the further away the source orientations, the wider the path used by the exponential map

14 14 The Exponential Map But sometimes you care most about constant speed, so the exponential map works well for that Provides a method of linearization that’s different from the linear interpolation in quaternion space discussed last week Also apparently there’s lots of other math you can do with these, which I don’t know, read some advanced robotics papers to find out

15 15 Simple Cases For Quaternions qxq* qxq* dot x Convert quaternion to rotation matrix

16 16 Discussion of my quaternion IK work (demo of app) People generally use Euler angles for IK but they are slow and unintuitive We can use quaternions instead to build a fast system


Download ppt "1 KIPA Game Engine Seminars Jonathan Blow Ajou University December 13, 2002 Day 16."

Similar presentations


Ads by Google