Fundamentals of Computer Graphics: Third Edition
Fundamentals of Computer Graphics: Third Edition
Third Edition
with
Michael Ashikhmin
Michael Gleicher
Naty Hoffman
Garrett Johnson
Tamara Munzner
Erik Reinhard
Kelvin Sung
William B. Thompson
Peter Willemsen
Brian Wyvill
A K Peters
Natick, Massachusetts
Contents
Preface xi
1 Introduction 1
1.1 Graphics Areas . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.2 Major Applications . . . . . . . . . . . . . . . . . . . . . . . . 3
1.3 Graphics APIs . . . . . . . . . . . . . . . . . . . . . . . . . . 4
1.4 Graphics Pipeline . . . . . . . . . . . . . . . . . . . . . . . . . 4
1.5 Numerical Issues . . . . . . . . . . . . . . . . . . . . . . . . . 5
1.6 Efficiency . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
1.7 Designing and Coding Graphics Programs . . . . . . . . . . . . 8
2 Miscellaneous Math 13
2.1 Sets and Mappings . . . . . . . . . . . . . . . . . . . . . . . . 13
2.2 Solving Quadratic Equations . . . . . . . . . . . . . . . . . . . 17
2.3 Trigonometry . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
2.4 Vectors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
2.5 Curves and Surfaces . . . . . . . . . . . . . . . . . . . . . . . 30
2.6 Linear Interpolation . . . . . . . . . . . . . . . . . . . . . . . 44
2.7 Triangles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
3 Raster Images 53
3.1 Raster Devices . . . . . . . . . . . . . . . . . . . . . . . . . . 54
3.2 Images, Pixels, and Geometry . . . . . . . . . . . . . . . . . . 59
v
vi Contents
4 Ray Tracing 69
4.1 The Basic Ray-Tracing Algorithm . . . . . . . . . . . . . . . . 70
4.2 Perspective . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
4.3 Computing Viewing Rays . . . . . . . . . . . . . . . . . . . . 73
4.4 Ray-Object Intersection . . . . . . . . . . . . . . . . . . . . . 76
4.5 Shading . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81
4.6 A Ray-Tracing Program . . . . . . . . . . . . . . . . . . . . . 84
4.7 Shadows . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86
4.8 Ideal Specular Reflection . . . . . . . . . . . . . . . . . . . . . 87
4.9 Historical Notes . . . . . . . . . . . . . . . . . . . . . . . . . 88
5 Linear Algebra 91
5.1 Determinants . . . . . . . . . . . . . . . . . . . . . . . . . . . 91
5.2 Matrices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93
5.3 Computing with Matrices and Determinants . . . . . . . . . . . 98
5.4 Eigenvalues and Matrix Diagonalization . . . . . . . . . . . . . 103
7 Viewing 141
7.1 Viewing Transformations . . . . . . . . . . . . . . . . . . . . . 142
7.2 Projective Transformations . . . . . . . . . . . . . . . . . . . . 148
7.3 Perspective Projection . . . . . . . . . . . . . . . . . . . . . . 151
7.4 Some Properties of the Perspective Transform . . . . . . . . . . 156
7.5 Field-of-View . . . . . . . . . . . . . . . . . . . . . . . . . . . 156
14 Sampling 317
14.1 Integration . . . . . . . . . . . . . . . . . . . . . . . . . . . . 317
14.2 Continuous Probability . . . . . . . . . . . . . . . . . . . . . . 322
14.3 Monte Carlo Integration . . . . . . . . . . . . . . . . . . . . . 326
14.4 Choosing Random Points . . . . . . . . . . . . . . . . . . . . . 329
viii Contents
15 Curves 339
15.1 Curves . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 339
15.2 Curve Properties . . . . . . . . . . . . . . . . . . . . . . . . . 345
15.3 Polynomial Pieces . . . . . . . . . . . . . . . . . . . . . . . . 348
15.4 Putting Pieces Together . . . . . . . . . . . . . . . . . . . . . . 356
15.5 Cubics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 359
15.6 Approximating Curves . . . . . . . . . . . . . . . . . . . . . . 365
15.7 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 382
20 Light 517
20.1 Radiometry . . . . . . . . . . . . . . . . . . . . . . . . . . . . 517
20.2 Transport Equation . . . . . . . . . . . . . . . . . . . . . . . . 526
20.3 Photometry . . . . . . . . . . . . . . . . . . . . . . . . . . . . 528
21 Color 531
21.1 Colorimetry . . . . . . . . . . . . . . . . . . . . . . . . . . . . 533
21.2 Color Spaces . . . . . . . . . . . . . . . . . . . . . . . . . . . 542
21.3 Chromatic Adaptation . . . . . . . . . . . . . . . . . . . . . . 548
21.4 Color Appearance . . . . . . . . . . . . . . . . . . . . . . . . 552
21.5 Notes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 552
27 Visualization 675
27.1 Background . . . . . . . . . . . . . . . . . . . . . . . . . . . . 677
27.2 Data Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . 678
27.3 Human-Centered Design Process . . . . . . . . . . . . . . . . 680
27.4 Visual Encoding Principles . . . . . . . . . . . . . . . . . . . . 682
27.5 Interaction Principles . . . . . . . . . . . . . . . . . . . . . . . 689
27.6 Composite and Adjacent Views . . . . . . . . . . . . . . . . . 690
27.7 Data Reduction . . . . . . . . . . . . . . . . . . . . . . . . . . 696
27.8 Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 701
References 721
Index 745