Mathematics for computer graphics (undergraduate topics in computer science), 6th edition 2022 john

Page 1


Visit to download the full and correct content document: https://ebookmass.com/product/mathematics-for-computer-graphics-undergraduate-to pics-in-computer-science-6th-edition-2022-john-vince/

More products digital (pdf, epub, mobi) instant download maybe you interests ...

Calculus for Computer Graphics, 3rd Edition John Vince

https://ebookmass.com/product/calculus-for-computer-graphics-3rdedition-john-vince/

Foundation Mathematics for Computer Science: A Visual Approach 3rd Edition John Vince

https://ebookmass.com/product/foundation-mathematics-forcomputer-science-a-visual-approach-3rd-edition-john-vince/

Mathematics and Computer Science, Volume 1 Sharmistha Ghosh

https://ebookmass.com/product/mathematics-and-computer-sciencevolume-1-sharmistha-ghosh/

Quaternions for Computer Graphics

https://ebookmass.com/product/quaternions-for-computer-graphics-c

Computer Science Illuminated

https://ebookmass.com/product/computer-science-illuminated/

Computer graphics with Open GL. 4th Edition Donald D. Hearn

https://ebookmass.com/product/computer-graphics-with-open-gl-4thedition-donald-d-hearn/

(eTextbook PDF) for Mathematical Structures for Computer Science 7th Edition

https://ebookmass.com/product/etextbook-pdf-for-mathematicalstructures-for-computer-science-7th-edition/

The Complete Guide to Blender Graphics: Computer Modeling and Animation: Volume1 9th Edition John M. Blain

https://ebookmass.com/product/the-complete-guide-to-blendergraphics-computer-modeling-and-animation-volume1-9th-editionjohn-m-blain/

5 Steps to a 5: AP Computer Science A 2022 Dean R. Johnson

https://ebookmass.com/product/5-steps-to-a-5-ap-computerscience-a-2022-dean-r-johnson/

UndergraduateTopicsinComputer Science

SeriesEditor

IanMackie,UniversityofSussex,Brighton,UK

AdvisoryEditors

SamsonAbramsky ,DepartmentofComputerScience,UniversityofOxford, Oxford,UK

ChrisHankin ,DepartmentofComputing,ImperialCollegeLondon,London,UK

MikeHinchey ,Lero–TheIrishSoftwareResearchCentre,Universityof Limerick,Limerick,Ireland

DexterC.Kozen,DepartmentofComputerScience,CornellUniversity,Ithaca, NY,USA

AndrewPitts ,DepartmentofComputerScienceandTechnology,Universityof Cambridge,Cambridge,UK

HanneRiisNielson ,DepartmentofAppliedMathematicsandComputerScience, TechnicalUniversityofDenmark,KongensLyngby,Denmark

StevenS.Skiena,DepartmentofComputerScience,StonyBrookUniversity,Stony Brook,NY,USA

IainStewart ,DepartmentofComputerScience,DurhamUniversity,Durham, UK

‘UndergraduateTopicsinComputerScience’(UTiCS)delivershigh-quality instructionalcontentforundergraduatesstudyinginallareasofcomputingand informationscience.Fromcorefoundationalandtheoreticalmaterialtofinal-year topicsandapplications,UTiCSbookstakeafresh,concise,andmodernapproach andareidealforself-studyorforaone-ortwo-semestercourse.Thetextsareall authoredbyestablishedexpertsintheirfields,reviewedbyaninternationaladvisory board,andcontainnumerousexamplesandproblems,manyofwhichincludefully workedsolutions.

TheUTiCSconceptreliesonhigh-quality,concisebooksinsoftbackformat,and generallyamaximumof275–300pages.Forundergraduatetextbooksthatare likelytobelonger,moreexpository,Springercontinuestoofferthehighlyregarded TextsinComputerScienceseries,towhichwereferpotentialauthors.

JohnVince MathematicsforComputer Graphics

SixthEdition

ISSN1863-7310ISSN2197-1781(electronic)

UndergraduateTopicsinComputerScience

ISBN978-1-4471-7519-3ISBN978-1-4471-7520-9(eBook) https://doi.org/10.1007/978-1-4471-7520-9

1st –5th editions:©Springer-VerlagLondonLtd.2001,2006,2010,2014,2017

6th edition:©Springer-VerlagLondonLtd.,partofSpringerNature2022

Theauthor(s)has/haveassertedtheirright(s)tobeidentifiedastheauthor(s)ofthisworkinaccordance withtheCopyright,DesignsandPatentsAct1988.

