sin(α + θ) = sin α cos θ + cos α sin θ cos(α + θ) = cos α cos θ sin α sin θ

Similar documents
Course 2BA1: Hilary Term 2007 Section 8: Quaternions and Rotations

ECS 178 Course Notes QUATERNIONS

Quaternions. Basilio Bona. Semester 1, DAUIN Politecnico di Torino. B. Bona (DAUIN) Quaternions Semester 1, / 40

Complex Numbers and Quaternions for Calc III

A (Mostly) Linear Algebraic Introduction to Quaternions

The Quaternions & Octonions: A Basic introduction to Their Algebras. By: Kyle McAllister. Boise State University

Hypercomplex numbers

Subalgebras of the Split Octonions

Course MA2C02, Hilary Term 2010 Section 4: Vectors and Quaternions

Contents. D. R. Wilkins. Copyright c David R. Wilkins

Quaternions 2 AUI Course Denbigh Starkey

Computing Moore-Penrose Inverses of Ore Polynomial Matrices Yang Zhang

Lecture 7. Quaternions

QUATERNIONS AND ROTATIONS

The Quaternions. The Quaternions. John Huerta. Department of Mathematics UC Riverside. Cal State Stanislaus

5. Vector Algebra and Spherical Trigonometry (continued)

Understanding Quaternions: Rotations, Reflections, and Perspective Projections. Ron Goldman Department of Computer Science Rice University

Quaternions and the four-square theorem

EXERCISES. a b = a + b l aq b = ab - (a + b) + 2. a b = a + b + 1 n0i) = oii + ii + fi. A. Examples of Rings. C. Ring of 2 x 2 Matrices

12.1. Cartesian Space

MA232A Euclidean and Non-Euclidean Geometry School of Mathematics, Trinity College Michaelmas Term 2017 Vector Algebra and Spherical Trigonometry

Chapter XI Novanion rings

Elementary maths for GMT

Quaternions and their applications

MODEL ANSWERS TO HWK #7. 1. Suppose that F is a field and that a and b are in F. Suppose that. Thus a = 0. It follows that F is an integral domain.

Linear Algebra: Matrix Eigenvalue Problems

Be fruitful and multiply Genesis 1:28

MODEL ANSWERS TO THE FIRST HOMEWORK

Lie Algebra of Unit Tangent Bundle in Minkowski 3-Space

We could express the left side as a sum of vectors and obtain the Vector Form of a Linear System: a 12 a x n. a m2

Quaternions and Octonions

Why Transforms? Want to animate objects and camera Translations Rotations Shears And more.. Want to be able to use projection transforms

Understanding Quaternions. Ron Goldman Department of Computer Science Rice University

A matrix over a field F is a rectangular array of elements from F. The symbol

Quaternions. Mike Bailey. Computer Graphics Quaternions.pptx

Quaternions and Groups

ELEMENTARY LINEAR ALGEBRA

Math 3108: Linear Algebra

Chapter 7. Linear Algebra: Matrices, Vectors,

a 11 x 1 + a 12 x a 1n x n = b 1 a 21 x 1 + a 22 x a 2n x n = b 2.

Quaternions An Algebraic View (Supplement)

1 Matrices and Systems of Linear Equations

Linear Equations and Matrix

Quaternion Algebras. Edgar Elliott. May 1, 2016

A Tutorial on Euler Angles and Quaternions

Chapter 5. Linear Algebra. A linear (algebraic) equation in. unknowns, x 1, x 2,..., x n, is. an equation of the form

DUAL SPLIT QUATERNIONS AND SCREW MOTION IN MINKOWSKI 3-SPACE * L. KULA AND Y. YAYLI **

A matrix is a rectangular array of. objects arranged in rows and columns. The objects are called the entries. is called the size of the matrix, and

A matrix is a rectangular array of. objects arranged in rows and columns. The objects are called the entries. is called the size of the matrix, and

7 Matrix Operations. 7.0 Matrix Multiplication + 3 = 3 = 4

Equality: Two matrices A and B are equal, i.e., A = B if A and B have the same order and the entries of A and B are the same.

Linear Algebra. Paul Yiu. 6D: 2-planes in R 4. Department of Mathematics Florida Atlantic University. Fall 2011

