ebook img

Computer Graphics through Key Mathematics PDF

357 Pages·2001·12.047 MB·English
Save to my drive
Quick download
Download
Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.

Preview Computer Graphics through Key Mathematics

Computer Graphics through Key Mathematics Springer-Verlag Berlin Heidelberg GmbH HuwJones Computer Graphics through Key Mathematics i Springer Huw Jones, BSc, DipEd, MSc, FSS, MBCS, CEng Lansdown Centre for Electronic Arts, Middlesex University, Cat Hill, Barnet EN4 8HT British Library Cataloguing in Publication Data Jones,Huw Computer graphics through key mathematics 1.Comuter graphics -Mathematical models I.Title 006.6'0151 ISBN 978-1-85233-422-2 Library of Congress Cataloging-in-Publication Data Jones, H. (Huw) Computer graphics through key mathematics / Huw Jones. p.cm. ISBN 978-1-85233-422-2 ISBN 978-1-4471-0297-7 (eBook) DOI 10.1007/978-1-4471-0297-7 1. Computer graphics. 2. Mathematics. 1. Title. T385 .}6749 2001 006.6--dc21 2001018372 Apart from any fair dea1ing for the purposes of research or private study, or criticism or review, as permitted 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 publishers, or in the case of reprographic reproduction in accordance with the terms of licences issued by the Copyright Licensing Agency. Enquiries concerning reproduction outside those terms should be sent to the publishers. ISBN 978-1-85233-422-2 http://www.springer.co.uk © Springer-Verlag London 2001 Originally published by Springer-Verlag London Berlin Heidelberg in 2001 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. Typesetting: Camera ready by author 34/3830-543210 Dedicated to the memory of John Lansdown (1929-1999) An original thinker, an inspirational leader and, above all, an honest and true friend Preface The non-mathematician cannot conceive of the joys that he's been denied. The amalgam of Truth and Beauty revealed through the understanding of an important theorem cannot be attained through any other human actI•V•I ty. 1 I have often been asked to recommend a book on the mathematics underlying the computer generation of images. Many of these are students or computer graphics users who missed out on the first chance of an extended mathematical education, having specialized in various aspects of the arts from an early age. Now, using methods that have solid mathematical foundations just below the visible surfaces of the systems they use, they want to know just what it is that prevents their systems from collapsing. This book is intended to fill that purpose. I have taught computer graphics, particularly its mathematical underpinning, to a range of students on MSc and MA courses since the mid 1980s. These include postgraduates with first degrees in, for example, engineering, mathematics, computer science, graphic design, fashion, 3D design and fine arts. My intention has always been to give those students an understanding of how things work, to give them knowledge, as well as to develop in them the skills of doing such activities. For example, in the treatment of the calculus, as in chapter 5 of this book, the stress is on describing what differentiation and integration mean and how to interpret results of these methods, rather than to develop the very detailed skills needed for generating such solutions. Mathematics texts are usually intended to develop mathematical skills. In this book, the emphasis is on knowledge rather than skills. To this end, the description is mathematically correct in a discursive rather than a classically rigorous sense; the stress is on justifications rather than proofs. It is, however, necessary to introduce mathematical notation and at times to write down relatively complicated equations, but 'first reading' understanding of concepts should be attempted by those who find these difficult, with perhaps a later return to reinforce details. Also, knowledge is introduced on a 'need to know' priority. Topics introduced in the book are those needed for an understanding of the processes of computer graphics. I have been rewarded by observing my students' excitement in their own successes and achievements, the sudden brightness in the eye on realizing how a desired effect can be achieved. I give just one example, which shows how Doxiadis' 'joys' in the opening quotation are equally applicable to 'she' as well as 'he'. The subject is not named to save her from embarrassment. A student who was an intelligent graduate designer but who had no previous computing experience, and only high-school level mathematics, approached me with some sketches. 'I want to do this and I want to make it move.' The sketches showed clusters of points in swirling patterns. I thought of analogies - leaves blowing in a turbulent wind, perhaps? Having thought about this for a while, I talked her through a scalar field method developed by analogy from a weather map in which atmospheric pressure creates wind in swirling forms around high and low pressure areas. In this field, particles could be dropped to be blown into the moving shapes of her illustration. '1\. Doxiadis (2000) Uncle Petros and Goldbach's Conjecture. Faber & Faber, page 167. viii Computer Graphics through Key Mathematics She understood my description and, with very little help, programmed the method to produce a most successful animation that closely matched her original concept. By needing to know, by putting aside any fear of mathematics, she achieved what she had set out to do and created an artistic animation with distinction. Although most of my teaching has been to postgraduates, the subject content is not always advanced in a mathematical sense, as in many parts of this book. I have enjoyed seeing the scales fall from the eyes of those who had previously shunned mathematical study. As of my students, all I ask of readers of this book is that they approach it with a lack of fear. My intention is that those who approach this book with an open mind will gain knowledge of what is going on under the surfaces of the systems that they use day to day. By better understanding of these processes, they should at least understand their limitations and should be better able to use and enjoy them. I started this preface with a quotation from mathematician/novelist Apostolis Doxiadis (whose work is very highly recommended). The book starts with a description of mathematical concepts, with a few insights as to the purposes of the methods. Its finalthree chapters describe the main processes of 'classical' computer graphics. Their 'raison d'etre' can be summed up in the words of a great artist, Paul Cezanne: Treat nature in terms of the cylinder, the sphere, the cone, all in perspective. Acknowledgements This book is dedicated to the memory of John Lansdown (1929-1999), a friend and mentor over twelve years of professional development. He was a leader who inspired and encouraged people through his personal example and a true and honest friend. He was a genuine innovator and polymath; I gained so much from sharing an office with him for several years. Many other people have helped me develop my career in the teaching of computer graphics. John Vince (now at Boumemouth University) set me going in the subject and Rae Earnshaw (Bradford University) encouraged my early development beyond the boundaries of my own institution. At Middlesex University, Gregg Moore helped me through my early years in computer graphics, and many other current and previous colleagues directly or indirectly supported my professional advancement. Those who have been directly involved in subject development or in a supervisory capacity include (in alphabetical order) Stephen Boyd Davis, Paul Brown, Aurelio Campa, John Cox, Barry Curtis, Gordon Davies, Andrew Deakin, Roger Delbourgo, Tessa Elliott, Alan Findlay, Tony Gibbs, Dick Gledhill, Jackie Guille, Avon Huxor, Hugh Mallinder, Magnus Moar, Jane Moran, Robert Myers, Martin Pitts, Dominique Rivoal, Julian Saunderson, Wally Sewell, Frank Tye and Jason White. I thank, too, those who have helped keep me sane over lunchtime conversations: Gerry Beswick, John Dack, John Lewis, Brian Peerless, Tony White and others. I give my apologies to anyone omitted by my poor memory. I have been fortunate to have very diligent and intelligent postgraduate students over the years. I have used illustrations from the project work of several of these in ix the book. They are Dave Baldwin (figs 8.15 and 8.16 left), Renay Cooper (fig 8.16 right), Andrew Tunbridge (fig 8.33), Aurelio Campa (plate 8.4), Denis Crampton (plate 8.6) and Semannia Luk Cheung (plate 8.7). My early family life gave me a strong grounding in learning and appreciation of sports and the arts. My late father Jack and my mother Megan set the frame in a house full of books; my brother John greatly influenced my early appreciation of mathematics and the visual arts. My wife Judy, with good grace, has put up with the foibles of a researcher. My son Rhodri and daughter Ceri continue to divert me, providing welcome relief from the pressures of work. Ceri, herself a professional software developer, has also given useful comment on some of the contents of this book. Contents Preface .............................................................................................. v 1 The Processes of Computer Graphics ................................................... 1 Introduction ........................................................................................ I Object Model Building ......................................................................... I Depiction of Models ............................................................................ 3 Conclusion ......................................................................................... 6 2 Numbers, Counting and Measuring .................................................... 7 Introduction ........................................................................................ 7 Natural Numbers ................................................................................. 7 Integers ............................................................................................ 12 Rational Numbers .............................................................................. 14 Real Numbers ................................................................................... 17 Complex Numbers ............................................................................. 20 Representations of Number .................................................................. 25 The Computer Representation of Number ............................................... 28 Boolean Algebra ................................................................................ 32 Summary ......................................................................................... 35 3 Coordinates and Dimension: Representations of Space and Colour ...... 37 Introduction ...................................................................................... 37 Cartesian Coordinates ......................................................................... 37 Defining Space by Equations and Inequalities ......................................... 41 Angles ............................................................................................. 44 Trigonometry and Polar Coordinates ..................................................... 46 Dimension ....................................................................................... 56 Coordinate Systems in Three Dimensions ................................. : ............ 61 Colour and its Representation .............................................................. 66 Summary ......................................................................................... 71 4 Functions and Transformations: Ways of Manipulating Space ............ 73 Introduction ...................................................................................... 73 Functions as Mappings ....................................................................... 73 Graphs of Functions ........................................................................... 76 Transformations in 2D ........................................................................ 79 Transformations in 3D ........................................................................ 86 Combining Affine Transformations ....................................................... 89 Inversion of Affine Transformations ...................................................... 94 Inversion of Functions ........................................................................ 95 Shape Transformation by Function Change ........................................... 100 Conclusions .................................................................................... l 03 xii Computer Graphics through Key Mathematics 5 Form from Function: Analysis of Shapes .......................................... 105 Introduction ..................................................................................... l 05 The Straight Line ............................................................................. 105 Drawing General Function Graphs ....................................................... l 07 Graphs of Polynomials ...................................................................... l 07 Calculus: Differentiation .................................................................... 114 Calculus: Integration ......................................................................... 124 Series Expansions ............................................................................. 129 Calculus and Animation .................................................................... 134 The Exponential Function .................................................................. 136 The Conic Sections ........................................................................... 136 Some Standard 3D Forms and their Equations ....................................... 141 Summary ........................................................................................ 245 6 Matrices: Tools for Manipulating Space ............................................ 147 Matrices in Computer Graphics ........................................................... 147 Definition and Notation ..................................................................... 147 Forms of Matrices ............................................................................ 148 Operations on Matrices: Addition ........................................................ 149 Operations on Matrices: Multiplication ................................................. 150 The Identity Matrix ........................................................................... 152 Matrices and Equations ...................................................................... 154 The Inverse of a Square Matrix ............................................................ 159 Matrices, Transformations and Homogeneous Coordinates: Two Dimensions ....................................................... 160 Matrices, Transformations and Homogeneous Coordinates: Three Dimensions ...................................................... 166 Inverse of a Transformation Matrix ...................................................... 170 Perspective Projection ....................................................................... 172 Computer Implementation of Matrix Methods ....................................... 176 Summary ........................................................................................ 183 7 Vectors: Descriptions of Spatial Relationships ................................... 185 Introduction ..................................................................................... 185 Definition of a Vector ........................................................................ 185 Notation ......................................................................................... 186 Addition of Vectors: The Parallelogram and Triangle Laws ...................... 186 Multiplication of a Vector by a Scalar .................................................. 188 Examples of Vector Quantities ............................................................ 189 Vectors in 2D Cartesian Spaces ........................................................... 189 Vectors in 3D Cartesian Spaces ........................................................... 191 Multiplication of Vectors: The Scalar or Dot Product.. ............................ 193 Multiplication of Vectors: The Vector or Cross Product. .......................... 194 Representation of Lines Using Vectors ................................................. 196 Classification of Points against Planes Using Vectors ............................. 197 Representation of Planes in Standard Form ........................................... 198 Intersection of a Line with a Plane ....................................................... 200 Inclusion of a Point in a Triangle ........................................................ 203 Reflected and Refracted Rays .............................................................. 205

See more

The list of books you might like

Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.