Thisworkissubjecttocopyright.AllrightsarereservedbythePublisher,whetherthewholeorpartof thematerialisconcerned,specificallytherightsoftranslation,reprinting,reuseofillustrations,recitation, broadcasting,reproductiononmicrofilmsorinanyotherphysicalway,andtransmissionorinformation storageandretrieval,electronicadaptation,computersoftware,orbysimilarordissimilarmethodology nowknownorhereafterdeveloped.

Theuseofgeneraldescriptivenames,registerednames,trademarks,servicemarks,etc.inthispublication doesnotimply,evenintheabsenceofaspecificstatement,thatsuchnamesareexemptfromtherelevant protectivelawsandregulationsandthereforefreeforgeneraluse.

Thepublisher,theauthorsandtheeditorsaresafetoassumethattheadviceandinformationinthisbook arebelievedtobetrueandaccurateatthedateofpublication.Neitherthepublishernortheauthorsor theeditorsgiveawarranty,expressedorimplied,withrespecttothematerialcontainedhereinorforany errorsoromissionsthatmayhavebeenmade.Thepublisherremainsneutralwithregardtojurisdictional claimsinpublishedmapsandinstitutionalaffiliations.

ThisSpringerimprintispublishedbytheregisteredcompanySpringer-VerlagLondonLtd.partofSpringer Nature.

Theregisteredcompanyaddressis:TheCampus,4CrinanStreet,London,N19XW,UnitedKingdom

Thisbookisdedicatedtomywife,Heidi.

Preface

ThefirsteditionofthisbookbeganlifeaspartofSpringer’s Essential seriesand containedtenchaptersandapproximately220pages.Thissixthandlasteditionhas twentychaptersandapproximately600pages.Overtheinterveningeditions,Ihave revisedandextendedpreviousdescriptionsandintroducednewchaptersonsubjects thatIbelievearerelevanttocomputergraphics,suchasdifferentialcalculusand interpolation,andnewsubjectsthatIhadtolearnabout,suchasquaternionsand geometricalgebra.Hopefully,thiseditionexploresenoughmathematicalideasto satisfymostpeopleworkingincomputergraphics.

AlthoughthefirsteditionofthisbookwasproducedonahumblePCusingWORD, subsequenteditionswereproducedonanAppleiMacusingLATEX.Irecommendto anybuddingauthorsthattheyshouldlearnLATEXanduseSpringer’stemplatesto createtheirfirstmanuscript.Furthermore,today’scomputersaresofastthatIoften compiletheentirebookforthesakeofchangingasinglecharacter—itonlytakes5 or6seconds!

Ihaveusedcolourinthetexttoemphasisethepatternsbehindcertainnumbers andintheillustrationstoclarifythemathematics.

Itisextremelydifficulttoensurethattherearenospellingmistakes,missing brackets,spuriouspunctuationmarksand,aboveall,mathematicalerrors.Itruly havedonemybesttocorrectthetextandassociatedequations,butifIhavemissed some,thenIapologisenow.

Inallofmybooks,Itrytomentionthenamesofimportantmathematicians associatedwithaninventionordiscoveryandtheperiodoverwhichtheywerealive. Inthisbook,Imention50suchpeople,andtherelevantdatesareattachedtothefirst citation.

WhilstwritingthisbookIhaveborneinmindwhatitwaslikeformewhenI wasstudyingdifferentareasofmathematicsforthefirsttime.Inspiteofreadingand rereadinganexplanationseveraltimes,itcouldtakedaysbefore‘thepennydropped’ andaconceptbecameapparent.Hopefully,thereaderwillfindthefollowingexplanationsusefulindevelopingtheirunderstandingofthesespecificareasofmathematics andenjoythesoundofvariouspenniesdropping!

IwouldliketothankHelenDesmond,EditorforComputerScience,forallowing metogiveupholidaysandhobbiesinordertocompleteanotherbook!

Breinton,UK May2022

2.6.1TheArithmeticofPositiveandNegative

2.7.1CommutativeLaw.............................10

2.7.2AssociativeLaw...............................10

2.7.3DistributiveLaw..............................11

2.8TheBaseofaNumberSystem............................11

2.8.1Background..................................11 2.8.2OctalNumbers................................12 2.8.3BinaryNumbers...............................13 2.8.4HexadecimalNumbers.........................13 2.8.5AddingBinaryNumbers........................16

2.8.6SubtractingBinaryNumbers....................18

4.4TheTrigonometricRatios................................53

4.9.1Double-AngleIdentities........................61

4.9.2Multiple-AngleIdentities.......................62 4.9.3Half-AngleIdentities...........................63

5CoordinateSystems

5.5.12DPolygons..................................67

5.5.2AreaofaShape...............................67

5.6TheoremofPythagorasin2D.............................68 5.73DCartesianCoordinates................................69

5.7.1TheoremofPythagorasin3D...................70 5.8PolarCoordinates.......................................70

5.9SphericalPolarCoordinates..............................71

