Mathematics for Computer Graphics

This document was uploaded by one of our users. The uploader already confirmed that they had the permission to publish it. If you are author/publisher or own the copyright of this documents, please report to us by using this DMCA report form.

Simply click on the Download Book button.

Yes, Book downloads on Ebookily are 100% Free.

Sometimes the book is free on Amazon As well, so go ahead and hit "Search on Amazon"

John Vince explains a comprehensive range of mathematical techniques and problem-solving strategies associated with computer games, computer animation, special effects, virtual reality, CAD and other areas of computer graphics in this completely revised and expanded sixth edition.

The first five chapters cover a general introduction, number sets, algebra, trigonometry and coordinate systems, which are employed in the following chapters on determinants, vectors, matrix algebra, complex numbers, geometric transforms, quaternion algebra, quaternions in space, interpolation, curves and patches, analytical geometry and barycentric coordinates. Following this, the reader is introduced to the relatively new subject of geometric algebra, followed by two chapters that introduce differential and integral calculus. Finally, there is a chapter on worked examples.

Mathematics for Computer Graphics covers all of the key areas of the subject, including:

• Number sets

• Algebra

• Trigonometry

• Complex numbers

• Coordinate systems

• Determinants

• Vectors

• Quaternions

• Matrix algebra

• Geometric transforms

• Interpolation

• Curves and surfaces

• Analytic geometry

• Barycentric coordinates

• Geometric algebra

• Differential calculus

• Integral calculus

This sixth edition contains approximately 150 worked examples and over 330 colour illustrations, which are central to the author’s descriptive writing style. Mathematics for Computer Graphics provides a sound understanding of the mathematics required for computer graphics software and setting the scene for further reading of more advanced books and technical research papers


Author(s): John Vince
Series: Undergraduate Topics in Computer Science
Edition: 6
Publisher: Springer
Year: 2022

Language: English
Commentary: True PDF
Pages: 586
Tags: Computer Graphics; Number Sets; Algebra; Trigonometry; Complex Numbers; Coordinate Systems; Determinants; Vectors; Quaternions; Matrix Algebra; Geometric Transforms; Interpolation; Curves and Surfaces; Analytic Geometry; Barycentric Coordinates; Geometric Algebra; Differential Calculus; Integral Calculus

