For introductory courses in Computer Graphics. The importance of computer graphics is spreading beyond the computer science discipline and graphics experts. This new introduction to computer graphics is perfect for any school that does not focus strictly on developing graduate students in the field. Unlike "algorithms and techniques" texts, it offers a good introduction to graphics for any program with interdisciplinary links to the sciences or for any computational science program -- focusing on science as a unifying concept that students can use to express the graphics they are learning. With the use of an excellent graphics API such as OpenGL, students can bypass many of the details of the algorithms and create effective images early in the course.
Table of Contents
Preface / What is Computer Graphics? / What is a Graphics API? / Why do Computer Graphics? / Overview of the Book Getting Started / Visual Communication and Computer Graphics / General Issues in Visual Communication - Use appropriate representation for your information - Keep your images focused - Use appropriate presentation levels for your information - Use appropriate forms for your information - Be very careful to be accurate with your display - Understand and respect the cultural context of your audience - Make your interactions reflect familiar and comfortable relationships between action and effect / 3D Geometry and the Geometry Pipeline - The scene and the view - 3D model coordinate systems - 3D world coordinate system - 3D eye coordinate system - Projections - Clipping - Choosing perspective or orthogonal projections - 2D eye coordinates - 2D screen coordinates / Appearance - Color - Texture mapping - Depth buffering / The Viewing Process - Different implementation, same result / Graphics cards / A Basic OpenGL Program - The structure of the main() function in OpenGL - Model space - Modeling transformation - 3D world space - Viewing transformation - 3D eye space - Projections - 2D eye space - 2D screen space - The science in the program - Appearance - Another way to see the program / OpenGL Extensions / Summary / OpenGL glossary for the chapter / Questions / Exercises / Experiments Chapter 1: Viewing and Projection / Introduction / Fundamental Model of Viewing / Definitions - Setting up the viewing environment - Defining the projection - View volumes - The orthogonal projection - The perspective projection - Calculating the perspective transformation - Clipping on the view volume - Defining the window and viewport / Some Aspects of Managing the View - Hidden surfaces - Double buffering / Stereo Viewing / Viewing and Visual Communication / Implementation of Viewing and Projection in OpenGL - Defining a window and viewport - Reshaping the window - Defining a viewing environment - Defining a perspective projection - Defining an orthogonal projection - Managing hidden surface viewing - Setting double buffering / Implementing a Stereo View / Summary / OpenGL glossary for this chapter / Questions / Exercises / Experiments Chapter 2: Principles of Modeling Simple Geometric Modeling / Introduction / Definitions / Some examples - Point and points - Line segments - Sequence of line segments - Triangle - Sequence of triangles - Quadrilateral - Sequence of quads - General polygon - Polyhedron - Aliasing and antialiasing - Normals - Clipping - Data structures to hold objects - Modeling surfaces - Additional sources of graphic objects - Modeling behavior - A word to the wise Transformations and modeling / Introduction / Definitions - Transformations - Composite transformations - Using transformation stacks - Compiling geometry / An Example / A Word to the Wise Modeling for Visual Communication / Recognizing the Meaning of Shapes / Dimensions / Higher Dimensions / Legends and Labels / Accuracy Scene graphs and modeling graphs / Introduction / A Brief Summary of Scene Graphs - Clipping in the scene graph - An example of modeling with a scene graph / The Viewing Transformation / The Scene Graph and Depth Testing / Using the Modeling Graph for Coding - Two examples of coding from scene graphs - Using standard objects to create more complex scenes / Summary / Questions / Exercises / Experiments / Projects Chapter 3: Implementing Modeling in OpenGL / The OpenGL Model for Specifying Geometry - Point and points mode - Line segments - Line strips - Line loops - Triangle - Sequence of triangles - Quads - Quad strips - General polygon - Vertex arrays - Antialiasing - The cube we will use in many examples - Defining clipping planes / Additional Objects with the OpenGL Toolkits - GLU quadric objects - GLU cylinder - GLU disk - GLU sphere - The GLUT objects - An example / A word to the wise / Transformations in OpenGL / Legends and Labels / Code examples for transformations - Simple transformations - Transformation stacks - Inverting the eyepoint transformation - Creating display lists / Summary / OpenGL glossary for this chapter / Questions / Exercises / Experiments / Projects Chapter 4: Mathematics for Modeling / Coordinate systems / Quadrants and octants / Points, lines, and line segments / Line segments, rays, and parametric curves and surfaces / Distance from a point to a line / Vectors / Dot and cross products of vectors / Reflection vectors / Transformations / Planes and half-spaces / Distance from a point to a plane / Polygons and convexity / Polyhedra / Polar, cylindrical, and spherical coordinates / Collision detection / Higher dimensions? / Summary / Questions / Exercises / Experiments Chapter 5: Color and Blending / Introduction / Principles - Specifying colors for geometry - The RGB cube - Luminance and color deficiency - Other color models - Color depth - Color gamut - Color blending with the alpha channel - Modeling transparency with blending - Indexed color / Color and visual communication - Emphasis colors - Background colors - Naturalistic color - Pseudocolor and color ramps - Building color ramps - Using color ramps - Comparing shape and color codings - Cultural context of the audience / Some examples - An object with partially transparent faces / Color in OpenGL - Specifying colors - Enabling blending / A word to the wise / Code examples - A model with parts having a full spectrum of colors - The HSV cone - The HLS double cone - An object with partially transparent faces - Indexed color - Color ramps in OpenGL / Summary / OpenGL glossary for this chapter / Questions / Exercises / Experiments / Projects Chapter 6: Lighting and Shading Lighting / Definitions - Ambient, diffuse, and specular light - Surface normals Materials Light properties / Light color / Positional lights / Spotlights / Attenuation / Directional lights / Positional and moving lights / Using lights for effect / Lights in scene graphs Shading / Shading considerations for visual communication / Definitions / Examples of flat and smooth shading / Calculating per-vertex normals - Averaging polygon normals - Analytic computations / Other shading models / Anisotropic shading - Vertex and pixel shaders Global Illumination / Radiosity / Photon mapping Local Illumination and OpenGL / Lights and materials in OpenGL - Specifying and defining lights - Selectively choosing lights - Defining materials - Using GLU quadric objects - An example: lights of all three primary colors applied to a white surface - Code for the example - Shading example / A word to the wise / Summary / OpenGL glossary for this chapter / Questions / Exercises / Experiments / Projects Chapter 7: Event Handling / Definitions / Some Examples of Events - keypress events - mouse events - menu events - window events - system events - software events / The Vocabulary of Interaction / Object Selection / Interaction and Visual Communication / Events and the Scene Graph / A Word to the Wise / Events in OpenGL / Callback Registering / Some Details - Creating and manipulating menus / Code Examples - Idle event callback - Timer callback - Keyboard callback - Menu callback - Mouse callback for mouse motion - Mouse callback for object picking / Details on Picking - Definitions - Making picking work - The pick matrix - Using the back buffer to do picking - A selection example - A summary of picking The MUI (Micro User Interface) Facility / Introduction / Using the MUI Functionality / The MUI Interface Objects - Menu bars - Buttons - Radio buttons - Text boxes - Horizontal sliders - Vertical sliders - Text labels / An example / Installing MUI for Windows Systems / A word to the wise / Summary / OpenGL glossary for this chapter / Questions / Exercises / Experiments / Projects Chapter 8: Texture Mapping / Introduction / Definitions - 1D texture maps - 2D texture maps - 3D texture maps - Associating a vertex with a texture point - The relation between the color of the object and the color of the texture map - Other meanings for texture maps - Texture mapping in the scene graph / Creating a Texture Map - Creating a texture map from an image - Generating a synthetic texture map - Noise functions as texture maps / Texture Mapping and Billboards / Including multiple textures in one texture map / Interpolation for Texture Maps / Antialiasing in Texturing / MIP Mapping / Multitexturing / Texture Mapping in OpenGL - Associating vertices and texture points - Capturing a texture from the screen - Texture environment - Texture parameters - Getting and defining a texture map - Texture coordinate control - Texture interpolation - Texture mapping and GLU quadrics - Multitextures / Some Examples - The Chromadeptha process - Using 2D texture maps to add interest to a surface - Environment maps / A Word to the Wise / Code Examples - A 1D color ramp - An environment map - Using multitextures / Summary / OpenGL glossary for this chapter / Questions / Exercises / Experiments / Projects Chapter 9: Graphical Problem Solving in Science / Introduction / Examples / Diffusion - Temperatures in a bar - Spread of disease / Function Graphing and Applications / Parametric Curves and Surfaces / Graphical Objects that are the Results of Limit Processes / Scalar Fields / Simulation of Objects and Behaviors - Gas laws and diffusion principles - Molecular display - A scientific instrument - Monte Carlo modeling process / 4D Graphing - Volume data - Vector fields / Graphing in Higher Dimensions / Data-Driven Graphics / Code Examples - Diffusion - Function graphing - Parametric curves and surfaces - Limit processes - Scalar fields - Representation of objects and behaviors - Molecular display - Monte Carlo modeling - 4D graphing - Higher dimensional graphing - Data-driven graphics / Summary / Credits / OpenGL glossary for this chapter / Questions / Exercises / Experiments / Projects Chapter 10: Rendering and the Rendering Pipeline / Introduction / The Pipeline / The Rendering Pipeline for OpenGL - Texture mapping in the rendering pipeline - Per-fragment operations - Some extensions to OpenGL - An implementation of the rendering pipeline in a graphics card / The Rasterization Process / Some 3D Viewing Operations with Graphics Cards / Summary / Questions / Exercises / Experiments Chapter 11: Dynamics and Animation / An Example / Types of Animations - Procedural animation - Interpolation animation - Frame-based animation - An interpolation example / Some Issues in Animation - Frame rates - Temporal aliasing - Building an animation / Animation and Visual Communication / Showing Motion in Still Frames - Motion traces - Motion blurring / Interesting Animation Viewing Devices / A Word to the Wise / Animation Examples in OpenGL - Moving objects in your model - Controlling time for your animation - Moving parts of objects in your model - Moving the eye point or the view frame in your model - Interpolating textures in your scene - Changing features of your models - Creating traces - Using the accumulation buffer - Creating a digital video / Some Points to Consider When Doing Animations with OpenGL / A Word to the Wise / OpenGL glossary for this chapter / Questions / Exercises / Experiments / Projects Chapter 12: High-Performance Graphics Techniques / Definitions / Techniques - Hardware avoidance - Hardware use - Designing out visible polygons - Culling polygons - Avoiding depth comparisons - Front-to-back drawing - Binary space partitioning - Clever use of textures - System speedups - Level of detail - Reducing lighting computation - Fog - Collision detection / Summary / OpenGL glossary for this chapter / Questions / Exercises / Experiments / Projects Chapter 13: Interpolation and Spline Modeling / Introduction - Interpolations - Extending interpolations to more control points - Generating normals for a patch - Generating texture coordinates for a patch / Interpolations in OpenGL - Automatic normal and texture generation with evaluators - Additional techniques / Definitions / Some Examples - Spline curves - Spline surfaces / A Word to the Wise / Summary / OpenGL glossary for this chapter / Questions / Exercises / Experiments / Projects Chapter 14: Per-Pixel Operations / Introduction / Definitions / Ray Casting / Ray Tracing / Volume Rendering / Mandelbrot and Julia Sets / Fractal Forgery Landscapes / Iterated Function Systems - Contraction mappings - Generating functions / Per-pixel Operations Supported by OpenGL / Summary / OpenGL glossary for this chapter / Questions / Exercises / Experiments / Projects Chapter 15: Hardcopy / Introduction / Definitions / Choosing an Output Medium - Digital images - Print - Film - 3D image formats - Video - Digital video - 3D object prototyping - The STL file - Creating anaglyphs in OpenGL / Summary / OpenGL glossary for this chapter / Questions / Exercises / Experiments References and Resources Appendices / Appendix I: PDB file format / Appendix II: CTL file format / Appendix III: STL file format Index The initial development of this project was supported by National Science Foundation grant DUE-9950121. All opinions, findings, conclusions, and recommendations in this work are those of the author and do not necessarily reflect the views of the National Science Foundation.
Steve Cunningham- holds a Ph.D from the University of Oregon. He has served as Noyce Visiting Professor at Grinnell College and also holds the position of Gemperle Distinguished Professor of Computer Science emeritus at California State University, Stanislaus. He is a former President of ACM SIGGRAPH and received the SIGGRAPH Outstanding Volunteer Award in 2004. He is also a Eurographics Fellow. He has long been active in computer graphics education work and was a founder of both SIGGRAPH's Education Committee and Eurographics' Education Board.