5.10CylindricalCoordinates..................................72

5.11Summary..............................................73

5.12WorkedExamples.......................................73

5.12.1AreaofaShape...............................73

5.12.2DistanceBetweenTwoPoints...................73

5.12.3PolarCoordinates.............................74

5.12.4SphericalPolarCoordinates.....................74 5.12.5CylindricalCoordinates........................75

6Determinants

6.2LinearEquationswithTwoVariables.......................78

6.3LinearEquationswithThreeVariables.....................81

6.3.1Sarrus’sRule.................................88

6.4MathematicalNotation...................................88

6.4.1Matrix.......................................88

6.4.2OrderofaDeterminant.........................89

6.4.3ValueofaDeterminant.........................89

6.4.4PropertiesofDeterminants......................91

6.5Summary..............................................91

6.6WorkedExamples.......................................92

6.6.1DeterminantExpansion.........................92

6.6.2ComplexDeterminant..........................92

6.6.3SimpleExpansion.............................93

6.6.4SimultaneousEquations........................93

7Vectors .......................................................95

7.1Introduction............................................95

7.2Background............................................95

7.32DVectors.............................................96

7.3.1VectorNotation...............................96

7.3.2GraphicalRepresentationofVectors..............97

7.3.3MagnitudeofaVector..........................98

7.43DVectors.............................................99

7.4.1VectorManipulation...........................100

7.4.2ScalingaVector...............................100

7.4.3VectorAdditionandSubtraction.................101

7.4.4PositionVectors...............................102

7.4.5UnitVectors..................................102

7.4.6CartesianVectors..............................103

7.4.7Products.....................................103

7.4.8ScalarProduct................................104

7.4.9TheDotProductinLightingCalculations.........105

7.4.10TheScalarProductinBack-FaceDetection........106

7.4.11TheVectorProduct............................107

7.4.12TheRight-HandRule..........................112

7.5DerivingaUnitNormalVectorforaTriangle...............112

7.6SurfaceAreas...........................................113

7.6.1Calculating2DAreas..........................114

7.7Summary..............................................114

7.8WorkedExamples.......................................115

7.8.1PositionVector................................115

7.8.2UnitVector...................................115

7.8.3VectorMagnitude.............................115

7.8.4AngleBetweenTwoVectors....................116

7.8.5VectorProduct................................116 References....................................................117

8.3MatrixNotation.........................................122

8.3.1MatrixDimensionorOrder.....................122

8.3.2SquareMatrix.................................122

8.3.3ColumnVector................................123

8.3.4RowVector...................................123

8.3.5NullMatrix...................................123

8.3.6UnitMatrix...................................123

8.3.7Trace........................................124

8.3.8DeterminantofaMatrix........................125

8.3.9Transpose....................................125

8.3.10SymmetricMatrix.............................126

8.3.11AntisymmetricMatrix..........................128

8.4MatrixAdditionandSubtraction..........................130

8.4.1ScalarMultiplication...........................130

8.5MatrixProducts.........................................130

8.5.1RowandColumnVectors.......................131

8.5.2RowVectorandaMatrix.......................131

8.5.3MatrixandaColumnVector....................132

8.5.4SquareMatrices...............................133

8.5.5RectangularMatrices..........................134

8.6InverseMatrix..........................................134

8.6.1InvertingaPairofMatrices.....................141

8.7OrthogonalMatrix......................................141

8.8DiagonalMatrix........................................142

8.9Summary..............................................143

8.10WorkedExamples.......................................143

8.10.1MatrixInversion...............................143

8.10.2IdentityMatrix................................144

8.10.3SolvingTwoEquationsUsingMatrices...........144

8.10.4SolvingThreeEquationsUsingMatrices..........145

8.10.5SolvingTwoComplexEquations................146

8.10.6SolvingThreeComplexEquations...............147

8.10.7SolvingTwoComplexEquations................148

8.10.8SolvingThreeComplexEquations...............149

9ComplexNumbers ............................................151

9.1Introduction............................................151

9.2DefinitionofaComplexNumber..........................151

9.2.1AdditionandSubtractionofComplexNumbers....152

9.2.2MultiplyingaComplexNumberbyaScalar.......153

9.2.3ProductofComplexNumbers...................153

9.2.4SquareofaComplexNumber...................154

9.2.5NormofaComplexNumber....................154

9.2.6ComplexConjugateofaComplexNumber........154

9.2.7QuotientofComplexNumbers..................155

9.2.8InverseofaComplexNumber...................156

9.2.9Square-Rootof ±i .............................156

9.3OrderedPairs...........................................158

9.3.1AdditionandSubtractionofOrderedPairs........158

9.3.2MultiplyinganOrderedPairbyaScalar..........159