Chapter 6 Additional Topics in Trigonometry, Part II

Geometric Algebra. Gary Snethen Crystal Dynamics

DS-GA 1002 Lecture notes 0 Fall Linear Algebra. These notes provide a review of basic concepts in linear algebra.

Geometric Fundamentals in Robotics Quaternions

Systems of Linear Equations and Matrices

Assignment 10. Arfken Show that Stirling s formula is an asymptotic expansion. The remainder term is. B 2n 2n(2n 1) x1 2n.

Introduction to quaternions

Be fruitful and multiply Genesis 1:28

Systems of Linear Equations and Matrices

Inverses of Square Matrices

CS 246 Review of Linear Algebra 01/17/19

Group Theory: Math30038, Sheet 6

MATH 106 LINEAR ALGEBRA LECTURE NOTES

ANoteontheRepresentationandDefinitionofDualSplitSemiQuaternionsAlgebra

Review of linear algebra

Abstract Algebra II Groups ( )

SUMS OF SQUARES. Lecture at Vanier College, Sept. 23, Eyal Goren, McGill University.

A = 3 B = A 1 1 matrix is the same as a number or scalar, 3 = [3].

Quaternions. R. J. Renka 11/09/2015. Department of Computer Science & Engineering University of North Texas. R. J.

Matrix Algebra & Elementary Matrices

SPLIT QUATERNIONS and CANAL SURFACES. in MINKOWSKI 3-SPACE

Unit Generalized Quaternions in Spatial Kinematics

Vectors Summary. can slide along the line of action. not restricted, defined by magnitude & direction but can be anywhere.

A VERY BRIEF LINEAR ALGEBRA REVIEW for MAP 5485 Introduction to Mathematical Biophysics Fall 2010

Linear Algebra March 16, 2019

= 1 and 2 1. T =, and so det A b d

Linear Algebra. Workbook

12.5 Equations of Lines and Planes

Rings If R is a commutative ring, a zero divisor is a nonzero element x such that xy = 0 for some nonzero element y R.

MTH5112 Linear Algebra I MTH5212 Applied Linear Algebra (2017/2018)

ELEMENTARY LINEAR ALGEBRA

Quantum Computing Lecture 2. Review of Linear Algebra

ON A NEW SPECIES OF IMAGINARY QUANTITIES CONNECTED WITH A THEORY OF QUATERNIONS. William Rowan Hamilton

Linear Algebra Review. Vectors

Octonions? A non-associative geometric algebra. Benjamin Prather. October 19, Florida State University Department of Mathematics

Math Problem set # 7

Quadratics. Shawn Godin. Cairine Wilson S.S Orleans, ON October 14, 2017

ICS 6N Computational Linear Algebra Matrix Algebra

Mathematical Fundamentals

Group, Rings, and Fields Rahul Pandharipande. I. Sets Let S be a set. The Cartesian product S S is the set of ordered pairs of elements of S,

ELEMENTARY LINEAR ALGEBRA

Knowledge Discovery and Data Mining 1 (VO) ( )

Applied Linear Algebra

ELEMENTARY LINEAR ALGEBRA

Linear Algebra: Lecture notes from Kolman and Hill 9th edition.

Clifford Analysis, Homework 1

BSc (Hons) in Computer Games Development. vi Calculate the components a, b and c of a non-zero vector that is orthogonal to

Matrix Theory. A.Holst, V.Ufnarovski

Transcription:

Rotations in the 2D Plane Trigonometric addition formulas: sin(α + θ) = sin α cos θ + cos α sin θ cos(α + θ) = cos α cos θ sin α sin θ Rotate coordinates by angle θ: 1. Start with x = r cos α y = r sin α 2. Rotated coordinates are x = r cos(α + θ) =r(cos α cos θ sin α sin θ) y = r sin(α + θ) =r(sin α cos θ + cos α sin θ) 3. Substituting gives x = x cos θ y sin θ y = x sin θ + y cos θ Matrix version of rotated coordinates: [ ] [ x cos θ sin θ y = sin θ cos θ ][ ] x y 1