Preface
Contents
1 Introduction
1.1 Mathematics for Computer Graphics
1.2 Understanding Mathematics
1.3 What Makes Mathematics Difficult?
1.4 Background to This Book
1.5 How to Use This Book
1.6 Symbols and Notation
References
2 Numbers
2.1 Introduction
2.2 Background
2.3 Counting
2.4 Sets of Numbers
2.5 Zero
2.6 Negative Numbers
2.6.1 The Arithmetic of Positive and Negative Numbers
2.7 Observations and Axioms
2.7.1 Commutative Law
2.7.2 Associative Law
2.7.3 Distributive Law
2.8 The Base of a Number System
2.8.1 Background
2.8.2 Octal Numbers
2.8.3 Binary Numbers
2.8.4 Hexadecimal Numbers
2.8.5 Adding Binary Numbers
2.8.6 Subtracting Binary Numbers
2.9 Types of Numbers
2.9.1 Natural Numbers
2.9.2 Integers
2.9.3 Rational Numbers
2.9.4 Irrational Numbers
2.9.5 Real Numbers
2.9.6 Algebraic and Transcendental Numbers
2.9.7 Imaginary Numbers
2.9.8 Complex Numbers
2.9.9 Transcendental and Algebraic Numbers
2.9.10 Infinity
2.10 Summary
2.11 Worked Examples
2.11.1 Algebraic Expansion
2.11.2 Binary Subtraction
2.11.3 Complex Numbers
2.11.4 Complex Rotation
3 Algebra
3.1 Introduction
3.2 Background
3.2.1 Solving the Roots of a Quadratic Equation
3.3 Indices
3.3.1 Laws of Indices
3.4 Logarithms
3.5 Further Notation
3.6 Functions
3.6.1 Explicit and Implicit Equations
3.6.2 Function Notation
3.6.3 Intervals
3.6.4 Function Domains and Ranges
3.6.5 Odd and Even Functions
3.6.6 Power Functions
3.7 Summary
3.8 Worked Examples
3.8.1 Algebraic Manipulation
3.8.2 Solving a Quadratic Equation
3.8.3 Factorising
References
4 Trigonometry
4.1 Introduction
4.2 Background
4.3 Units of Angular Measurement
4.4 The Trigonometric Ratios
4.4.1 Domains and Ranges
4.5 Inverse Trigonometric Ratios
4.6 Trigonometric Identities
4.7 The Sine Rule
4.8 The Cosine Rule
4.9 Compound-Angle Identities
4.9.1 Double-Angle Identities
4.9.2 Multiple-Angle Identities
4.9.3 Half-Angle Identities
4.10 Perimeter Relationships
4.11 Summary
References
5 Coordinate Systems
5.1 Introduction
5.2 Background
5.3 The Cartesian Plane
5.4 Function Graphs
5.5 Shape Representation
5.5.1 2D Polygons
5.5.2 Area of a Shape
5.6 Theorem of Pythagoras in 2D
5.7 3D Cartesian Coordinates
5.7.1 Theorem of Pythagoras in 3D
5.8 Polar Coordinates
5.9 Spherical Polar Coordinates
5.10 Cylindrical Coordinates
5.11 Summary
5.12 Worked Examples
5.12.1 Area of a Shape
5.12.2 Distance Between Two Points
5.12.3 Polar Coordinates
5.12.4 Spherical Polar Coordinates
5.12.5 Cylindrical Coordinates
Reference
6 Determinants
6.1 Introduction
6.2 Linear Equations with Two Variables
6.3 Linear Equations with Three Variables
6.3.1 Sarrus's Rule
6.4 Mathematical Notation
6.4.1 Matrix
6.4.2 Order of a Determinant
6.4.3 Value of a Determinant
6.4.4 Properties of Determinants
6.5 Summary
6.6 Worked Examples
6.6.1 Determinant Expansion
6.6.2 Complex Determinant
6.6.3 Simple Expansion
6.6.4 Simultaneous Equations
7 Vectors
7.1 Introduction
7.2 Background
7.3 2D Vectors
7.3.1 Vector Notation
7.3.2 Graphical Representation of Vectors
7.3.3 Magnitude of a Vector
7.4 3D Vectors
7.4.1 Vector Manipulation
7.4.2 Scaling a Vector
7.4.3 Vector Addition and Subtraction
7.4.4 Position Vectors
7.4.5 Unit Vectors
7.4.6 Cartesian Vectors
7.4.7 Products
7.4.8 Scalar Product
7.4.9 The Dot Product in Lighting Calculations
7.4.10 The Scalar Product in Back-Face Detection
7.4.11 The Vector Product
7.4.12 The Right-Hand Rule
7.5 Deriving a Unit Normal Vector for a Triangle
7.6 Surface Areas
7.6.1 Calculating 2D Areas
7.7 Summary
7.8 Worked Examples
7.8.1 Position Vector
7.8.2 Unit Vector
7.8.3 Vector Magnitude
7.8.4 Angle Between Two Vectors
7.8.5 Vector Product
References
8 Matrix Algebra
8.1 Introduction
8.2 Background
8.3 Matrix Notation
8.3.1 Matrix Dimension or Order
8.3.2 Square Matrix
8.3.3 Column Vector
8.3.4 Row Vector
8.3.5 Null Matrix
8.3.6 Unit Matrix
8.3.7 Trace
8.3.8 Determinant of a Matrix
8.3.9 Transpose
8.3.10 Symmetric Matrix
8.3.11 Antisymmetric Matrix
8.4 Matrix Addition and Subtraction
8.4.1 Scalar Multiplication
8.5 Matrix Products
8.5.1 Row and Column Vectors
8.5.2 Row Vector and a Matrix
8.5.3 Matrix and a Column Vector
8.5.4 Square Matrices
8.5.5 Rectangular Matrices
8.6 Inverse Matrix
8.6.1 Inverting a Pair of Matrices
8.7 Orthogonal Matrix
8.8 Diagonal Matrix
8.9 Summary
8.10 Worked Examples
8.10.1 Matrix Inversion
8.10.2 Identity Matrix
8.10.3 Solving Two Equations Using Matrices
8.10.4 Solving Three Equations Using Matrices
8.10.5 Solving Two Complex Equations
8.10.6 Solving Three Complex Equations
8.10.7 Solving Two Complex Equations
8.10.8 Solving Three Complex Equations
9 Complex Numbers
9.1 Introduction
9.2 Definition of a Complex Number
9.2.1 Addition and Subtraction of Complex Numbers
9.2.2 Multiplying a Complex Number by a Scalar
9.2.3 Product of Complex Numbers
9.2.4 Square of a Complex Number
9.2.5 Norm of a Complex Number
9.2.6 Complex Conjugate of a Complex Number
9.2.7 Quotient of Complex Numbers
9.2.8 Inverse of a Complex Number
9.2.9 Square-Root of pmi
9.3 Ordered Pairs
9.3.1 Addition and Subtraction of Ordered Pairs
9.3.2 Multiplying an Ordered Pair by a Scalar
9.3.3 Product of Ordered Pairs
9.3.4 Square of an Ordered Pair
9.3.5 Norm of an Ordered Pair
9.3.6 Complex Conjugate of an Ordered Pair
9.3.7 Quotient of an Ordered Pair
9.3.8 Inverse of an Ordered Pair
9.3.9 Square-Root of pmi
9.4 Matrix Representation of a Complex Number
9.4.1 Adding and Subtracting Complex Numbers
9.4.2 Product of Two Complex Numbers
9.4.3 Norm Squared of a Complex Number
9.4.4 Complex Conjugate of a Complex Number
9.4.5 Inverse of a Complex Number
9.4.6 Quotient of a Complex Number
9.4.7 Square-Root of pmi
9.5 Summary
9.6 Worked Examples
9.6.1 Adding and Subtracting Complex Numbers
9.6.2 Product of Complex Numbers
9.6.3 Multiplying a Complex Number by i
9.6.4 The Norm of a Complex Number
9.6.5 The Complex Conjugate of a Complex Number
9.6.6 The Quotient of Two Complex Numbers
9.6.7 Divide a Complex Number by i
9.6.8 Divide a Complex Number by -i
9.6.9 The Inverse of a Complex Number
9.6.10 The Inverse of i
9.6.11 The Inverse of -i
Reference
10 Geometric Transforms
10.1 Introduction
10.2 Background
10.3 2D Transforms
10.3.1 Translation
10.3.2 Scaling
10.3.3 Reflection
10.4 Transforms as Matrices
10.4.1 Systems of Notation
10.5 Homogeneous Coordinates
10.5.1 2D Translation
10.5.2 2D Scaling
10.5.3 2D Reflections
10.5.4 2D Shearing
10.5.5 2D Rotation
10.5.6 2D Scaling
10.5.7 2D Reflection
10.5.8 2D Rotation About an Arbitrary Point
10.6 3D Transforms
10.6.1 3D Translation
10.6.2 3D Scaling
10.6.3 3D Rotation
10.6.4 Gimbal Lock
10.6.5 Rotating About an Axis
10.6.6 3D Reflections
10.7 Change of Axes
10.7.1 2D Change of Axes
10.7.2 Direction Cosines
10.7.3 3D Change of Axes
10.8 Positioning the Virtual Camera
10.8.1 Direction Cosines
10.8.2 Euler Angles
10.9 Rotating a Point About an Arbitrary Axis
10.9.1 Matrices
10.10 Transforming Vectors
10.11 Determinants
10.12 Perspective Projection
10.13 Summary
10.14 Worked Examples
10.14.1 2D Scaling Transform
10.14.2 2D Scale and Translate
10.14.3 3D Scaling Transform
10.14.4 2D Rotation
10.14.5 2D Rotation About a Point
10.14.6 Determinant of the Rotate Transform
10.14.7 Determinant of the Shear Transform
10.14.8 Yaw, Pitch and Roll Transforms
10.14.9 3D Rotation About an Axis
10.14.10 3D Rotation Transform Matrix
10.14.11 2D Change of Axes
10.14.12 3D Change of Axes
10.14.13 Rotate a Point About an Axis
10.14.14 Perspective Projection
11 Quaternion Algebra
11.1 Introduction
11.2 Some History
11.3 Defining a Quaternion
11.3.1 The Quaternion Units
11.3.2 Example of Quaternion Products
11.4 Algebraic Definition
11.5 Adding and Subtracting Quaternions
11.6 Real Quaternion
11.7 Multiplying a Quaternion by a Scalar
11.8 Pure Quaternion
11.9 Unit Quaternion
11.10 Additive Form of a Quaternion
11.11 Binary Form of a Quaternion
11.12 The Complex Conjugate of a Quaternion
11.13 Norm of a Quaternion
11.14 Normalised Quaternion
11.15 Quaternion Products
11.15.1 Product of Pure Quaternions
11.15.2 Product of Unit-Norm Quaternions
11.15.3 Square of a Quaternion
11.15.4 Norm of the Quaternion Product
11.16 Inverse Quaternion
11.17 Matrices
11.17.1 Orthogonal Matrix
11.18 Quaternion Algebra
11.19 Summary
11.19.1 Summary of Definitions
11.20 Worked Examples
11.20.1 Adding and Subtracting Quaternions
11.20.2 Norm of a Quaternion
11.20.3 Unit-norm Quaternions
11.20.4 Quaternion Product
11.20.5 Square of a Quaternion
11.20.6 Inverse of a Quaternion
References
12 Quaternions in Space
12.1 Introduction
12.2 Some History
12.3 Quaternion Products
12.3.1 Special Case
12.3.2 General Case
12.3.3 Double Angle
12.4 Quaternions in Matrix Form
12.4.1 Vector Method
12.4.2 Geometric Verification
12.5 Multiple Rotations
12.6 Rotating About an Off-Set Axis
12.7 Converting a Rotation Matrix to a Quaternion
12.8 Summary
12.8.1 Summary of Definitions
12.9 Worked Examples
12.9.1 Special Case Quaternion
12.9.2 Rotating a Vector Using a Quaternion
12.9.3 Evaluate qpq-1
12.9.4 Evaluate qpq-1 Using a Matrix
References
13 Interpolation
13.1 Introduction
13.2 Background
13.3 Linear Interpolation
13.4 Non-Linear Interpolation
13.4.1 Trigonometric Interpolation
13.4.2 Cubic Interpolation
13.5 Interpolating Vectors
13.6 Interpolating Quaternions
13.7 Summary
14 Curves and Patches
14.1 Introduction
14.2 Background
14.3 The Circle
14.4 The Ellipse
14.5 Bézier Curves
14.5.1 Bernstein Polynomials
14.5.2 Quadratic Bézier Curves
14.5.3 Cubic Bernstein Polynomials
14.6 A Recursive Bézier Formula
14.7 Bézier Curves Using Matrices
14.7.1 Linear Interpolation
14.8 B-Splines
14.8.1 Uniform B-Splines
14.8.2 Continuity
14.8.3 Non-uniform B-Splines
14.8.4 Non-uniform Rational B-Splines
14.9 Surface Patches
14.9.1 Planar Surface Patch
14.9.2 Quadratic Bézier Surface Patch
14.9.3 Cubic Bézier Surface Patch
14.10 Summary
15 Analytic Geometry
15.1 Introduction
15.2 Background
15.2.1 Angles
15.2.2 Intercept Theorems
15.2.3 Golden Section
15.2.4 Triangles
15.2.5 Centre of Gravity of a Triangle
15.2.6 Isosceles Triangle
15.2.7 Equilateral Triangle
15.2.8 Right Triangle
15.2.9 Theorem of Thales
15.2.10 Theorem of Pythagoras
15.2.11 Quadrilateral
15.2.12 Trapezoid
15.2.13 Parallelogram
15.2.14 Rhombus
15.2.15 Regular Polygon
15.2.16 Circle
15.3 2D Analytic Geometry
15.3.1 Equation of a Straight Line
15.3.2 The Hessian Normal Form
15.3.3 Space Partitioning
15.3.4 The Hessian Normal Form from Two Points
15.4 Intersection Points
15.4.1 Intersecting Straight Lines
15.4.2 Intersecting Line Segments
15.5 Point Inside a Triangle
15.5.1 Area of a Triangle
15.5.2 Hessian Normal Form
15.6 Intersection of a Circle with a Straight Line
15.7 3D Geometry
15.7.1 Equation of a Straight Line
15.7.2 Intersecting Two Straight Lines
15.8 Equation of a Plane
15.8.1 Cartesian Form of the Plane Equation
15.8.2 General Form of the Plane Equation
15.8.3 Parametric Form of the Plane Equation
15.8.4 Converting from the Parametric to the General Form
15.8.5 Plane Equation from Three Points
15.9 Intersecting Planes
15.9.1 Intersection of Three Planes
15.9.2 Angle Between Two Planes
15.9.3 Angle Between a Line and a Plane
15.9.4 Intersection of a Line with a Plane
15.10 Summary
16 Barycentric Coordinates
16.1 Introduction
16.2 Background
16.3 Ceva's Theorem
16.4 Ratios and Proportion
16.5 Mass Points
16.6 Linear Interpolation
16.7 Convex Hull Property
16.8 Areas
16.9 Volumes
16.10 Bézier Curves and Patches
16.11 Summary
Reference
17 Geometric Algebra
17.1 Introduction
17.2 Background
17.3 Symmetric and Antisymmetric Functions
17.4 Trigonometric Foundations
17.5 Vectorial Foundations
17.6 Inner and Outer Products
17.7 The Geometric Product in 2D
17.8 The Geometric Product in 3D
17.9 The Outer Product of Three 3D Vectors
17.10 Axioms
17.11 Notation
17.12 Grades, Pseudoscalars and Multivectors
17.13 Redefining the Inner and Outer Products
17.14 The Inverse of a Vector
17.15 The Imaginary Properties of the Outer Product
17.16 Duality
17.17 The Relationship Between the Vector Product and the Outer Product
17.18 The Relationship Between Quaternions and Bivectors
17.19 Reflections and Rotations
17.19.1 2D Reflections
17.19.2 3D Reflections
17.19.3 2D Rotations
17.20 Rotors
17.21 Applied Geometric Algebra
17.22 Summary
References
18 Calculus: Derivatives
18.1 Introduction
18.2 Background
18.3 Small Numerical Quantities
18.4 Equations and Limits
18.4.1 Quadratic Function
18.4.2 Cubic Equation
18.4.3 Functions and Limits
18.4.4 Graphical Interpretation of the Derivative
18.4.5 Derivatives and Differentials
18.4.6 Integration and Antiderivatives
18.5 Function Types
18.6 Differentiating Groups of Functions
18.6.1 Sums of Functions
18.6.2 Function of a Function
18.6.3 Function Products
18.6.4 Function Quotients
18.7 Differentiating Implicit Functions
18.8 Differentiating Exponential and Logarithmic Functions
18.8.1 Exponential Functions
18.8.2 Logarithmic Functions
18.9 Differentiating Trigonometric Functions
18.9.1 Differentiating tan
18.9.2 Differentiating csc
18.9.3 Differentiating sec
18.9.4 Differentiating cot
18.9.5 Differentiating arcsin, arccos and arctan
18.9.6 Differentiating arccsc, arcsec and arccot
18.10 Differentiating Hyperbolic Functions
18.10.1 Differentiating sinh, cosh and tanh
18.11 Higher Derivatives
18.12 Higher Derivatives of a Polynomial
18.13 Identifying a Local Maximum or Minimum
18.14 Partial Derivatives
18.14.1 Visualising Partial Derivatives
18.14.2 Mixed Partial Derivatives
18.15 Chain Rule
18.16 Total Derivative
18.17 Summary
Reference
19 Calculus: Integration
19.1 Introduction
19.2 Indefinite Integral
19.3 Integration Techniques
19.3.1 Continuous Functions
19.3.2 Difficult Functions
19.3.3 Trigonometric Identities
19.3.4 Exponent Notation
19.3.5 Completing the Square
19.3.6 The Integrand Contains a Derivative
19.3.7 Converting the Integrand into a Series of Fractions
19.3.8 Integration by Parts
19.3.9 Integration by Substitution
19.3.10 Partial Fractions
19.4 Area Under a Graph
19.5 Calculating Areas
19.6 Positive and Negative Areas
19.7 Area Between Two Functions
19.8 Areas with the y-Axis
19.9 Area with Parametric Functions
19.10 The Riemann Sum
19.11 Summary
20 Worked Examples
20.1 Introduction
20.2 Area of Regular Polygon
20.3 Area of Any Polygon
20.4 Dihedral Angle of a Dodecahedron
20.5 Vector Normal to a Triangle
20.6 Area of a Triangle Using Vectors
20.7 General Form of the Line Equation from Two Points
20.8 Angle Between Two Straight Lines
20.9 Test if Three Points Lie on a Straight Line
20.10 Position and Distance of the Nearest Point on a Line to a Point
20.11 Position of a Point Reflected in a Line
20.12 Intersection of a Line and a Sphere
20.13 Sphere Touching a Plane
20.14 Summary
Appendix A Limit of (sinθ)/θ
Appendix B Integrating cosnθ
Index