This introduction to 3D computer graphics emphasizes fundamentals and the mathematics underlying computer graphics, while also covering programming techniques using OpenGL, a platform-independent graphics programming environment. The minimal prerequisites make it suitable for self-study or for use as an advanced undergraduate or introductory graduate text as the author leads step-by-step from the basics of transformations to advanced topics such as animations and kinematics. Accompanying software, including source code for a ray tracing software package, is available freely from the book's web site. Half-title Title Copyright Dedication Contents Preface About This Book How to Use This Book Obtaining the Accompanying Software Getting Started with OpenGL Other Resources for Computer Graphics For the Instructor Acknowledgments I Introduction I.1 Display Models I.1.1 Rectangular Arrays of Pixels I.1.2 Vector Graphics I.1.3 Polygonal Modeling I.2 Coordinates, Points, Lines, and Polygons I.2.1 Coordinate Systems I.2.2 Geometric Shapes in OpenGL Drawing Points in OpenGL Drawing Lines in OpenGL Drawing Polygons in OpenGL Colors Hidden Surfaces Polygon Face Orientations Toggling Wireframe Mode I.3 Double Buffering for Animation II Transformations and Viewing II.1 Transformations in 2-Space II.1.1 Basic Definitions II.1.2 Matrix Representation of Linear Transformations II.1.3 Rigid Transformations and Rotations II.1.4 Homogeneous Coordinates II.1.5 Matrix Representation of Affine Transformations II.1.6 Two-Dimensional Transformations in OpenGL II.1.7 Another Outlook on Composing Transformations II.1.8 Two-Dimensional Projective Geometry II.2 Transformations in 3-Space II.2.1 Moving from 2-Space to 3-Space II.2.2 Transformation Matrices in OpenGL II.2.3 Derivation of the Rotation Matrix II.2.4 Euler’s Theorem II.2.5 Three-Dimensional Projective Geometry II.3 Viewing Transformations and Perspective II.3.1 Orthographic Viewing Transformations II.3.2 Perspective Transformations II.3.3 Mapping Lines to Lines II.3.4 Another Use for Projection: Shadows II.3.5 The OpenGL Perspective Transformations II.4 Mapping to Pixels II.4.1 Bresenham Algorithm II.4.2 The Perils of Floating Point Roundoff III Lighting, Illumination, and Shading III.1 The Phong Lighting Model III.1.1 Diffuse Reflection III.1.2 Specular Reflection III.1.3 Ambient Reflection and Emissivity III.1.4 Putting It Together: Multiple Lights and Colors III.1.5 Gouraud and Phong Shading III.1.6 Computing Surface Normals III.1.7 Affine Transformations and Normal Vectors III.1.8 Light and Material Properties in OpenGL III.2 The Cook–Torrance Lighting Model III.2.1 Bidirectional Reflectivity III.2.2 Overview of Cook–Torrance III.2.3 The Microfacet Distribution Term III.2.4 The Geometric Surface Occlusion Term IV Averaging and Interpolation IV.1 Linear Interpolation IV.1.1 Interpolation between Two Points IV.1.2 Weighted Averages and Affine Combinations IV.1.3 Interpolation on Three Points: Barycentric Coordinates Area Interpretation of Barycentric Coordinates Calculating Barycentric Coordinates IV.2 Bilinear and Trilinear Interpolation IV.2.1 Bilinear Interpolation IV.2.2 Inverting Bilinear Interpolation IV.2.3 Trilinear Interpolation IV.3 Convex Sets and Weighted Averages IV.4 Interpolation and Homogeneous Coordinates IV.5 Hyperbolic Interpolation IV.6 Spherical Linear Interpolation V Texture Mapping V.1 Texture Mapping an Image V.1.1 Interpolating a Texture to a Surface V.1.2 Assigning Texture Coordinates V.1.3 Mipmapping and Antialiasing V.1.4 Stochastic Supersampling V.2 Bump Mapping V.3 Environment Mapping V.4 Texture Mapping in OpenGL V.4.1 Loading a Texture Map V.4.2 Specifying Texture Coordinates V.4.3 Modulating Color V.4.4 Separate Specular Highlights V.4.5 Managing Multiple Texture Maps V.4.6 Environment Mapping in OpenGL VI Color VI.1 Color Perception VI.2 Representation of Color Values VI.2.1 Additive and Subtractive Colors VI.2.2 Representation of RGB Colors VI.2.3 Hue, Saturation, and Luminance VII Bézier Curves VII.1 Bézier Curves of Degree Three VII.2 De Casteljau’s Method VII.3 Recursive Subdivision Applications of Recursive Subdivision VII.4 Piecewise Bézier Curves VII.5 Hermite Polynomials VII.6 Bézier Curves of General Degree VII.7 De Casteljau’s Method Revisited VII.8 Recursive Subdivision Revisited VII.9 Degree Elevation VII.10 Bézier Surface Patches VII.10.1 Basic Properties of Bézier Patches VII.10.2 Joining Bézier Patches Subdividing Bézier Patches VII.11 Bézier Curves and Surfaces in OpenGL VII.11.1 Bézier Curves VII.11.2 Bézier Patches VII.12 Rational Bézier Curves VII.13 Conic Sections with Rational Bézier Curves VII.14 Surface of Revolution Example VII.15 Interpolating with Bézier Curves VII.15.1 Catmull–Rom Splines VII.15.2 Bessel–Overhauser Splines VII.15.3 Tension–Continuity–Bias Splines VII.16 Interpolating with Bézier Surfaces VIII B-Splines VIII.1 Uniform B-Splines of Degree Three VIII.2 Nonuniform B-Splines VIII.3 Examples of Nonuniform B-Splines VIII.4 Properties of Nonuniform B-Splines VIII.5 The de Boor Algorithm VIII.6 Blossoms VIII.7 Derivatives and Smoothness of B-Spline Curves VIII.8 Knot Insertion VIII.9 Bézier and B-Spline Curves From Bézier Curves to B-Spline Curves From B-Spline Curve to Piecewise Bézier Curve VIII.10 Degree Elevation VIII.11 Rational B-Splines and NURBS VIII.12 B-Splines and NURBS Surfaces in OpenGL VIII.13 Interpolating with B-Splines IX Ray Tracing IX.1 Basic Ray Tracing Shadow Feelers Reflection Rays Transmission Rays IX.1.1 Local Lighting and Reflection Rays IX.1.2 Transmission Rays IX.1.3 Putting It All Together IX.2 Advanced Ray Tracing Techniques IX.2.1 Distributed Ray Tracing Antialiasing with Multiple Eye-to-Pixel Rays Depth of Field with Jittered Eye Positions Motion Blur Soft Shadows with Extended Lights and Jittered Shadow Rays Using Multiple Techniques at Once Multiple Colors Path Tracing. Tracing Diffuse Reflection and Transmission IX.2.2 Backwards Ray Tracing Further Reading IX.3 Special Effects without Ray Tracing Antialiasing Lines with Blending Motion Blur and Depth of Field with the Accumulation Buffer Depth of Field with z-Buffer–Based Blurring Reflections with Environment Mapping Mirror Reflections with Clones Shadows Transparency, Blending, and Fog X Intersection Testing X.1 Fast Intersections with Rays X.1.1 Ray versus Sphere Intersections X.1.2 Ray versus Plane Intersections X.1.3 Ray versus Triangle Intersections X.1.4 Ray versus Convex Polytope Intersections X.1.5 Ray versus Cylinder Intersections X.1.6 Ray versus Quadric Intersections X.1.7 Ray versus Bézier Patch Intersections X.2 Pruning Intersection Tests XI Radiosity XI.1 The Radiosity Equations XI.1.1 Patches, Light Levels, and Form Factors XI.1.2 High-Level Description of the Radiosity Algorithm XI.2 Calculation of Form Factors XI.2.1 The Ray Tracing Method XI.2.2 The Hemicube Method XI.3 Solving the Radiosity Equations XI.3.1 Iterative Methods XI.3.2 Jacobi Iteration XI.3.3 Gauss–Seidel Iteration XI.3.4 The Shooting Method XII Animation and Kinematics XII.1 Overview XII.1.1 Techniques Evolved from Traditional Animation XII.1.2 Computerized Animation XII.2 Animation of Position XII.2.1 Ease In: Fixed Target XII.2.2 Ease In: Moving Target XII.3 Representations of Orientations XII.3.1 Rotation Matrices XII.3.2 Yaw, Pitch, and Roll XII.3.3 Quaternions XII.3.4 Theoretical Development of Quaternions XII.3.5 Representing Rotations with Quaternions XII.3.6 Quaternion and Rotation Matrix Conversions XII.3.7 Interpolation of Quaternions XII.4 Kinematics XII.4.1 Rigid Links and Joints XII.4.2 Forward Kinematics XII.4.3 Inverse Kinematics, Setting It Up XII.4.4 Inverse Kinematics, Finding a Local Solution APPENDIX A Mathematics Background A.1 Preliminaries A.2 Vectors and Vector Products A.2.1 Vectors in R2 Dot Products in R2 Cross Products in R2 A.2.2 Vectors in R3 Dot Products in R3 Cross Products in R3 A.3 Matrices A.3.1 Matrices and Vector Products in R3 A.3.2 Determinants, Inverses, and Adjoints A.3.3 Linear Subspaces A.4 Multivariable Calculus A.4.1 Multivariable Functions A.4.2 Vector-Valued Functions A.4.3 Multivariable Vector-Valued Functions APPENDIX B RayTrace Software Package B.1 Introduction to the Ray Tracing Package B.2 The High-Level Ray Tracing Routines B.3 The RayTrace API B.3.1 Specifying Lights B.3.2 Defining the Viewport and Camera Positions B.3.3 Working with the Pixel Array B.3.4 Defining Materials B.3.5 Defining Viewable Objects B.3.6 Viewable Spheres B.3.7 Viewable Triangles and Parallelograms B.3.8 Viewable Ellipsoids B.3.9 Viewable Cylinders B.3.10 Viewable Cones B.3.11 Viewable Parallelepipeds B.3.12 Viewable Tori B.3.13 Viewable Bézier Patches B.3.14 Texture Maps Bibliography Index This textbook, first published in 2003, emphasises the fundamentals and the mathematics underlying computer graphics. The minimal prerequisites, a basic knowledge of calculus and vectors plus some programming experience in C or C++, make the book suitable for self study or for use as an advanced undergraduate or introductory graduate text. The author gives a thorough treatment of transformations and viewing, lighting and shading models, interpolation and averaging, Bézier curves and B-splines, ray tracing and radiosity, and intersection testing with rays. Additional topics, covered in less depth, include texture mapping and colour theory. The book covers some aspects of animation, including quaternions, orientation, and inverse kinematics, and includes source code for a Ray Tracing software package. The book is intended for use along with any OpenGL programming book, but the crucial features of OpenGL are briefly covered to help readers get up to speed. Accompanying software is available freely from the book's web site. "This book is aimed at the advanced undergraduate level or introductory graduate level and can also be used for self-study. Prerequisites include basic knowledge of calculus and vectors. The OpenGL programming portions require knowledge of programming in C or C++. The more important features of OpenGL are covered in the book, but it is intended to be used in conjunction with another OpenGL programming book."--BOOK JACKET