Complex Numbers Both multiplication and addition are associative and commutative. If x = a + bi, define the conjugate of x, denoted x, tobea bi. Define the norm of x, denoted x, by x 2 = x x = (a + bi) (a bi) = a 2 + b 2 xy = x y Let x=a+bi, then x x x 2 = 1 and therefore x 1 = a a 2 + b 2 b a 2 + b 2 i Complex numbers form a field. They also form a normed division algebra. Multiplication by a complex number with norm one is a rotation. 2

Rotations in 3D Space cos θ sin θ 0 z-axis: R z = sin θ cos θ 0 0 0 1 x-axis: R x = 1 0 0 0 cos θ sin θ 0 sin θ cos θ sin θ 0 cos θ y-axis: R y = 0 1 0 cos θ 0 sin θ 3

Rotation about an Arbitrary Axis 1. Rotate around the z-axis until the arbitrary axis is in the zx-plane. 2. Rotate around the y-axis until the arbitrary axis coincides with the x-axis. 3. Rotate around the x-axis by angle θ. 4. Undo the rotations around the y-axis and z-axis. A = R T z RT y R xr y R z If the unit vector (n x,n y,n z ) is in the direction of the arbitrary axis, then rotation around this axis corresponds to multiplying by the following matrix where t =(1 cos θ): n 2 xt + cos θ n x n y t n x sin θ n x n z t + n y sin θ A = n x n y t + n x sin θ n 2 yt + cos θ n y n z t n x sin θ n x n z t n y sin θ n y n z t + n x sin θ n 2 z t + cos θ 4

Some Linear Algebra Rotation is a linear transformation and therefore can be represented by a matrix. Rotation preserves distances and angles. Therefore, it preserves dot products. Av Aw = v w If v = 1 0 and w = 0 0 1 0, then Av Aw = a 11 a 12 + a 21 a 22 + a 31 a 32 =1 0+0 1+0 0=0 All the columns of A are perpendicular to each other. Av Av = a 11 a 11 + a 21 a 21 + a 31 a 31 = 1. All columns have unit length. A is an orthonormal matrix. A T A = I (det A) 2 =1 Since a rotation preserves handedness of the coordinate system, det A = 1 A matrix is a rotation matrix if and only if it is orthonormal with determinant 1. Proposition: Composition of two rotations is a rotation. Proof: Product of orthonormal matrices with determinant 1 is orthonormal with determinant 1. 5

Finding the Axis and Angle of a Rotation Matrix Axis: Since A is a rotation, we know that the matrix equation Ax = x has a solution. Solving gives (a 23 a 32, a 31 a 13, a 12 a 21 ) Angle of rotation: tr(a) =tr((cr x )C T ) = tr(c T CR x ) = tr(r x ) = 1 + 2 cos θ. [ ] tr(a) 1 θ = cos 1 2 6

Quaternion Histroy Sir William Rowan Hamilton 1805-1865 Lived in Dublin Discovered Quaternions on October 16, 1843 file:///c /Documents%20and%20Settings/sjanke/Desktop/Quaternion/QHistory1.html10/11/2005 8:35:08 AM

Quaternion Histroy Plaque on Brougham Bridge over the Royal Canal Commemorating Hamilton's discovery of quaternions on October 16, 1843 file:///c /Documents%20and%20Settings/sjanke/Desktop/Quaternion/QHistory2.html10/11/2005 8:35:22 AM

Quaternion Algebra: Take all objects of the form a + bi + cj + dk. Define ij = k, jk = i, ki = j, i 2 = 1, j 2 = 1, k 2 = 1 Note ij = ji, jk = kj, ik = ki. Use the distributive property to multiply: (a 1 + b 1 i + c 1 j + d 1 k) (a 2 + b 2 i + c 2 j + d 2 k)=(a 1 a 2 b 1 b 2 c 1 c 2 d 1 d 2 ) +(a 1 b 2 + a 2 b 1 + c 1 d 2 c 2 d 1 )i +(a 1 c 2 + a 2 c 1 + b 2 d 1 b 1 d 2 )j +(a 1 d 2 + a 2 d 1 + b 1 c 2 b 2 c 1 )k qr does not necessarily equal rq. Quaternion algebra is not commutative. 7

