logo资料库

Quaternions for Computer Graphics.pdf

第1页 / 共147页
第2页 / 共147页
第3页 / 共147页
第4页 / 共147页
第5页 / 共147页
第6页 / 共147页
第7页 / 共147页
第8页 / 共147页
资料共147页,剩余部分请下载后查看
Quaternions for Computer Graphics
Preface
Contents
Chapter 1: Introduction
1.1 Rotation Transforms
1.2 The Reader
1.3 Aims and Objectives of This Book
1.4 Mathematical Techniques
1.5 Assumptions Made in This Book
Chapter 2: Number Sets and Algebra
2.1 Introduction
2.2 Number Sets
2.2.1 Natural Numbers
2.2.2 Real Numbers
2.2.3 Integers
2.2.4 Rational Numbers
2.3 Arithmetic Operations
2.4 Axioms
2.5 Expressions
2.6 Equations
2.7 Ordered Pairs
2.8 Groups, Rings and Fields
2.8.1 Groups
2.8.2 Abelian Group
2.8.3 Rings
2.8.4 Fields
2.8.5 Division Ring
2.9 Summary
2.9.1 Summary of Definitions
Chapter 3: Complex Numbers
3.1 Introduction
3.2 Imaginary Numbers
3.3 Powers of i
3.4 Complex Numbers
3.5 Adding and Subtracting Complex Numbers
3.6 Multiplying a Complex Number by a Scalar
3.7 Complex Number Products
3.7.1 Square of a Complex Number
3.8 Norm of a Complex Number
3.9 Complex Conjugate
3.10 Quotient of Two Complex Numbers
3.11 Inverse of a Complex Number
3.12 Square-Root of i
3.13 Field Structure
3.14 Ordered Pairs
3.14.1 Multiplying by a Scalar
3.14.2 Complex Conjugate
3.14.3 Quotient
3.14.4 Inverse
3.15 Matrix Representation of a Complex Number
3.15.1 Adding and Subtracting
3.15.2 The Product
3.15.3 The Square of the Norm
3.15.4 The Complex Conjugate
3.15.5 The Inverse
3.15.6 Quotient
3.16 Summary
3.16.1 Summary of Operations
3.17 Worked Examples
Chapter 4: The Complex Plane
4.1 Introduction
4.2 Some History
4.3 The Complex Plane
4.4 Polar Representation
4.5 Rotors
4.6 Summary
4.6.1 Summary of Operations
4.7 Worked Examples
Chapter 5: Quaternion Algebra
5.1 Introduction
5.2 Some History
5.3 Defining a Quaternion
5.3.1 The Quaternion Units
5.3.2 Example of Quaternion Products
5.4 Algebraic Definition
5.5 Adding and Subtracting Quaternions
5.6 Real Quaternion
5.7 Multiplying a Quaternion by a Scalar
5.8 Pure Quaternion
5.9 Unit Quaternion
5.10 Additive Form of a Quaternion
5.11 Binary Form of a Quaternion
5.12 The Conjugate
5.13 Norm of a Quaternion
5.14 Normalised Quaternion
5.15 Quaternion Products
5.15.1 Product of Pure Quaternions
5.15.2 Product of Two Unit-Norm Quaternions
5.15.3 Square of a Quaternion
5.15.4 Norm of the Quaternion Product
5.16 Inverse Quaternion
5.17 Matrices
5.17.1 Orthogonal Matrix
5.18 Quaternion Algebra
5.19 Summary
5.19.1 Summary of Operations
5.20 Worked Examples
Chapter 6: 3D Rotation Transforms
6.1 Introduction
6.2 3D Rotation Transforms
6.3 Rotating About a Cartesian Axis
6.4 Rotate About an Off-Set Axis
6.5 Composite Rotations
6.6 Rotating About an Arbitrary Axis
6.6.1 Matrices
6.6.2 Vectors
6.7 Summary
6.7.1 Summary of Transforms
6.8 Worked Examples
Chapter 7: Quaternions in Space
7.1 Introduction
7.2 Some History
7.2.1 Composition Algebras
7.3 Quaternion Products
7.3.1 Special Case
7.3.2 General Case
7.4 Quaternions in Matrix Form
7.4.1 Vector Method
7.4.2 Matrix Method
7.4.3 Geometric Verification
7.5 Multiple Rotations
7.6 Eigenvalue and Eigenvector
7.7 Rotating About an Off-Set Axis
7.8 Frames of Reference
7.9 Interpolating Quaternions
7.10 Converting a Rotation Matrix to a Quaternion
7.11 Euler Angles to Quaternion
7.12 Summary
7.12.1 Summary of Operations
7.13 Worked Examples
Chapter 8: Conclusion
Appendix : Eigenvectors and Eigenvalues
References
Index
Quaternions for Computer Graphics
John Vince Quaternions for Computer Graphics
Professor John Vince, MTech, PhD, DSc, CEng, FBCS Bournemouth University, Bournemouth, UK url: www.johnvince.co.uk ISBN 978-0-85729-759-4 DOI 10.1007/978-0-85729-760-0 Springer London Dordrecht Heidelberg New York e-ISBN 978-0-85729-760-0 British Library Cataloguing in Publication Data A catalogue record for this book is available from the British Library Library of Congress Control Number: 2011931282 © Springer-Verlag London Limited 2011 Apart from any fair dealing for the purposes of research or private study, or criticism or review, as per- mitted under the Copyright, Designs and Patents Act 1988, this publication may only be reproduced, stored or transmitted, in any form or by any means, with the prior permission in writing of the publish- ers, or in the case of reprographic reproduction in accordance with the terms of licenses issued by the Copyright Licensing Agency. Enquiries concerning reproduction outside those terms should be sent to the publishers. The use of registered names, trademarks, etc., in this publication does not imply, even in the absence of a specific statement, that such names are exempt from the relevant laws and regulations and therefore free for general use. The publisher makes no representation, express or implied, with regard to the accuracy of the information contained in this book and cannot accept any legal responsibility or liability for any errors or omissions that may be made. Cover design: VTeX UAB, Lithuania Printed on acid-free paper Springer is part of Springer Science+Business Media (www.springer.com)
This book is dedicated to Heidi
Preface More than 50 years ago when I was studying to become an electrical engineer, I came across complex numbers, which were used to represent out-of-phase volt- ages and currents using the j operator. I believe that the letter j was used, rather than i, because the latter stood for electrical current. So from the very start of my studies I had a clear mental picture of the imaginary unit as a rotational operator which could advance or retard electrical quantities in time. When events dictated that I would pursue a career in computer programming— rather than electrical engineering—I had no need for complex numbers, until Man- dlebrot’s work on fractals emerged. But that was a temporary phase, and I never needed to employ complex numbers in any of my computer graphics software. How- ever in 1986, when I joined the flight simulation industry, I came across an internal report on quaternions, which were being used to control the rotational orientation of a simulated aircraft. I can still remember being completely bemused by quaternions, simply because they involved so many imaginary terms. However, after much research I started to understand what they were, but not how they worked. Simultaneously, I was becom- ing interested in the philosophical side of mathematics, and trying to come to terms with the ‘real meaning’ of mathematics through the writing of Bertrand Russell. Consequently, concepts such as i were an intellectual challenge. I am now comfortable with the idea that imaginary i is nothing more than a symbol, and in the context of algebra permits i2 = −1 to be defined. And I believe it is futile trying to discover any deeper meaning to its existence. Nevertheless, it is an amazing object within mathematics, and I often wonder whether there could be similar objects waiting to be invented. When I started writing books on mathematics for computer graphics, I studied complex analysis in order to write with some confidence about complex quantities. It was then that I discovered the historical events behind the invention of vectors and quaternions, mainly through Michael Crowe’s excellent book “A History of Vector Analysis”. This book brought home to me the importance of understanding how and why mathematical invention takes place. Recently, I came across Simon Altmann’s book “Rotations, Quaternions, and Double Groups” which provided further information concerning the demise of vii
viii Preface quaternions in the 19th century. Altmann is very passionate about securing recogni- tion for the mathematical work of Olinde Rodrigues, who published a formula that is very similar to that generated by Hamilton’s quaternions. The important aspect of Rodrigues’ publication was that it was made three years before Hamilton’s invention of quaternions in 1843. However, Rodrigues did not invent quaternion algebra—that prize must go to Hamilton—but he did understand the importance of half-angles in the trigonometric functions used to rotate points about an arbitrary axis. Anyone who has used Euler transforms will be aware of their shortcomings, espe- cially their Achilles’ heel: gimbal lock. Therefore, any device that can rotate points about an arbitrary axis is a welcome addition to a programmer’s toolkit. There are many techniques for rotating points and frames in the plane and space, which I covered in some detail in my book “Rotation Transforms for Computer Graphics”. That book also covered the Euler–Rodrigues parameterisation and quaternions, but it was only after submitting the manuscript for publication, that I decided to write this book dedicated to quaternions and how and why they were invented, and their application to computer graphics. Whilst researching this book, it was extremely instructive to read some of the early books and papers by William Rowan Hamilton and his friend P.G. Tait. I now understand how difficult it must have been to fully comprehend the significance of quaternions, and how they could be harnessed. At the time, there was no major demand to rotate points about an arbitrary axis; however, a mathematical system was required to handle vectorial quantities. In the end, quaternions were not the flavour of the month, and slowly faded from the scene. Nevertheless, the ability to represent vectors and manipulate them arithmetically was a major achievement for Hamilton, even though it was the foresight of Josiah Gibbs to create a simple and workable algebraic framework. In this book I have tried to describe some of the history surrounding the invention of quaternions, as well as a description of quaternion algebra. In no way would I consider myself an authority on quaternions. I simply want to communicate how I understand them, which hopefully will be useful for you. There are different ways to represent a quaternion, but the one I like the best is an ordered pair, which I discovered in Simon Altmann’s book. This book divides into eight chapters. The first and last chapters introduce and conclude the book, with six chapters covering the following subjects. The second chapter on number sets and algebra reviews the notation and language relevant to the rest of the book. There are sections on number sets, axioms, ordered pairs, groups, rings and fields. This prepares the reader for the non-commutative quaternion prod- uct, and why quaternions are described as a division ring. Chapter 3 reviews complex numbers and shows how they can be represented as an ordered pair and a matrix. Chapter 4 continues this theme by introducing the complex plane and showing the rotational features of complex numbers. It also prepares the reader for the question that was asked in the early nineteenth century: could there be a 3D equivalent of a complex number? Chapter 5 answers this question by describing Hamilton’s invention: quaternions and their associated algebra. I have included some historical information so that the
Preface ix reader appreciates the significance of Hamilton’s work. Although ordered pairs are the main form of notation, I have also included matrix notation. To prepare the reader for the rotational qualities of quaternions, Chap. 6 reviews 3D rotation transforms, especially Euler angles, and gimbal lock. I also develop a matrix for rotating a point about an arbitrary axis using vectors and matrix trans- forms. Chapter 7 is the focal point of the book and describes how quaternions rotate vec- tors about an arbitrary axis. The chapter begins with some historical information and explains how different quaternion products rotate points. Although quaternions are readily implemented using their complex form or ordered-pair notation, they also have a matrix form, which is developed from first principles. The chapter continues with sections on eigenvalues, eigenvectors, rotating about an offset-axis, rotating frames of reference, interpolating quaternions, and converting between quaternions and a rotation matrix. Each chapter contains many practical examples to show how equations are eval- uated, and where relevant, further worked examples are shown at the end of the chapter. Writing this book has been a very enjoyable experience, and I trust that you will also enjoy reading it and discover something new from its pages. I would like to thank Dr Tony Crilly, Reader Emeritus at Middlesex University, for reading a draft manuscript and correcting and clarifying my notation and expla- nations. Tony performed the same task on my book Rotation Transforms for Com- puter Graphics. I trust implicitly his knowledge of mathematics and I am grateful for his advice and expertise. However, I still take full responsibility for any algebraic faux pas I might have made. I would also like to thank Professor Patrick Riley, who read some early drafts of the manuscript and posed some interesting technical questions about quaternions. Such questions made me realise that some of my descriptions of quaternions re- quired further clarification, which hopefully have been rectified. I have now used LATEX 2ε for three of my books, and have become confident with its notation. Nevertheless, I still had to call upon Springer’s technical support team, and thank them for their help. I am not sure whether this is my last book. If it is, I would like to thank Beverley Ford, Editorial Director for Computer Science, and Helen Desmond, Associate Ed- itor for Computer Science, Springer UK, for their professional support during the past years. If it is not my last book, then I look forward to working with them again on another project. Ringwood, UK John Vince
分享到:
收藏