9.3.3ProductofOrderedPairs.......................159

9.3.4SquareofanOrderedPair......................160

9.3.5NormofanOrderedPair.......................161

9.3.6ComplexConjugateofanOrderedPair...........161

9.3.7QuotientofanOrderedPair.....................161

9.3.8InverseofanOrderedPair......................162

9.3.9Square-Rootof ±i .............................163

9.4MatrixRepresentationofaComplexNumber...............164

9.4.1AddingandSubtractingComplexNumbers.......165

9.4.2ProductofTwoComplexNumbers...............166

9.4.3NormSquaredofaComplexNumber............166

9.4.4ComplexConjugateofaComplexNumber........167

9.4.5InverseofaComplexNumber...................167

9.4.6QuotientofaComplexNumber..................168

9.4.7Square-Rootof ±i .............................169 9.5Summary..............................................170

9.6WorkedExamples.......................................170

9.6.1AddingandSubtractingComplexNumbers.......170

9.6.2ProductofComplexNumbers...................171

9.6.3MultiplyingaComplexNumberby i .............172

9.6.4TheNormofaComplexNumber................173

9.6.5TheComplexConjugateofaComplexNumber....173

9.6.6TheQuotientofTwoComplexNumbers..........174

9.6.7DivideaComplexNumberby i ..................175

9.6.8DivideaComplexNumberby i ................176

9.6.9TheInverseofaComplexNumber...............177

9.6.10TheInverseof i ...............................178

9.6.11TheInverseof i

10.3.1Translation...................................182

10.3.2Scaling.......................................182

10.3.3Reflection....................................183

10.4TransformsasMatrices..................................184

10.4.1SystemsofNotation...........................184

10.5HomogeneousCoordinates...............................184

11.20.1AddingandSubtractingQuaternions.............256

11.20.2NormofaQuaternion..........................257

11.20.3Unit-normQuaternions.........................257

11.20.4QuaternionProduct............................257 11.20.5SquareofaQuaternion.........................258 11.20.6InverseofaQuaternion.........................258

12.4QuaternionsinMatrixForm..............................271

12.8.1SummaryofDefinitions........................281

14.9SurfacePatches.........................................319

14.9.1PlanarSurfacePatch...........................319

14.9.2QuadraticBézierSurfacePatch..................320

14.9.3CubicBézierSurfacePatch.....................322 14.10Summary..............................................324

15AnalyticGeometry ............................................325

15.1Introduction............................................325

15.2Background............................................325

15.2.1Angles.......................................325

15.2.2InterceptTheorems............................326

15.2.3GoldenSection................................327

15.2.4Triangles.....................................327

15.2.5CentreofGravityofaTriangle..................328

15.2.6IsoscelesTriangle.............................328

15.2.7EquilateralTriangle............................329

15.2.8RightTriangle................................329

15.2.9TheoremofThales.............................329

15.2.10TheoremofPythagoras.........................329

15.2.11Quadrilateral..................................330

15.2.12Trapezoid....................................330 15.2.13Parallelogram.................................331

15.2.14Rhombus.....................................331

15.2.15RegularPolygon..............................332

15.2.16Circle........................................332

15.32DAnalyticGeometry...................................334

15.3.1EquationofaStraightLine.....................334

15.3.2TheHessianNormalForm......................335

15.3.3SpacePartitioning.............................337

15.3.4TheHessianNormalFormfromTwoPoints.......337

15.4IntersectionPoints.......................................338

15.4.1IntersectingStraightLines......................338

15.4.2IntersectingLineSegments.....................339

15.5PointInsideaTriangle...................................341

15.5.1AreaofaTriangle.............................341

15.5.2HessianNormalForm..........................343

15.6IntersectionofaCirclewithaStraightLine.................345 15.73DGeometry...........................................347

15.7.1EquationofaStraightLine.....................347

15.7.2IntersectingTwoStraightLines..................348

15.8EquationofaPlane......................................351

15.8.1CartesianFormofthePlaneEquation............351

15.8.2GeneralFormofthePlaneEquation..............353

15.8.3ParametricFormofthePlaneEquation...........354

15.8.4ConvertingfromtheParametrictotheGeneral

17.18TheRelationshipBetweenQuaternionsandBivectors........421

17.19ReflectionsandRotations................................422

17.19.12DReflections................................422

17.19.23DReflections................................423

17.19.32DRotations..................................424

17.20Rotors.................................................426

18Calculus:Derivatives ..........................................437 18.1Introduction............................................437 18.2Background............................................437 18.3SmallNumericalQuantities...............................437 18.4EquationsandLimits....................................439 18.4.1QuadraticFunction............................439

18.4.2CubicEquation................................440

18.4.3FunctionsandLimits...........................442