More Quaternion Algebra Define the conjugate of q by q = a bi cj dk. Then q q = a 2 + b 2 + c 2 + d 2 and define q = q q. We have qp = q p. The quaternions form a skew field and is a normed division algebra. There is a natural correspondence between the number q = a + bi + cj + dk and the vector (a, b, c, d). Think of a quaternion as a scalar plus a 3D vector: q = a + bi + cj + dk = a + v = q (cos α + sin α n) Think of a quaternion as a combination of complex numbers C 1 = a 1 + b 1 i and C 2 = a 2 + b 2 i. q = C 1 + C 2 j = a 1 + b 1 i + a 2 j + b 2 k 8

Yet More Quaternion Algebra Take quaternions p = p 0 + p and q = q 0 + q, then pq =(p 0 q 0 p q )+p 0 q + q 0 p + p q Take a quaternion q and a vector v in R 3. q v q =(q 2 0 q 2 ) v +2q 0 ( q v )+2( q v ) q Suppose v = k q, then q v q =(q0 2 q 2 )k q +2q 0 ( q k q)+2( q k q) q =(q0 2 q 2 )k q +2( q k q) q = q0k q 2 k q 2 q +2k q 2 q = k(q0 2 + q 2 ) q = k q Rotation: If q = cos θ 2 +sin θ 2 q, then q v q is the vector resulting from rotating v around axis q by angle θ. Multiplying two unit quaternions composes the two rotations: q 2 (q 1 v q 1 ) q 2 =(q 2 q 1 ) v ( q 1 q 2 ) = q v q 9

Conversion of Quaternion to Matrix Start with a unit quaternion q = d + ai + bj + ck The the corresponding rotation matrix is: 1 2b2 2c 2 2ab +2dc 2ac 2db 2ab 2dc 1 2a 2 2c 2 2bc +2da 2ac +2db 2bc 2da 1 2a 2 2b 2 10

Operation Counts Applying Matrix: 9 multiplications and 6 additions Applying Quaternion: 23 multiplications and 8 additions Compose Matrices: 27 multiplications and 18 additions Compose Quaternions: 12 multiplications and 32 additions Convert Quaternion to Matrix: 16 multiplications and 10 additions Storage: Matrix (9 floating point), Quaternion(4 floating point) 11

Calculating Quaternion Multiplication q 1 = d 1 + a 1 i + b 1 j + c 1 k q 2 = d 2 + a 2 i + b 2 j + c 2 k q = d + ai + bj + ck q = q 1 q 2 A =(d 1 + a 1 )(d 2 + a 2 ) B =(c 1 b 1 )(b 2 c 2 ) C =(a 1 d 1 )(b 2 c 2 ) D =(b 1 + c 1 )(a 2 d 2 ) E =(a 1 + c 1 )(a 2 + b 2 ) F =(a 1 c 1 )(a 2 b 2 ) G =(d 1 + b 1 )(d 2 c 2 ) H =(d 1 b 1 )(d 2 + c 2 ) d = B +( E F + G + H)/2 a = A (E + F + G + H)/2 b = C +(E F + G H)/2 c = D +(E F G + H)/2 8 Multiplications 4 Divisions 32 Additions 12

Spherical Interpolation of Quaternions slerp(q 1, q 2,t)= sin((1 t)φ) q 1 + sin(αt) sin φ sin φ q 2 13

Quaternion Histroy History of Vector Analysis Hamilton discovers quaternions 1843 Gauss may have discovered quaternions independently somewhat earlier. Mobius: Barycentric coordinates Grassmann 1844 Tait and Maxwell (1873 treatise using quaternions and standard vectors) Gibbs and Heaviside 1880's Debate in Nature 1890's (Tait: "Don't spoon feed the public.") file:///c /Documents%20and%20Settings/sjanke/Desktop/Quaternion/QHistory3.html10/11/2005 8:35:37 AM

The Normed Division Algebras R (real numbers) is a commutative associative normed division algebra (with trivial conjugation). C (complex numbers) is a commutative associative normed division algebra with (nontrivial conjugation). H (quaternions) is a associative normed division algebra (non-commutative). O (octonions) is a normed division algebra (non-associative and non-commutative). Lemma: Z=Y+iY is a division algebra just when Y is an associative division algebra. 14