You are previewing 3D Math Primer for Graphics and Game Development, 2nd Edition, 2nd Edition.
O'Reilly logo
3D Math Primer for Graphics and Game Development, 2nd Edition, 2nd Edition

Book Description

This engaging book presents the essential mathematics needed to describe, simulate, and render a 3D world. Reflecting both academic and in-the-trenches practical experience, the authors teach you how to describe objects and their positions, orientations, and trajectories in 3D using mathematics. The text provides an introduction to mathematics for game designers, including the fundamentals of coordinate spaces, vectors, and matrices. It also covers orientation in three dimensions, calculus and dynamics, graphics, and parametric curves.

Table of Contents

  1. Preliminaries
  2. Dedication
  3. Epigraph
  4. Acknowledgments
  5. Introduction
    1. Who Should Read This Book
    2. Why You Should Read This Book
    3. What You Should Know before Reading This Book
    4. Overview
    5. Find a Bug in This Book?
  6. Chapter 1 Cartesian Coordinate Systems
    1. 1.1 1D Mathematics
    2. 1.2 2D Cartesian Space
      1. 1.2.1 An Example: The Hypothetical City of Cartesia
      2. 1.2.2 Arbitrary 2D Coordinate Spaces
      3. 1.2.3 Specifying Locations in 2D Using Cartesian Coordinates
    3. 1.3 3D Cartesian Space
      1. 1.3.1 Extra Dimension, Extra Axis
      2. 1.3.2 Specifying Locations in 3D
      3. 1.3.3 Left-handed versus Right-handed Coordinate Spaces
      4. 1.3.4 Some Important Conventions Used in This Book
    4. 1.4 Odds and Ends
      1. 1.4.1 Summation and Product Notation
      2. 1.4.2 Interval Notation
      3. 1.4.3 Angles, Degrees, and Radians
      4. 1.4.4 Trig Functions
      5. 1.4.5 Trig Identities
    5. 1.5 Exercises
      1. Figure 1.1
      2. Figure 1.2
      3. Figure 1.3
      4. Figure 1.4
      5. Figure 1.5
      6. Figure 1.6
      7. Figure 1.7
      8. Figure 1.8
      9. Figure 1.9
      10. Figure 1.10
      11. Figure 1.11
      12. Figure 1.12
      13. Figure 1.13
      14. Figure 1.14
      15. Figure 1.15
      16. Figure 1.16
      17. Figure 1.17
      18. Figure 1.18
      19. Figure 1.19
      20. Figure 1.20
      21. Figure 1.21
      1. Table 1.1
      2. Table 1.2
  7. Chapter 2 Vectors
    1. 2.1 Mathematical Definition of Vector, and Other Boring Stuff
    2. 2.2 Geometric Definition of Vector
    3. 2.3 Specifying Vectors with Cartesian Coordinates
      1. 2.3.1 Vector as a Sequence of Displacements
      2. 2.3.2 The Zero Vector
    4. 2.4 Vectors versus Points
      1. 2.4.1 Relative Position
      2. 2.4.2 The Relationship between Points and Vectors
      3. 2.4.3 It’s All Relative
    5. 2.5 Negating a Vector
      1. 2.5.1 Official Linear Algebra Rules
      2. 2.5.2 Geometric Interpretation
    6. 2.6 Vector Multiplication by a Scalar
      1. 2.6.1 Official Linear Algebra Rules
      2. 2.6.2 Geometric Interpretation
    7. 2.7 Vector Addition and Subtraction
      1. 2.7.1 Official Linear Algebra Rules
      2. 2.7.2 Geometric Interpretation
      3. 2.7.3 Displacement Vector from One Point to Another
    8. 2.8 Vector Magnitude (Length)
      1. 2.8.1 Official Linear Algebra Rules
      2. 2.8.2 Geometric Interpretation
    9. 2.9 Unit Vectors
      1. 2.9.1 Official Linear Algebra Rules
      2. 2.9.2 Geometric Interpretation
    10. 2.10 The Distance Formula
    11. 2.11 Vector Dot Product
      1. 2.11.1 Official Linear Algebra Rules
      2. 2.11.2 Geometric Interpretation
    12. 2.12 Vector Cross Product
      1. 2.12.1 Official Linear Algebra Rules
      2. 2.12.2 Geometric Interpretation
    13. 2.13 Linear Algebra Identities
    14. 2.14 Exercises
      1. Figure 2.1
      2. Figure 2.2
      3. Figure 2.3
      4. Figure 2.4
      5. Figure 2.5
      6. Figure 2.6
      7. Figure 2.7
      8. Figure 2.8
      9. Figure 2.9
      10. Figure 2.10
      11. Figure 2.11
      12. Figure 2.12
      13. Figure 2.13
      14. Figure 2.14
      15. Figure 2.15
      16. Figure 2.16
      17. Figure 2.17
      18. Figure 2.18
      19. Figure 2.19
      20. Figure 2.20
      21. Figure 2.21
      22. Figure 2.22
      23. Figure 2.23
      24. Figure 2.24
      25. Figure 2.25
      26. Figure 2.26
      27. Figure 2.27
      28. Figure 2.28
      29. Figure 2.29
      30. Figure 2.30
      1. Table 2.1
      2. Table 2.2
  8. Chapter 3 Multiple Coordinate Spaces
    1. 3.1 Why Bother with Multiple Coordinate Spaces?
    2. 3.2 Some Useful Coordinate Spaces
      1. 3.2.1 World Space
      2. 3.2.2 Object Space
      3. 3.2.3 Camera Space
      4. 3.2.4 Upright Space
    3. 3.3 Basis Vectors and Coordinate Space Transformations
      1. 3.3.1 Dual Perspectives
      2. 3.3.2 Specifying Coordinate Spaces
      3. 3.3.3 Basis Vectors
    4. 3.4 Nested Coordinate Spaces
    5. 3.5 In Defense of Upright Space
    6. 3.6 Exercises
      1. Figure 3.1
      2. Figure 3.2
      3. Figure 3.3
      4. Figure 3.4
      5. Figure 3.5
      6. Figure 3.6
      7. Figure 3.7
      8. Figure 3.8
      9. Figure 3.9
      10. Figure 3.10
      11. Figure 3.11
      12. Figure 3.12
      13. Figure 3.13
      1. Table 3.1
  9. Chapter 4 Introduction to Matrices
    1. 4.1 Mathematical Definition of Matrix
      1. 4.1.1 Matrix Dimensions and Notation
      2. 4.1.2 Square Matrices
      3. 4.1.3 Vectors as Matrices
      4. 4.1.4 Matrix Transposition
      5. 4.1.5 Multiplying a Matrix with a Scalar
      6. 4.1.6 Multiplying Two Matrices
      7. 4.1.7 Multiplying a Vector and a Matrix
      8. 4.1.8 Row versus Column Vectors
    2. 4.2 Geometric Interpretation of Matrix
    3. 4.3 The Bigger Picture of Linear Algebra
    4. 4.4 Exercises
      1. Figure 4.1
      2. Figure 4.2
      3. Figure 4.3
      4. Figure 4.4
      5. Figure 4.5
  10. Chapter 5 Matrices and Linear Transformations
    1. 5.1 Rotation
      1. 5.1.1 Rotation in 2D
      2. 5.1.2 3D Rotation about Cardinal Axes
      3. 5.1.3 3D Rotation about an Arbitrary Axis
    2. 5.2 Scale
      1. 5.2.1 Scaling along the Cardinal Axes
      2. 5.2.2 Scaling in an Arbitrary Direction
    3. 5.3 Orthographic Projection
      1. 5.3.1 Projecting onto a Cardinal Axis or Plane
      2. 5.3.2 Projecting onto an Arbitrary Line or Plane
    4. 5.4 Reflection
    5. 5.5 Shearing
    6. 5.6 Combining Transformations
    7. 5.7 Classes of Transformations
      1. 5.7.1 Linear Transformations
      2. 5.7.2 Affine Transformations
      3. 5.7.3 Invertible Transformations
      4. 5.7.4 Angle-Preserving Transformations
      5. 5.7.5 Orthogonal Transformations
      6. 5.7.6 Rigid Body Transformations
      7. 5.7.7 Summary of Types of Transformations
    8. 5.8 Exercises
      1. Figure 5.1
      2. Figure 5.2
      3. Figure 5.3
      4. Figure 5.4
      5. Figure 5.5
      6. Figure 5.6
      7. Figure 5.7
      8. Figure 5.8
      9. Figure 5.9
      10. Figure 5.10
      1. Table 5.1
  11. Chapter 6 More on Matrices
    1. 6.1 Determinant of a Matrix
      1. 6.1.1 Determinants of 2 × 2 and 3 × 3 matrices
      2. 6.1.2 Minors and Cofactors
      3. 6.1.3 Determinants of Arbitrary <span xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops" class="cItalic">n</span> &#215; × <span xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops" class="cItalic">n</span> Matrices Matrices
      4. 6.1.4 Geometric Interpretation of Determinant
    2. 6.2 Inverse of a Matrix
      1. 6.2.1 The Classical Adjoint
      2. 6.2.2 Matrix Inverse—Official Linear Algebra Rules
      3. 6.2.3 Matrix Inverse—Geometric Interpretation
    3. 6.3 Orthogonal Matrices
      1. 6.3.1 Orthogonal Matrices—Official Linear Algebra Rules
      2. 6.3.2 Orthogonal Matrices—Geometric Interpretation
      3. 6.3.3 Orthogonalizing a Matrix
    4. 6.4 4 × 4 Homogeneous Matrices
      1. 6.4.1 4D Homogeneous Space
      2. 6.4.2 4 × 4 Translation Matrices
      3. 6.4.3 General Affine Transformations
    5. 6.5 4 × 4 Matrices and Perspective Projection
      1. 6.5.1 A Pinhole Camera
      2. 6.5.2 Perspective Projection Matrices
    6. 6.6 Exercises
      1. Figure 6.1
      2. Figure 6.2
      3. Figure 6.3
      4. Figure 6.4
      5. Figure 6.5
      6. Figure 6.6
      7. Figure 6.7
      8. Figure 6.8
      9. Figure 6.9
  12. Chapter 7 Polar Coordinate Systems
    1. 7.1 2D Polar Space
      1. 7.1.1 Locating Points by Using 2D Polar Coordinates
      2. 7.1.2 Aliasing
      3. 7.1.3 Converting between Cartesian and Polar Coordinates in 2D
    2. 7.2 Why Would Anybody Use Polar Coordinates?
    3. 7.3 3D Polar Space
      1. 7.3.1 Cylindrical Coordinates
      2. 7.3.2 Spherical Coordinates
      3. 7.3.3 Some Polar Conventions Useful in 3D Virtual Worlds
      4. 7.3.4 Aliasing of Spherical Coordinates
      5. 7.3.5 Converting between Spherical and Cartesian Coordinates
    4. 7.4 Using Polar Coordinates to Specify Vectors
    5. 7.5 Exercises
      1. Figure 7.1
      2. Figure 7.2
      3. Figure 7.3
      4. Figure 7.4
      5. Figure 7.5
      6. Figure 7.6
      7. Figure 7.7
      8. Figure 7.8
      1. Listing 7.1
      2. Listing 7.2
      3. Listing 7.3
      4. Listing 7.4
  13. Chapter 8 Rotation in Three Dimensions
    1. 8.1 What Exactly is “Orientation”?
    2. 8.2 Matrix Form
      1. 8.2.1 Which Matrix?
      2. 8.2.2 Direction Cosines Matrix
      3. 8.2.3 Advantages of Matrix Form
      4. 8.2.4 Disadvantages of Matrix Form
      5. 8.2.5 Summary of Matrix Form
    3. 8.3 Euler Angles
      1. 8.3.1 What Are Euler Angles?
      2. 8.3.2 Other Euler Angle Conventions
      3. 8.3.3 Advantages of Euler Angles
      4. 8.3.4 Disadvantages of Euler Angles
      5. 8.3.5 Summary of Euler Angles
    4. 8.4 Axis-Angle and Exponential Map Representations
    5. 8.5 Quaternions
      1. 8.5.1 Quaternion Notation
      2. 8.5.2 What Do Those Four Numbers Mean?
      3. 8.5.3 Quaternion Negation
      4. 8.5.4 Identity Quaternion(s)
      5. 8.5.5 Quaternion Magnitude
      6. 8.5.6 Quaternion Conjugate and Inverse
      7. 8.5.7 Quaternion Multiplication
      8. 8.5.8 Quaternion “Difference”
      9. 8.5.9 Quaternion Dot Product
      10. 8.5.10 Quaternion log, exp, and Multiplication by a Scalar
      11. 8.5.11 Quaternion Exponentiation
      12. 8.5.12 Quaternion Interpolation, a.k.a. Slerp
      13. 8.5.13 Advantages and Disadvantages of Quaternions
      14. 8.5.14 Quaternions as Complex Numbers
      15. 8.5.15 Summary of Quaternions
    6. 8.6 Comparison of Methods
    7. 8.7 Converting between Representations
      1. 8.7.1 Converting Euler Angles to a Matrix
      2. 8.7.2 Converting a Matrix to Euler angles
      3. 8.7.3 Converting a Quaternion to a Matrix
      4. 8.7.4 Converting a Matrix to a Quaternion
      5. 8.7.5 Converting Euler Angles to a Quaternion
      6. 8.7.6 Converting a Quaternion to Euler Angles
    8. 8.8 Exercises
      1. Figure 8.1
      2. Figure 8.2
      3. Figure 8.3
      4. Figure 8.4
      5. Figure 8.5
      6. Figure 8.6
      7. Figure 8.7
      8. Figure 8.8
      9. Figure 8.9
      10. Figure 8.10
      11. Figure 8.11
      12. Figure 8.12
      13. Figure 8.13
      1. Table 8.1
      2. Table 8.2
      1. Listing 8.1
      2. Listing 8.2
      3. Listing 8.3
      4. Listing 8.4
      5. Listing 8.5
      6. Listing 8.6
      7. Listing 8.7
  14. Chapter 9 Geometric Primitives
    1. 9.1 Representation Techniques
    2. 9.2 Lines and Rays
      1. 9.2.1 Rays
      2. 9.2.2 Special 2D Representations of Lines
      3. 9.2.3 Converting between Representations
    3. 9.3 Spheres and Circles
    4. 9.4 Bounding Boxes
      1. 9.4.1 Representing AABBs
      2. 9.4.2 Computing AABBs
      3. 9.4.3 AABBs versus Bounding Spheres
      4. 9.4.4 Transforming AABBs
    5. 9.5 Planes
      1. 9.5.1 The Plane Equation: An Implicit Definition of a Plane
      2. 9.5.2 Defining a Plane by Using Three Points
      3. 9.5.3 “Best Fit” Plane for More than Three Points
      4. 9.5.4 Distance from Point to Plane
    6. 9.6 Triangles
      1. 9.6.1 Notation
      2. 9.6.2 Area of a Triangle
      3. 9.6.3 Barycentric Space
      4. 9.6.4 Calculating Barycentric Coordinates
      5. 9.6.5 Special Points
    7. 9.7 Polygons
      1. 9.7.1 Simple versus Complex Polygons
      2. 9.7.2 Convex versus Concave Polygons
      3. 9.7.3 Triangulation and Fanning
    8. 9.8 Exercises
      1. Figure 9.1
      2. Figure 9.2
      3. Figure 9.3
      4. Figure 9.4
      5. Figure 9.5
      6. Figure 9.6
      7. Figure 9.7
      8. Figure 9.8
      9. Figure 9.9
      10. Figure 9.10
      11. Figure 9.11
      12. Figure 9.12
      13. Figure 9.13
      14. Figure 9.14
      15. Figure 9.15
      16. Figure 9.16
      17. Figure 9.17
      18. Figure 9.18
      19. Figure 9.19
      20. Figure 9.20
      21. Figure 9.21
      22. Figure 9.22
      23. Figure 9.23
      24. Figure 9.24
      25. Figure 9.25
      26. Figure 9.26
      27. Figure 9.27
      28. Figure 9.28
      29. Figure 9.29
      30. Figure 9.30
      1. Listing 9.1
      2. Listing 9.2
      3. Listing 9.3
      4. Listing 9.4
      5. Listing 9.5
      6. Listing 9.6
      7. Listing 9.7
  15. Chapter 10 Mathematical Topics from 3D Graphics
    1. 10.1 How Graphics Works
      1. 10.1.1 The Two Major Approaches to Rendering
      2. 10.1.2 Describing Surface Properties: The BRDF
      3. 10.1.3 A Very Brief Introduction to Colorimetry and Radiometry
      4. 10.1.4 The Rendering Equation
    2. 10.2 Viewing in 3D
      1. 10.2.1 Specifying the Output Window
      2. 10.2.2 Pixel Aspect Ratio
      3. 10.2.3 The View Frustum
      4. 10.2.4 Field of View and Zoom
      5. 10.2.5 Orthographic Projection
    3. 10.3 Coordinate Spaces
      1. 10.3.1 Model, World, and Camera Space
      2. 10.3.2 Clip Space and the Clip Matrix
      3. 10.3.3 The Clip Matrix: Preparing for Projection
      4. 10.3.4 The Clip Matrix: Applying Zoom and Preparing for Clipping
      5. 10.3.5 Screen Space
      6. 10.3.6 Summary of Coordinate Spaces
    4. 10.4 Polygon Meshes
      1. 10.4.1 Indexed Triangle Mesh
      2. 10.4.2 Surface Normals
    5. 10.5 Texture Mapping
    6. 10.6 The Standard Local Lighting Model
      1. 10.6.1 The Standard Lighting Equation: Overview
      2. 10.6.2 The Specular Component
      3. 10.6.3 The Diffuse Component
      4. 10.6.4 The Ambient and Emmissive Components
      5. 10.6.5 The Lighting Equation: Putting It All Together
      6. 10.6.6 Limitations of the Standard Model
      7. 10.6.7 Flat and Gouraud Shading
    7. 10.7 Light Sources
      1. 10.7.1 Standard Abstract Light Types
      2. 10.7.2 Light Attenuation
      3. 10.7.3 Doom-style Volumetric Lights
      4. 10.7.4 Precalculated Lighting
    8. 10.8 Skeletal Animation
    9. 10.9 Bump Mapping
      1. 10.9.1 Tangent Space
      2. 10.9.2 Calculating Tangent Space Basis Vectors
    10. 10.10 The Real-Time Graphics Pipeline
      1. 10.10.1 Buffers
      2. 10.10.2 Delivering the Geometry
      3. 10.10.3 Vertex-Level Operations
      4. 10.10.4 Clipping
      5. 10.10.5 Backface Culling
      6. 10.10.6 Rasterization, Shading, and Output
    11. 10.11 Some HLSL Examples
      1. 10.11.1 Decal Shading and HLSL Basics
      2. 10.11.2 Basic Per-Pixel Blinn-Phong Lighting
      3. 10.11.3 Gouraud Shading
      4. 10.11.4 Bump Mapping
      5. 10.11.5 Skinned Mesh
    12. 10.12 Further Reading
    13. 10.13 Exercises
      1. Figure 10.1
      2. Figure 10.2
      3. Figure 10.3
      4. Figure 10.4
      5. Figure 10.5
      6. Figure 10.6
      7. Figure 10.7
      8. Figure 10.8
      9. Figure 10.9
      10. Figure 10.10
      11. Figure 10.11
      12. Figure 10.12
      13. Figure 10.13
      14. Figure 10.14
      15. Figure 10.15
      16. Figure 10.16
      17. Figure 10.17
      18. Figure 10.18
      19. Figure 10.19
      20. Figure 10.20
      21. Figure 10.21
      22. Figure 10.22
      23. Figure 10.23
      24. Figure 10.24
      25. Figure 10.25
      26. Figure 10.26
      27. Figure 10.27
      28. Figure 10.28
      29. Figure 10.29
      30. Figure 10.30
      31. Figure 10.31
      32. Figure 10.32
      33. Figure 10.33
      34. Figure 10.34
      35. Figure 10.35
      36. Figure 10.36
      37. Figure 10.37
      38. Figure 10.38
      39. Figure 10.39
      40. Figure 10.40
      41. Figure 10.41
      42. Figure 10.42
      43. Figure 10.43
      44. Figure 10.44
      1. Table 10.1
      2. Table 10.2
      3. Table 10.3
      4. Table 10.4
      5. Table 10.5
      6. Table 10.6
      1. Listing 10.1
      2. Listing 10.2
      3. Listing 10.3
      4. Listing 10.4
      5. Listing 10.5
      6. Listing 10.6
      7. Listing 10.7
      8. Listing 10.8
      9. Listing 10.9
      10. Listing 10.10
      11. Listing 10.11
      12. Listing 10.12
      13. Listing 10.13
      14. Listing 10.14
      15. Listing 10.15
      16. Listing 10.16
      17. Listing 10.17
      18. Listing 10.18
      19. Listing 10.19
      20. Listing 10.20
      21. Listing 10.21
      22. Listing 10.22
      23. Listing 10.23
      24. Listing 10.24
  16. Chapter 11 Mechanics 1: Linear Kinematics and Calculus
    1. 11.1 Overview and Other Expectation-Reducing Remarks
      1. 11.1.1 What is Left Out?
      2. 11.1.2 Some Helpful Lies about Our Universe
    2. 11.2 Basic Quantities and Units
    3. 11.3 Average Velocity
    4. 11.4 Instantaneous Velocity and the Derivative
      1. 11.4.1 Limit Arguments and the Definition of the Derivative
      2. 11.4.2 Examples of Derivatives
      3. 11.4.3 Calculating Derivatives from the Definition
      4. 11.4.4 Notations for the Derivative
      5. 11.4.5 A Few Differentiation Rules and Shortcuts
      6. 11.4.6 Derivatives of Some Special Functions with Taylor Series
      7. 11.4.7 The Chain Rule
    5. 11.5 Acceleration
    6. 11.6 Motion under Constant Acceleration
    7. 11.7 The Integral
      1. 11.7.1 Examples of Integrals
      2. 11.7.2 The Relationship between the Derivative and the Integral
      3. 11.7.3 Summary of Calculus
    8. 11.8 Uniform Circular Motion
      1. 11.8.1 Uniform Circular Motion in the Plane
      2. 11.8.2 Uniform Circular Motion in Three Dimensions
    9. 11.9 Exercises
      1. Figure 11.1
      2. Figure 11.2
      3. Figure 11.3
      4. Figure 11.4
      5. Figure 11.5
      6. Figure 11.6
      7. Figure 11.7
      8. Figure 11.8
      9. Figure 11.9
      10. Figure 11.10
      11. Figure 11.11
      12. Figure 11.12
      13. Figure 11.13
      14. Figure 11.14
      15. Figure 11.15
      16. Figure 11.16
      17. Figure 11.17
      1. Table 11.1
      2. Table 11.2
      3. Table 11.3
  17. Chapter 12 Mechanics 2: Linear and Rotational Dynamics
    1. 12.1 Newton’s Three Laws
      1. 12.1.1 Newton’s First Two Laws: Force and Mass
      2. 12.1.2 Inertial Reference Frames
      3. 12.1.3 Newton’s Third Law
    2. 12.2 Some Simple Force Laws
      1. 12.2.1 Gravitational Force
      2. 12.2.2 Frictional Forces
      3. 12.2.3 Spring Forces
    3. 12.3 Momentum
      1. 12.3.1 Conservation of Momentum
      2. 12.3.2 The Center of Mass
    4. 12.4 Impulsive Forces and Collisions
      1. 12.4.1 Perfectly Inelastic Collisions
      2. 12.4.2 General Collision Response
      3. 12.4.3 The Dirac Delta
    5. 12.5 Rotational Dynamics
      1. 12.5.1 Rotational Kinematics
      2. 12.5.2 2D Rotational Dynamics
      3. 12.5.3 3D Rotational Dynamics
      4. 12.5.4 Collision Response with Rotations
    6. 12.6 Real-Time Rigid Body Simulators
      1. 12.6.1 Physics Engine State Variables
      2. 12.6.2 HighLevel Overview
      3. 12.6.3 Euler Integration
      4. 12.6.4 Integration of Rotation
    7. 12.7 Suggested Reading
    8. 12.8 Exercises
      1. Figure 12.1
      2. Figure 12.2
      3. Figure 12.3
      4. Figure 12.4
      5. Figure 12.5
      6. Figure 12.6
      7. Figure 12.7
      8. Figure 12.8
      9. Figure 12.9
      10. Figure 12.10
      11. Figure 12.11
      12. Figure 12.12
      13. Figure 12.13
      14. Figure 12.14
      15. Figure 12.15
      16. Figure 12.16
      17. Figure 12.17
      18. Figure 12.18
      19. Figure 12.19
      20. Figure 12.20
      21. Figure 12.21
      22. Figure 12.22
      1. Table 12.1
      2. Table 12.2
      1. Listing 12.1
      2. Listing 12.2
      3. Listing 12.3
      4. Listing 12.4
      5. Listing 12.5
      6. Listing 12.6
      7. Listing 12.7
  18. Chapter 13 Curves in 3D
    1. 13.1 Parametric Polynomial Curves
      1. 13.1.1 Parametric Curves
      2. 13.1.2 Polynomial Curves
      3. 13.1.3 Matrix Notation
      4. 13.1.4 Two Trivial Types of Curves
      5. 13.1.5 Endpoints in Monomial Form
      6. 13.1.6 Velocities and Tangents
    2. 13.2 Polynomial Interpolation
      1. 13.2.1 Aitken’s Algorithm
      2. 13.2.2 Lagrange Basis Polynomials
      3. 13.2.3 Polynomial Interpolation Summary
    3. 13.3 Hermite Curves
    4. 13.4 Bézier Curves
      1. 13.4.1 The de Casteljau Algorithm
      2. 13.4.2 The Bernstein Basis
      3. 13.4.3 Bézier Derivatives and Their Relationship to the Hermite Form
    5. 13.5 Subdivision
      1. 13.5.1 Subdividing Curves in Monomial Form
      2. 13.5.2 Subdividing Curves in Bézier Form
    6. 13.6 Splines
      1. 13.6.1 Rules of the Game
      2. 13.6.2 Knots
    7. 13.7 Hermite and Bézier Splines
    8. 13.8 Continuity
      1. 13.8.1 Parametric Continuity
      2. 13.8.2 Geometric Continuity
      3. 13.8.3 How Smooth Can a Curve Be?
    9. 13.9 Automatic Tangent Control
      1. 13.9.1 Catmull-Rom Splines
      2. 13.9.2 TCB Splines
      3. 13.9.3 Endpoint Conditions
    10. 13.10 Exercises
      1. Figure 13.1
      2. Figure 13.2
      3. Figure 13.3
      4. Figure 13.4
      5. Figure 13.5
      6. Figure 13.6
      7. Figure 13.7
      8. Figure 13.8
      9. Figure 13.9
      10. Figure 13.10
      11. Figure 13.11
      12. Figure 13.12
      13. Figure 13.13
      14. Figure 13.14
      15. Figure 13.15
      16. Figure 13.16
      17. Figure 13.17
      18. Figure 13.18
      19. Figure 13.19
      20. Figure 13.20
      21. Figure 13.21
      22. Figure 13.22
      23. Figure 13.23
      24. Figure 13.24
      25. Figure 13.25
      26. Figure 13.26
      27. Figure 13.27
      1. Listing 13.1
  19. Chapter 14 Afterword
    1. 14.1 What Next?
    2. 14.2 Exercises
  20. Appendix A Geometric Tests
    1. A.1 Closest Point on 2D Implicit Line
    2. A.2 Closest Point on a Parametric Ray
    3. A.3 Closest Point on a Plane
    4. A.4 Closest Point on a Circle or Sphere
    5. A.5 Closest Point in an AABB
    6. A.6 Intersection Tests
    7. A.7 Intersection of Two Implicit Lines in 2D
    8. A.8 Intersection of Two Rays in 3D
    9. A.9 Intersection of a Ray and Plane
    10. A.10 Intersection of an AABB and Plane
    11. A.11 Intersection of Three Planes
    12. A.12 Intersection of Ray and a Circle or Sphere
    13. A.13 Intersection of Two Circles or Spheres
    14. A.14 Intersection of a Sphere and AABB
    15. A.15 Intersection of a Sphere and a Plane
    16. A.16 Intersection of a Ray and a Triangle
    17. A.17 Intersection of Two AABBs
    18. A.18 Intersection of a Ray and an AABB
      1. Figure A.1
      2. Figure A.2
      3. Figure A.3
      4. Figure A.4
      5. Figure A.5
      6. Figure A.6
      7. Figure A.7
      8. Figure A.8
      9. Figure A.9
      10. Figure A.10
      11. Figure A.11
      12. Figure A.12
      13. Figure A.13
      14. Figure A.14
      15. Figure A.15
      16. Figure A.16
      1. Listing A.1
      2. Listing A.2
      3. Listing A.3
      4. Listing A.4
      5. Listing A.5
      6. Listing A.6
  21. Appendix B Answers to the Exercises
    1. B.1 Chapter 1
    2. B.2 Chapter 2
    3. B.3 Chapter 3
    4. B.4 Chapter 4
    5. B.5 Chapter 5
    6. B.6 Chapter 6
    7. B.7 Chapter 7
    8. B.8 Chapter 8
    9. B.9 Chapter 9
    10. B.10 Chapter 10
    11. B.11 Chapter 11
    12. B.12 Chapter 12
    13. B.13 Chapter 13
    14. B.14 Chapter 14
  22. Bibliography