18.4.4GraphicalInterpretationoftheDerivative.........444

18.4.5DerivativesandDifferentials....................445

18.4.6IntegrationandAntiderivatives..................445

18.5FunctionTypes.........................................447

18.6DifferentiatingGroupsofFunctions........................448

18.6.1SumsofFunctions.............................448

18.6.2FunctionofaFunction.........................450

18.6.3FunctionProducts.............................454

18.6.4FunctionQuotients............................458

18.7DifferentiatingImplicitFunctions.........................460

18.8DifferentiatingExponentialandLogarithmicFunctions.......463

18.8.1ExponentialFunctions.........................463

18.8.2LogarithmicFunctions.........................465

18.9DifferentiatingTrigonometricFunctions....................467

18.9.1Differentiatingtan.............................467

18.9.2Differentiatingcsc.............................468

18.9.3Differentiatingsec.............................469

18.9.4Differentiatingcot.............................470

18.9.5Differentiatingarcsin,arccosandarctan..........470

18.9.6Differentiatingarccsc,arcsecandarccot..........471

18.10DifferentiatingHyperbolicFunctions.......................472

18.10.1Differentiatingsinh,coshandtanh...............474

18.11HigherDerivatives......................................475

18.12HigherDerivativesofaPolynomial........................475

18.13IdentifyingaLocalMaximumorMinimum.................477

18.14PartialDerivatives.......................................480

18.14.1VisualisingPartialDerivatives...................483

18.14.2MixedPartialDerivatives.......................485

18.15ChainRule.............................................486

18.16TotalDerivative.........................................488

18.17Summary..............................................489 Reference.....................................................490

19Calculus:Integration ..........................................491

19.1Introduction............................................491

19.2IndefiniteIntegral.......................................491

19.3IntegrationTechniques...................................492

19.3.1ContinuousFunctions..........................492

19.3.2DifficultFunctions.............................493

19.3.3TrigonometricIdentities........................493

19.3.4ExponentNotation.............................495

19.3.5CompletingtheSquare.........................497

19.3.6TheIntegrandContainsaDerivative..............498

19.3.7ConvertingtheIntegrandintoaSeries ofFractions...................................500

19.3.8IntegrationbyParts............................501

19.3.9IntegrationbySubstitution......................505

19.3.10PartialFractions...............................510

19.4AreaUnderaGraph.....................................512

19.5CalculatingAreas.......................................513

19.6PositiveandNegativeAreas..............................521

19.7AreaBetweenTwoFunctions.............................523

19.8Areaswiththey-Axis....................................524

19.9AreawithParametricFunctions...........................525

19.10TheRiemannSum......................................527

19.11Summary..............................................529

20WorkedExamples .............................................531

20.1Introduction............................................531

20.2AreaofRegularPolygon.................................531

20.3AreaofAnyPolygon....................................532

20.4DihedralAngleofaDodecahedron........................533

20.5VectorNormaltoaTriangle..............................534

20.6AreaofaTriangleUsingVectors..........................535

20.7GeneralFormoftheLineEquationfromTwoPoints.........535

20.8AngleBetweenTwoStraightLines........................536

20.9TestifThreePointsLieonaStraightLine..................537 20.10PositionandDistanceoftheNearestPointonaLine toaPoint..............................................538

Chapter1 Introduction

1.1MathematicsforComputerGraphics

Computergraphicscontainsmanyareasofspecialismsuchasdatavisualisation,computeranimation,filmspecialeffects,computergamesandvirtualreality.Fortunately, noteveryoneworkingincomputergraphicsrequiresaknowledgeofmathematics, butthosethatdo,oftenlookforabookthatintroducesthemtosomebasicideas ofmathematics,withoutturningthemintomathematicians.Thisistheobjectiveof thisbook.OverthefollowingchaptersIintroducethereadertosomeusefulmathematicaltopicsthatwillhelpthemunderstandthesoftwaretheyworkwith,andhow tosolveawidevarietyofgeometricandalgebraicproblems.Thesetopicsinclude numberssystems,algebra,trigonometry,2Dand3Dgeometry,vectors,equations, matrices,complexnumbers,determinants,transforms,quaternions,interpolation, curves,patchesandcalculus.Ihavewrittenaboutsomeofthesetopicstoagreater levelofdetailinotherbooks,whichyoumaybeinterestedinexploring.

1.2UnderstandingMathematics

Oneoftheproblemswithmathematicsisitsincrediblebreadthanddepth.Itembraces everythingfromgeometry,calculus,topology,statistics,complexfunctionstonumbertheoryandpropositionalcalculus.Allofthesesubjectscanbestudiedsuperficiallyortoamind-numbingcomplexity.Fortunately,nooneisrequiredtounderstand everything,whichiswhymathematicianstendtospecialiseinoneortwoareasand developaspecialistknowledge.Ifit’sanycomfort,evenEinsteinaskedfriendsand colleaguestoexplainbranchesofmathematicstohelphimwithhistheories.

©Springer-VerlagLondonLtd.,partofSpringerNature2022

J.Vince, MathematicsforComputerGraphics,UndergraduateTopics inComputerScience, https://doi.org/10.1007/978-1-4471-7520-9_1

1.3WhatMakesMathematicsDifficult?

‘Whatmakesmathematicsdifficult?’isadifficultquestiontoanswer,butonethat hastobeaskedandanswered.Therearemanyanswerstothisquestion,andIbelieve thatproblemsbeginwithmathematicalnotationandhowtoreadit;howtoanalyse aproblemandexpressasolutionusingmathematicalstatements.Unlikelearninga foreignlanguage—whichIfindverydifficult—mathematicsisalanguagethatneeds tobelearnedbydiscoveringfactsandbuildinguponthemtodiscovernewfacts. Consequently,agoodmemoryisalwaysanadvantage,aswellasasenseoflogic.

Mathematicscanbedifficultforanyone,includingmathematicians.Forexample, whentheideaof √ 1wasoriginallyproposed,itwascriticisedandlookeddown uponbymathematicians,mainlybecauseitspurposewasnotfullyunderstood.Eventually,ittransformedtheentiremathematicallandscape,includingphysics.Similarly, whentheGermanmathematicianGeorgCantor(1845–1919),publishedhispapers onsettheoryandtransfinitesets,somemathematicianshoundedhiminadisgraceful manner.TheGermanmathematicianLeopoldKronecker(1823–1891),calledCantor a‘scientificcharlatan’,a‘renegade’,anda‘corrupterofyouth’,anddideverything tohinderCantor’sacademiccareer[1].Similarly,theFrenchmathematicianand physicistHenriPoincaré(1854–1912),calledCantor’sideasa‘gravedisease’[2], whilsttheAustrian-BritishphilosopherandlogicianLudwigWittgenstein(1889–1951),complainedthatmathematicsis‘riddenthroughandthroughwiththeperniciousidiomsofsettheory’[3].Howwrongtheyallwere.Today,settheoryisa majorbranchofmathematicsandhasfounditswayintoeverymathcurriculum.So don’tbesurprisedtodiscoverthatsomemathematicalideasareinitiallydifficultto understand—youareingoodcompany.

1.4BackgroundtoThisBook

DuringmyworkinglifeincomputeranimationIcameacrossawiderangeofstudents withanequallywiderangeofmathematicalknowledge.Somestudentspossesseda rudimentarybackgroundinmathematics,whileothershadbeentaughtcalculusand supportingsubjects.Teachingsuchacohortthemathematicsofcomputergraphics wasachallenge,tosaytheleast,butsomehowIdid.Bytheendofathree-year undergraduatecoursetheywerecompetentprogrammersandcouldprogramawide varietyofmathematicaltechniques.Thefirst-editionofthisbookemployedmuchof myteachingmaterialandhasbeenrevisedandextended.

1.5HowtoUseThisBook

Initially,I’drecommendtoanyreadertostartatthebeginningandstartreading chaptersonsubjectswithwhichtheyarefamiliar.Oneneverknowswhatmaybe

learntfromreadingaboutafamiliarsubjectbyanon-mathematician.Forthose readerswithagoodbackgroundinmathematics,shouldquickreadchapterson topicscoveredelse-where,andsettledownonnewtopics.Howeveryouapproach thisbook,Isincerelyhopethatyoudiscoversomethingnewthatincreasesyour knowledgeofthesubject.

1.6SymbolsandNotation

Oneofthereasonswhymanypeoplefindmathematicsinaccessibleisduetoits symbolsandnotation.Let’slookatsymbolsfirst.TheEnglishalphabetpossessesa reasonablerangeoffamiliarcharactershapes:

a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z whichfindtheirwayintoeverybranchofmathematicsandphysics,andpermitus towriteequationssuchas

and

Itisimportantthatwhenweseeanequation,weareabletoreaditaspartofthe text.Inthecaseof E = mc 2 ,thisisreadas‘ E equals m , c squared’,where E stands forenergy, m formass, c thespeedoflight,whichismultipliedbyitself.Inthe caseof A = π r 2 ,thisisreadas‘ A equalspi, r squared’,where A standsforarea, π theratioofacircle’scircumferencetoitsdiameter,and r thecircle’sradius.Greek symbols,whichhappentolookniceandimpressive,havealsofoundtheirwayinto manyequations,andoftendisrupttheflowofreading,simplybecausewedon’t knowtheirEnglishnames.Forexample,theEnglishtheoreticalphysicistPaulDirac (1902–1984),derivedanequationforamovingelectronusingthesymbols αi and β ,whichare4 × 4matrices,where

andisreadas

‘thesumoftheproductsalpha-i beta,andbetaalpha-i ,equalszero.’ Althoughwedonotcomeacrossmovingelectronsinthisbook,wedohavetobe familiarwiththefollowingGreeksymbols:

γ gamma o omicron

delta

pi epsilon

zeta

eta

theta

iota

kappa

lambda

mu

rho

sigma

tau

upsilon

phi

chi

psi

omega andsomeupper-casesymbols: Γ Gamma Sigma

Delta

Upsilon

Theta Phi Λ Lambda Psi

Xi Omega

Pi

Beingabletoreadanequationdoesnotmeanthatweunderstandit—butwearea littlecloserthanjustbeingabletostareatajumbleofsymbols!Therefore,infuture, whenIintroduceanewmathematicalobject,Iwilltellyouhowitshouldberead.

References

1.DaubenJW(1979)GeorgCantorhismathematicsandphilosophyoftheinfinite.Princeton UniversityPress,Princeton

2.DaubenJW(2004)GeorgCantorandthebattlefortransfinitesettheory(PDF).In:Proceedings ofthe9thACMSconference(WestmontCollege,SantaBarbara,Calif.),pp1–22

3.RodychV(2007)Wittgenstein’sphilosophyofmathematics.In:ZaltaEN(ed)TheStanford encyclopediaofphilosophy.MetaphysicsResearchLab,StanfordUniversity

Chapter2 Numbers

2.1Introduction

Thischapterrevisessomebasicideasaboutcountingandnumbersystems,andhow theyareemployedinthecontextofmathematicsforcomputergraphics.Omitthis chapter,ifyouarefamiliarwiththesubject.

2.2Background

Overthecenturiesmathematicianshaverealisedthatinordertoprogress,theymust giveprecisedefinitionstotheirdiscoveries,ideasandconcepts,sothattheycan bebuiltuponandreferencedbynewmathematicalinventions.Intheeventofany newdiscovery,theserrrdefinitionshavetobeoccasionallychangedorextended.For example,onceuponatimeintegers,rationalandirrationalnumbers,satisfiedallthe needsofmathematicians,untilimaginaryquantitieswereinvented.Today,complex numbershavehelpedshapethecurrentnumbersystemhierarchy.Consequently, theremustbecleardefinitionsfornumbers,andtheoperatorsthatactuponthem. Therefore,weneedtoidentifythetypesofnumbersthatexist,whattheyareused for,andanyproblemsthatarisewhentheyarestoredinacomputer.

2.3Counting

Ourbrain’svisualcortexpossessessomeincredibleimageprocessingfeatures.For example,childrenknowinstinctivelywhentheyaregivenlesssweetsthananother child,andadultsknowinstinctivelywhentheyareshort-changedbyaParisiantaxi driver,ordrivenaroundtheArcdeTriumphseveraltimes,onthewaytotheairport! Intuitively,wecanassesshowmanydonkeysareinafieldwithoutcountingthem,

©Springer-VerlagLondonLtd.,partofSpringerNature2022

J.Vince, MathematicsforComputerGraphics,UndergraduateTopics inComputerScience, https://doi.org/10.1007/978-1-4471-7520-9_2

andgenerally,weseemtoknowwithinasecondortwo,whethertherearejustafew, dozens,orhundredsofsomething.Butwhenaccuracyisrequired,onecan’tbeat counting.Butwhatiscounting?

Wellnormally,wearetaughttocountbyourparentsbymemorisingfirst,the countingwords‘one,two,three,four,five,six,seven,eight,nine,ten,..’andsecond, associatingthemwithourfingers,sothatwhenaskedtocountthenumberofdonkeys inapicturebook,eachdonkeyisassociatedwithacountingword.Wheneach donkeyhasbeenidentified,thenumberofdonkeysequalsthelastwordmentioned. However,thisstillassumesthatweknowthemeaningof‘one,two,three,four,..’ etc.Memorisingthesecountingwordsisonlypartoftheproblem—gettingthemin thecorrectsequenceistherealchallenge.Theincorrectsequence‘one,two,five, three,nine,four,..’etc.,introducesanelementofrandomnessintoanycalculation, butpracticemakesperfect,andit’susefultomasterthecorrectsequencebeforegoing touniversity!

2.4SetsofNumbers

A set isacollectionofarbitraryobjectscalledits elements or members.Forexample, eachsystemofnumberbelongstoasetwithgivenaname,suchas N forthenatural numbers, R forrealnumbers,and Q forrationalnumbers.Whenwewanttoindicate thatsomethingiswhole,realorrational,etc.,weusethenotation: n ∈ N

whichreads‘n isamemberof(∈)theset N’,i.e. n isawholenumber.Similarly:

∈ R

standsfor‘ x isarealnumber.’

A well-orderedset possessesauniqueorder,suchasthenaturalnumbers N. Therefore,if P isthewell-orderedsetofprimenumbersand N isthewell-ordered setofnaturalnumbers,wecanwrite:

P ={2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47,... } N ={1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17,... }

Bypairingtheprimenumbersin P withthenumbersin N,wehave:

andwecanreasonthat2isthe1stprime,and3isthe2ndprime,etc.However,we stillhavetodeclarewhatwemeanby1, 2, 3, 4, 5,... etc.,andwithoutgettingtoo philosophical,Iliketheideaofdefiningthemasfollows.Theword‘one’,represented

2.4SetsofNumbers7 by1,standsfor‘oneness’ofanything:onefinger,onehouse,onetree,onedonkey, etc.Theword‘two’,representedby2,is‘onemorethanone’.Theword‘three’, representedby3,is‘onemorethantwo’,andsoon.

Wearenowinapositiontoassociatesomemathematicalnotationwithournumbersbyintroducingthe + and = signs.Weknowthat + meansadd,butitalsocan standfor‘more’.Wealsoknowthat = meansequal,anditcanalsostandfor‘isthe sameas’.Thusthestatement:

= 1 + 1

isreadas‘twoisthesameasonemorethanone.’

Wecanalsowrite:

whichisreadas‘threeisthesameasonemorethantwo.’Butaswealreadyhavea definitionfor2,wecanwrite

Developingthisidea,andincludingsomeextracombinations,wehave:

= 1 + 1

andcanbecontinuedwithoutlimit.Thesenumbers,1,2,3,4,5,6,etc.,arecalled naturalnumbers,andaretheset N

2.5Zero

Theconceptofzerohasawell-documentedhistory,whichshowsthatithasbeenused bydifferentculturesoveraperiodoftwo-thousandyearsormore.ItwastheIndian mathematicianandastronomerBrahmagupta(598-c.–670),whoarguedthatzero wasjustasvalidasanynaturalnumber,withthedefinition: theresultofsubtracting anynumberfromitself.However,eventoday,thereisnouniversalagreementasto whetherzerobelongstotheset N,consequently,theset N0 standsforthesetof naturalnumbersincludingzero.

Intoday’spositionaldecimalsystem,whichisa placevaluesystem,thedigit 0isaplaceholder.Forexample,203standsfor:twohundreds,notensandthree units.Although0 ∈ N0 ,itdoeshavespecialpropertiesthatdistinguishitfromother membersoftheset,andBrahmaguptaalsogaverulesshowingthisinteraction.

If x ∈ N0 ,thenthefollowingrulesapply:

addition: x + 0 = x

subtraction: x 0 = x

multiplication: x × 0 = 0 × x = 0

division:0/ x = 0

undefineddivision: x /0.

Theexpression0/0iscalledan indeterminateform,asitispossibletoshowthat underdifferentconditions,especiallylimitingconditions,itcanequalanything.So forthemoment,wewillavoidusingituntilwecovercalculus.

2.6NegativeNumbers

Whennegativenumberswerefirstproposed,theywerenotacceptedwithopenarms, asitwasdifficulttovisualise 5ofsomething.Forinstance,ifthereare5donkeys inafield,andtheyareallstolentomakesalami,thefieldisnowempty,andthere isnothingwecandointhearithmeticofdonkeystocreateafieldof 5donkeys. However,inappliedmathematics,numbershavetorepresentallsortsofquantities suchastemperature,displacement,angularrotation,speed,acceleration,etc.,and wealsoneedtoincorporateideassuchasleftandright,upanddown,beforeand after,forwardsandbackwards,etc.Fortunately,negativenumbersareperfectfor representingalloftheabovequantitiesandideas.

Considertheexpression4 x ,where x ∈ N0 .When x takesoncertainvalues, wehave

andunlessweintroducenegativenumbers,weareunabletoexpresstheresultof 4 5.Consequently,negativenumbersarevisualisedasshowninFig. 2.1,where the numberline showsnegativenumberstotheleftofthenaturalnumbers,which are positive,althoughthe + signisomittedforclarity.

Movingfromlefttoright,thenumberlineprovidesanumericalcontinuum fromlargenegativenumbers,throughzero,towardslargepositivenumbers.Inany

Turn static files into dynamic content formats.

Create a flipbook
Issuu converts static files into: digital portfolios, online yearbooks, online catalogs, digital photo albums and more. Sign up and create your flipbook.
Mathematics for computer graphics (undergraduate topics in computer science), 6th edition 2022 john by Education Libraries - Issuu