птта,.л^яшнря i #*% I C!# % л«*у1 W\ I I "в С^ Ш* I jy* #*% **% ^^ I g"% C"" Prentice Hall Upper Saddle River, NJ PEARSON

Similar documents
SRM INSTITUTE OF SCIENCE AND TECHNOLOGY

CHAPTER 1 Graphics Systems and Models 3

CS2401 COMPUTER GRAPHICS ANNA UNIV QUESTION BANK

COURSE DELIVERY PLAN - THEORY Page 1 of 6

Interactive Computer Graphics A TOP-DOWN APPROACH WITH SHADER-BASED OPENGL

Introduction to Computer Graphics

OXFORD ENGINEERING COLLEGE (NAAC Accredited with B Grade) DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING LIST OF QUESTIONS

Contents. 1 A Survey of Computer. 2 Overview of Graphics. Graphics 2. Systems 34. vii

Course Title: Computer Graphics Course no: CSC209

SAZ4C COMPUTER GRAPHICS. Unit : 1-5. SAZ4C Computer Graphics


GLOBAL EDITION. Interactive Computer Graphics. A Top-Down Approach with WebGL SEVENTH EDITION. Edward Angel Dave Shreiner

COMPUTER GRAPHICS, MULTIMEDIA AND ANIMATION, Second Edition (with CD-ROM) Malay K. Pakhira

CHETTINAD COLLEGE OF ENGINEERING & TECHNOLOGY CS2401 COMPUTER GRAPHICS QUESTION BANK

SRM ARTS AND SCIENCE COLLEGE SRM NAGAR, KATTANKULATHUR

CS1354 GRAPHICS AND MULTIMEDIA DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING QUESTION BANK SUB CODE / SUBJECT: CS1354 GRAPHICS AND MULTIMEDIA.

QUESTION BANK 10CS65 : COMPUTER GRAPHICS AND VISUALIZATION

Mathematical Tools in Computer Graphics with C# Implementations Table of Contents

End-Term Examination

Computer Graphics. Instructor: Oren Kapah. Office Hours: T.B.A.

(a) rotating 45 0 about the origin and then translating in the direction of vector I by 4 units and (b) translating and then rotation.

Computer Graphics I Lecture 11

Lahore University of Management Sciences. CS 452 Computer Graphics

Computer Graphics: Programming, Problem Solving, and Visual Communication

KINGS GRAPHICS AND MULTIMEDIA DEPARTMENT OF COMPUTER SCIENCE AND ENGG. OUTPUT PRIMITIVES Part-A (2-MARKS)

CS 130 Final. Fall 2015

SRI VENKATESWARA COLLEGE OF ENGINEERING. COURSE DELIVERY PLAN - THEORY Page 1 of 6

Points and lines, Line drawing algorithms. Circle generating algorithms, Midpoint circle Parallel version of these algorithms

Computer Graphics. Apurva A. Desai

KRISTU JYOTI COLLEGE OF MANAGEMENT & TECHNOLOGY QUESTION BANK BCA SEMESTER III Computer graphics Part A (2 marks questions)

ME COMPUTER AIDED DESIGN COMPUTER AIDED DESIGN 2 MARKS Q&A

Graphics and Interaction Rendering pipeline & object modelling

Topics and things to know about them:

GEOMETRIC TOOLS FOR COMPUTER GRAPHICS

Aptitude Test Question

Lahore University of Management Sciences. CS 452 Computer Graphics

Graphics Hardware and Display Devices

Animation & Rendering

CS 464 Review. Review of Computer Graphics for Final Exam

COURSE DELIVERY PLAN - THEORY Page 1 of 6

BHARATHIDASAN ENGINEERING COLLEGE,NATTRAMPALLI

Computer Graphics Solved MCQs -Part 2 MCQs Questions

Institutionen för systemteknik

COURSE DELIVERY PLAN - THEORY Page 1 of 6

MODELING AND HIERARCHY

Deceleration 141 Deep Sensation 218 Design Considerations 191 Device Coordinate System 12 Diffuse Reflection 119 Digital to Analog Converter 12

For each question, indicate whether the statement is true or false by circling T or F, respectively.

03 Vector Graphics. Multimedia Systems. 2D and 3D Graphics, Transformations

The Viewing Pipeline Coordinate Systems

Chapter 5. Projections and Rendering

COMP30019 Graphics and Interaction Rendering pipeline & object modelling

Lecture outline. COMP30019 Graphics and Interaction Rendering pipeline & object modelling. Introduction to modelling

CS GAME PROGRAMMING Question bank

CPSC GLOBAL ILLUMINATION

About the Tutorial. Audience. Prerequisites. Copyright & Disclaimer. Computer Graphics

VALLIAMMAI ENGINEERING COLLEGE

MCA IV SEMESTER SYLLABUS

Topic 12: Texture Mapping. Motivation Sources of texture Texture coordinates Bump mapping, mip-mapping & env mapping

Review. Stephen J. Guy

Computer Graphics Lecture 2

Computer Graphics! LECTURE 4 HIERARCHICAL MODELING INTRODUCTION TO 3D CONCEPTS. Doç. Dr. Mehmet Gokturk Gebze Institute of Technology!

HE COMPLETE OPENGL PROGI FOR WINDOW WIND

Topic 11: Texture Mapping 11/13/2017. Texture sources: Solid textures. Texture sources: Synthesized

Pipeline Operations. CS 4620 Lecture Steve Marschner. Cornell CS4620 Spring 2018 Lecture 11

Computer Graphics & Image Processing: Exercises

CS451Real-time Rendering Pipeline

Development of Computer Graphics

CS230 : Computer Graphics Lecture 4. Tamar Shinar Computer Science & Engineering UC Riverside

9. Three Dimensional Object Representations

Foundations of 3D Graphics Programming

Topic 11: Texture Mapping 10/21/2015. Photographs. Solid textures. Procedural

L1 - Introduction. Contents. Introduction of CAD/CAM system Components of CAD/CAM systems Basic concepts of graphics programming

Pipeline Operations. CS 4620 Lecture 14

Illumination and Shading

Chapter 2 A top-down approach - How to make shaded images?

Introduction to Computer Graphics 7. Shading

Module Contact: Dr Stephen Laycock, CMP Copyright of the University of East Anglia Version 1

Computer graphics (cs602) Final term mcqs fall 2013 Libriansmine

The Traditional Graphics Pipeline

Roll No. :... Invigilator's Signature : GRAPHICS AND MULTIMEDIA. Time Allotted : 3 Hours Full Marks : 70

The Traditional Graphics Pipeline

Graphics Systems and Models

Lesson Plan. Name of Faculty: Sana Bharti. Discipline: MCA. Semester: 4 th. Subject: Data Mining and Warehousing (MCA-16-43)

Graphics for VEs. Ruth Aylett

Computer Graphics & Image Processing: Exercises

Computer Graphics 1 Instructor Information. Books. Graphics? Course Goals and Outcomes. Where are computer graphics? Where are computer graphics?

Punjab Technical University Bachelor in Mobile Computing & Internet Batch 2014 onwards THIRD SEMESTER

Lecture 1. Computer Graphics and Systems. Tuesday, January 15, 13

Final Exam CS 184: Foundations of Computer Graphics! page 1 of 12!

CEng 477 Introduction to Computer Graphics Fall 2007

Computer Graphics. - Texturing Methods -

- Location: Annenberg Text: Mostly Self-Contained on course Web pages. - Al Barr

Computer Graphics Fundamentals. Jon Macey

Computer Graphics. Bing-Yu Chen National Taiwan University

Chapter 4. Chapter 4. Computer Graphics 2006/2007 Chapter 4. Introduction to 3D 1

CSE528 Computer Graphics: Theory, Algorithms, and Applications

The exam begins at 2:40pm and ends at 4:00pm. You must turn your exam in when time is announced or risk not having it accepted.

Graphics Pipeline 2D Geometric Transformations

Syllabus CS476 COMPUTER GRAPHICS Fall 2009

Introduction to Visualization and Computer Graphics

Transcription:

птта,.л^яшнря THIRD EDITION C!#% л«*у1 W\ I I "в С^ Ш* I jy* #*% **% ^^ I g"% C"" i #*% I %ьж I I I W*J Werl W ^»* I ^tmnp I ЧыЛ P^r I I I ^^» ta^ with OpenGL Donald Hearn M. Pauline Baker Computer Science Department and Pervasive Technology Lab for Visualization and Interactive Spaces Indiana University Purdue University PEARSON Prentice Hall Upper Saddle River, NJ 07458

1-1 1-2 1-3 1-4 1-5 1-6 1-7 1-8 1-9 1-10 2-1 Preface A Survey of Computer Graphics Graphs and Charts Computer-Aided Design Virtual-Reality Environments Data Visualizations Education and Training Computer Art Entertainment Image Processing Graphical User Interfaces Overview of Graphics Systems Video Display Devices Refresh Cathode-Ray Tubes Raster-Scan Displays Random-Scan Displays Color CRT Monitors Flat-Panel Displays Three-Dimensional Viewing Devices Stereoscopic and Virtual-Reality Systems xix 2 3 5 10 12 19 23 28 31 32 33 33 34 35 36 39 41 42 44 47 48 2-2 2-3 2-4 2-5 2-6 2-7 2-8 2-9 Raster-Scan Systems < Video Controller Raster-Scan Display Processor Graphics Workstations and Viewing Systems Input Devices Keyboards, Button Boxes, and Dials ' Mouse Devices Trackballs and Spaceballs Joysticks Data Gloves Digitizers Image Scanners Touch Panels ' Light Pens Voice Systems Hard-Copy Devices Graphics Networks Graphics on the Internet Graphics Software i Coordinate Representations l Graphics Software Standards t Other Graphics Packages Introduction to OpenGL ' Basic OpenGL Syntax 1 Related Libraries Header Files i Display-Window Management Using GLUT A Complete OpenGL Program 50 50 52 54 57 57 57 59 59 60 60 62 64 65 65 66 68 68 69 69 71 72 73 73 74 74 75 76 77

Vi: Contents 2-10 3-1 3-2 3-3 3-4 3-5 3-6 3-7 3-8 3-9 3-10 3-11 3-12 3-13 3-14 3-15 Graphics Output Primitives Coordinate Reference Frames Screen Coordinates Absolute and Relative Coordinate Specifications Specifying a Two-Dimensional World-Coordinate Reference Frame in OpenGL OpenGL Point OpenGL Line Line-Drawing Algorithms Line Equations DDA Algorithm Bresenham's Line Algorithm Displaying Polylines Parallel Line Algorithms Setting Frame-Buffer Values OpenGL Curve Circle-Generating Algorithms Properties of Circles Midpoint Circle Algorithm Ellipse-Generating Algorithms Properties of Ellipses Midpoint Ellipse Algorithm Other Curves Conic Sections Polynomials and Spline Curves Parallel Curve Algorithms Pixel Addressing and Object Geometry Screen Grid Coordinates Maintaining Geometric Properties of Displayed Objects Fill-Area Primitives Polygon Fill Areas Polygon Classifications Identifying Concave Polygons Splitting Concave Polygons 81 82 82 84 86 86 87 87 88 91 92 93 94 95 99 99 101 102 103 103 105 109 109 110 117 117 119 119 120 120 121 123 124 124 125 125 3-16 3-17 3-18 3-19 3-20 3-21 3-22 3-23 3-24 3-25... _ Ш mm 4-1 4-2 4-3 Splitting a Convex Polygon into a Set of Triangles 127 Inside-Outside Tests 127 Polygon Tables 129 Plane Equations 131 Front and Back Polygon Faces 132 OpenGL Polygon Fill-Area 134 OpenGL Vertex Arrays 139 Pixel-Array Primitives 142 OpenGL Pixel-Array 143 OpenGL Bitmap Function 143 OpenGL Pixmap Function 145 OpenGL Raster Operations 146 Character Primitives 147 OpenGL Character 149 Picture Partitioning 151 OpenGL Display Lists 151 Creating and Naming an OpenGL Display List 151 Executing OpenGL Display Lists 152 Deleting OpenGL Display Lists 153 OpenGL Display-Window Reshape Function 154 157 Example Programs 160 168 168 Attributes of Graphics Primitives OpenGL State Variables Color and Gray Scale RGB Color Components Color Tables Gray Scale Other Color Parameters OpenGL Color The OpenGL RGB and RGBA Color Modes OpenGL Color-Index Mode 172

С Contents ix OpenGL Color Blending 179 OpenGL Color Arrays 180 Other OpenGL Color 182 4-4 Point Attributes 183 4-5 Line Attributes 183 Line Width 183 Line Style 185 Pen and Brush Options 186 4-6 Curve Attributes 187 4-7 OpenGL Point-Attribute 189 4-8 OpenGL Line-Attribute 190 OpenGL Line-Width Function 190 OpenGL Line-Style Function 190 Other OpenGL Line Effects 192 4-9 Fill-Area Attributes 193 Fill Styles 193 Color-Blended Fill Regions 194 4-10 General Scan-Line Polygon-Fill Algorithm 196 4-11 Scan-Line Fill of Convex Polygons 200 4-12 Scan-Line Fill for Regions with Curved Boundaries 201 4-13 Fill Methods for Areas with Irregular Boundaries Boundary-Fill Algorithm Flood-Fill Algorithm 201 201 205 4-14 OpenGL Fill-Area Attribute OpenGL Fill-Pattern Function OpenGL Texture and Interpolation Patterns OpenGL Wire-Frame Methods OpenGL Front-Face Function 205 206 207 207 210 4-15 Character Attributes 211 4-16 OpenGL Character-Attribute 213 4-17 Antialiasing Supersampling Straight-Line Segments Subpixel Weighting Masks Area Sampling Straight Line Segments Filtering Techniques Pixel Phasing Compensating for Line-Intensity Differences 214 215 217 217 217 218 218 Antialiasing Area Boundaries 4-18 OpenGL Antialiasing 4-19 OpenGL Query 4-20 OpenGL Attribute Groups 4-21 5-1 5-2 5-3 5-4 Geometric Basic Two-Dimensional Geometric Two-Dimensional Translation Two-Dimensional Rotation Two-Dimensional Scaling Matrix Representations and Homogeneous Coordinates Homogeneous Coordinates Two-Dimensional Translation Matrix Two-Dimensional Rotation Matrix Two-Dimensional Scaling Matrix Inverse Two-Dimensional Composite Composite Two-Dimensional Translations Composite Two-Dimensional Rotations Composite Two-Dimensional Scalings General Two-Dimensional Pivot-Point Rotation General Two-Dimensional Fixed-Point Scaling General Two-Dimensional Scaling Directions Matrix Concatenation Properties General Two-Dimensional Composite and Computational Efficiency 219 221 222 223 224 226 227 230 232 232 234 236 237 238 239 239 239 240 241 241 241 242 242 243 244 244 245

Contents 5-5 5-6 5-7 5-8 5-9 5-10 5-11 5-12 5-13 5-14 5-15 5-16 5-17 5-18 Two-Dimensional Rigid-Body Transformation Constructing Two-Dimensional Rotation Matrices Two-Dimensional Composite-Matrix Programming Example Other Two-Dimensional Reflection Shear Raster Methods for Geometrie OpenGL Raster Between Two-Dimensional Coordinate Systems Geometrie in Three-Dimensional Space Three-Dimensional Translation Three-Dimensional Rotation Three-Dimensional Coordinate-Axis Rotations General Three-Dimensional Rotations Quaternion Methods for Three-Dimensional Rotations Three-Dimensional Scaling Composite Three-Dimensional Other Three-Dimensional Three-Dimensional Reflections Three-Dimensional Shears Between Three-Dimensional Coordinate Systems Affine OpenGL Geometrie-Transformation Basic OpenGL Geometrie OpenGL Matrix Operations OpenGL Matrix Stacks OpenGL Geometrie-Transformation Programming Examples 247 248 248 "* ^ 253 253 255 257 258 259 261 262 263 264 266 272 275 278 281 281 281 282 283 283 284 285 287 288 291 6_1 6-2 6-3 6-4 Two-Dimensional Viewing The Two-Dimensional Viewing Pipeline The Clipping Window Viewing-Coordinate Clipping Window World-Coordinate Clipping Window Normalization and Viewport Mapping the Clipping Window into a Normalized Viewport Mapping the Clipping Window into a Normalized Square Display of Character Strings i Split-Screen Effects and Multiple Output Devices OpenGL Two-Dimensional Viewing OpenGL Projection Mode GLU Clipping-Window Function OpenGL Viewport Function Creating a GLUT Display Window - Setting the GLUT Display-Window Mode and Color GLUT Display-Window Identifier Deleting a GLUT Display Window Current GLUT Display Window Relocating and Resizing a GLUT Display Window Managing Multiple GLUT Display Windows * GLUT Subwindows Selecting a Display-Window Screen Cursor Shape Viewing Graphics Objects in a GLUT Display Window Executing the Application Program ' Other GLUT OpenGL Two-Dimensional Viewing Program Example 293 293 296 297 299 300 300 301 301 303 305 305 305 306 306 307 307 308 309 309 309 309 310 311 311 311 312 312 313

Contents xi 6-5 6-6 6-7 6-8 6-9 6-10 6-11 В швшя 7-1 7-2 7-3 Clipping Algorithms Two-Dimensional Point Clipping Two-Dimensional Line Clipping Cohen-Sutherland Line Clipping Liang-Barsky Line Clipping Nichol-Lee-Nichol Line Clipping Line Clipping Using Nonrectangular Polygon Clip Windows Line Clipping Using Nonlinear Clipping-Window Boundaries Polygon Fill-Area Clipping Sutherland-Hodgman Polygon Clipping Weiler-Atherton Polygon Clipping Polygon Clipping Using Nonrectangular Polygon Clip Windows Polygon Clipping Using Nonlinear Clipping-Window Boundaries Curve Clipping Text Clipping 1 Three-Dimensional Viewing Overview of Three-Dimensional Viewing Concepts Viewing a Three-Dimensional Scene Projections Depth Cueing Identifying Visible Lines and Surfaces Surface Rendering Exploded and Cutaway Views Three-Dimensional and Stereoscopic Viewing The Three-Dimensional Viewing Pipeline Three-Dimensional Viewing-Coordinate Parameters The View-Plane Normal Vector 315 315 316 317 322 325 328 329 329 331 335 337 338 338 339 340 342 343 344 345 345 346 346 347 348 348 348 348 351 351 7-4 7-5 7-6 1-1 7-8 7-9 The View-Up Vector 352 The uvn Viewing-Coordinate Reference Frame 353 Generating Three-Dimensional Viewing Effects 353 Transformation from World to Viewing Coordinates 355 Projection 356 Orthogonal Projections 357 Axonometrie and Isometric Orthogonal Projections 358 Orthogonal Projection Coordinates 358 Clipping Window and Orthogonal-Projection View Volume 359 Normalization Transformation for an Orthogonal Projection 360 Oblique Parallel Projections 362 Oblique Parallel Projections in Drafting and Design 362 Cavalier and Cabinet Oblique Parallel Projections 364 Oblique Parallel-Projection Vector 364 Clipping Window and Oblique Parallel-Projection View Volume 366 Oblique Parallel-Projection Transformation Matrix 366 Normalization Transformation for an Oblique Parallel Projection 367 Perspective Projections 368 Perspective-Projection Transformation Coordinates 368 Perspective-Projection Equations: Special Cases 369 Vanishing Points for Perspective Projections 370 Perspective-Projection View Volume 371 Perspective-Projection Transformation Matrix 373 Symmetric Perspective-Projection Frustum 374 Oblique Perspective-Projection Frustum 378 Normalized Perspective-Projection Transformation Coordinates 380 The Viewport Transformation and Three-Dimensional Screen Coordinates 382

xii Contents 7-10 7-11 7-12 7-13 8-3 8-4 OpenGL Three-Dimensional Viewing OpenGL Viewing-Transformation Function OpenGL Orthogonal-Projection Function OpenGL Symmetric Perspective-Projection Function OpenGL General Perspective-Projection Function OpenGL Viewports and Display Windows OpenGL Three-Dimensional Viewing Program Example Three-Dimensional Clipping Algorithms Clipping in Three-Dimensional Homogeneous Coordinates Three-Dimensional Region Codes Three-Dimensional Point and Line Clipping Three-Dimensional Polygon Clipping Three-Dimensional Curve Clipping Arbitrary Clipping Planes OpenGL Optional Clipping Planes Three-Dimensional Object Representations Polyhedra OpenGL Polyhedron OpenGL Polygon Fill-Area GLUT Regular-Polyhedron Example GLUT Polyhedron Program Curved Surfaces Quadric Surfaces Sphere Ellipsoid Torus 383 383 384 386 386 387 387 389 389 390 391 394 395 395 397 398 400 400 402 404 404 404 404 406 408 408 408 408 409 8-5 8-6 8-9 8-10 8-11 8-12 8-13 8-14 Superquadrics 410 Superellipse 410 Superellipsoid 411 OpenGL Quadric-Surface and Cubic-Surface 411 GLUT Quadric-Surface 412 GLUT Cubic-Surface Teapot Function 413 GLU Quadric-Surface 414 Example Program Using GLUT and GLU Quadric-Surface 416 Blobby Objects 418 Spline Representations 420 Interpolation and Approximation Splines 420 Parametric Continuity Conditions 421 Geometric Continuity Conditions 422 Spline Specifications 423 Spline Surfaces 424 Trimming Spline Surfaces 424 Cubic-Spline Interpolation Methods 425 Natural Cubic Splines 426 Hermite Interpolation 426 Cardinal Splines 429 Kochanek-Bartels Splines 431 Bezier Spline Curves 432 Bezier Curve Equations 433 Example Bezier Curve-Generating Program 435 Properties of Bezier Curves 437 Design Techniques Using Bezier Curves 438 Cubic Bezier Curves 439 Bezier Surfaces 441 B-Spline Curves 442 B-Spline Curve Equations 442 Uniform Periodic B-Spline Curves 444 Cubic Periodic B-Spline Curves 447 Open Uniform B-Spline Curves 448 Nonuniform B-Spline Curves 451 B-Spline Surfaces 452 Beta Splines 452 Beta-Spline Continuity Conditions 452

Contents Л i 11 Cubic Periodic Beta-Spline Matrix Representation 453 3-15 Rational Splines 454 3-16 Conversion Between Spline Representations 3-17 Displaying Spline Curves and Surfaces Horner's Rule Forward-Difference Calculations Subdivision Methods 3-18 OpenGL Approximation-Spline 461 OpenGL Bezier-Spline Curve 462 OpenGL Bezier-Spline Surface GLU B-Spline Curve GLU B-Spline Surface GLU Surface-Trimming 3-19 Sweep Representations 3-20 Constructive Solid-Geometry Methods 3-21 Octrees 3-22 BSP Trees 3-23 Fractal-Geometry Methods Fractal Generation Procedures Classification of Fractals Fractal Dimension Geometric Construction of 456 457 457 458 459 465 467 469 471 473 474 476 479 479 481 481 482 Deterministic Self-Similar Fractals 484 Geometric Construction of Statistically Self-Similar Fractals 487 Affine Fractal-Construction Methods 489 Random Midpoint-Displacement Methods 490 Controlling Terrain Topography 493 Self-Squaring Fractals 495 Self-Inverse Fractals 506 8-24 ' Shape Grammars and Other Procedural Methods 507 8-25 Particle Systems 510 8-26 Physically Based Modeling 511 8-27 Visualization of Data Sets 514 Visual Representations for Scalar Fields 514 8-28 Visual Representations for Vector Fields 517 Visual Representations for Tensor Fields 519 Visual Representations for Multivariate Data Fields 520 521 524 525 Visible-Surface Detection Methods 528 9-1 Classification of Visible-Surface Detection Algorithms 529 9-2 9-3 9-4 9-5 9-6 9-7 9-8 9-9 9-10 9-11 Back-Face Detection Depth-Buffer Method A-Buffer Method Scan-Line Method Depth-Sorting Method BSP-Tree Method Area-Subdivision Method Octree Methods Ray-Casting Method Comparison of Visibility-Detection Methods 530 531 534 535 537 540 541 543 544 545 Q.19 Curved Surfaces 545 Curved-Surface Representations 546 Surface Contour Plots 546 9-13 Wire-Frame Visibility Methods 547 Wire-Frame Surface-Visibility Algorithms 547 Wire-Frame Depth-Cueing Algorithm 548 9-14 OpenGL Visibility-Detection 549 OpenGL Polygon-Culling 549 OpenGL Depth-Buffer 549 OpenGL Wire-Frame Surf ace-visibility Methods 551 OpenGL Depth-Cueing Function 552 9-15 552 553 554

Contents ИЕ n f 10-1 10-2 10-3 10-4 10-5 10-6 10-7 10-8 10-9 1 Illumination Models and Surface-Rendering Methods Light Sources Point Light Sources > Infinitely Distant Light Sources ' Radial Intensity Attenuation Directional Light Sources and Spotlight Effects Angular Intensity Attenuation 1 Extended Light Sources and the Warn Model Surface Lighting Effects Basic Illumination Models Ambient Light Diffuse Reflection Specular Reflection and the Phong Model ' Combined Diffuse and Specular Reflections Diffuse and Specular Reflections from Multiple Light Sources Surface Light Emissions Basic Illumination Model with Intensity Attenuation and Spotlights RGB Color Considerations Other Color Representations Luminance Transparent Surfaces ' Translucent Materials Light Refraction Basic Transparency Model Atmospheric Effects Shadows Camera Parameters Displaying Light Intensities Distributing System Intensity Levels Gamma Correction and Video Lookup Tables Displaying Continuous-Tone Images Halftone Patterns and Dithering Techniques Halftone Approximations Dithering Techniques 556 558 558 559 559 560 561 562 563 563 563 564 567 571 571 571 573 573 575 575 576 576 577 578 579 580 581 581 581 582 584 585 585 588 10-10 10-11 10-12 10-13 10-14 10-15 10-16 10-17 10-18 10-19 10-20 Polygon-Rendering Methods Constant-Intensity Surface Rendering Gouraud Surface Rendering Phong Surface Rendering Fast Phong Surface Rendering Ray-Tracing Methods Basic Ray-Tracing Algorithm Ray-Surface Intersection Calculations Ray-Sphere Intersections Ray-Polyhedron Intersections Reducing Object-Intersection Calculations * Space-Subdivision Methods Simulating Camera Focusing Effects Antialiased Ray Tracing Distributed Ray Tracing Radiosity Lighting Model Radiant-Energy Terms The Basic Radiosity Model Progressive Refinement Radiosity О J Method Environment Mapping Photon Mapping Г Г О Adding Surface Detail Modeling Surface Detail with Polygons Texture Mapping 4 Linear Texture Patterns Surface Texture Patterns 1 Volume Texture Patterns 1 Texture Reduction Patterns * Procedural Texturing Methods Bump Mapping Frame Mapping OpenGL Illumination and Surface-Rendering OpenGL Point Light-Source Function * Specifying an OpenGL Light-Source Position and Type i Specifying OpenGL Light-Source < Colors Specifying Radial-Intensity Attenuation Coefficients for an OpenGL Light Source 591 591 592 595 595 597 597 601 602 603 604 605 607 610 612 615 616 616 620 623 624 625 627 628 628 629 632 633 633 634 637 637 637 638 639 639

Contents A4 10-21 10-22 11-1 11-2 OpenGL Directional Light Sources (Spotlights) 640 OpenGL Global Lighting Parameters 641 OpenGL Surface-Property Function 642 OpenGL Illumination Model 643 OpenGL Atmospheric Effects 644 OpenGL Transparency 645 OpenGL Surface-Rendering 646 OpenGL Halftoning Operations 647 OpenGL Texture 648 OpenGL Line-Texture 648 OpenGL Surface-Texture 651 OpenGL Volume-Texture 653 OpenGL Color Options for Texture Patterns 653 OpenGL Texture-Mapping Options 654 OpenGL Texture Wrapping 655 Copying OpenGL Texture Patterns from the Frame Buffer 655 OpenGL Texture-Coordinate Arrays 655 Naming OpenGL Texture Patterns 656 OpenGL Texture Subpatterns 657 OpenGL Texture Reduction Patterns 657 OpenGL Texture Borders 658 OpenGL Proxy Textures 659 Automatic Texturing of Quadric Surfaces 659 Homogeneous Texture Coordinates 659 Additional OpenGL Texture Options 660 660 664 665 Interactive Input Methods and Graphical User Interfaces 668 Graphical Input Data Logical Classification of Input Devices Locator Devices Stroke Devices String Devices 669 669 670 670 670 Valuator Devices 671 Choice Devices 671 Pick Devices 672 11-3 Input for Graphical Data 673 Input Modes 674 Echo Feedback 674 Callback 674 11-4 Interactive Picture-Construction Techniques 675 Basic Positioning Methods 675 Dragging 675 Constraints 675 Grids 676 Rubber-Band Methods 676 Gravity Field 677 Interactive Painting and Drawing Methods " 678 11-5 Virtual-Reality Environments 679 11-6 OpenGL Interactive Input-Device 679 GLUT Mouse 680 GLUT Keyboard 684 GLUT Tablet 689 GLUT Spaceball 689 GLUT Button-Box Function 690 GLUT Dials Function 690 OpenGL Picking Operations 690 11-7 OpenGL Menu 696 Creating a GLUT Menu 696 Creating and Managing Multiple GLUT Menus 699 Creating GLUT Submenus 700 Modifying GLUT Menus 703 11-8 Designing a Graphical User Interface 703 The User Dialogue 703 Windows and Icons 704 Accommodating Multiple Skill Levels 704 Consistency 705 Minimizing Memorization 705 Backup and Error Handling 705 Feedback 705 11-9 706 709 709

xvi Contents 12-1 12-2 12-3 12-4 12-5 Color Models and Color Applications Properties of Light The Electromagnetic Spectrum Psychological Characteristics of Color Color Models Primary Colors Intuitive Color Concepts Standard Primaries and the Chromaticity Diagram The XYZ Color Model Normalized XYZ Values The CIE Chromaticity Diagram Color Gamuts Complementary Colors Dominant Wavelength Purity The RGB Color Model The YIQ and Related Color Models The YIQ Parameters 712 713 713 715 716 716 716 717 717 718 718 719 719 719 720 720 722 722 13-2 13-3 13-4 13-5 13-6 13-7 13-8 13-9 13-10 13-11 Double Buffering Generating Animations Using Raster Operations Design of Animation Sequences Traditional Animation Techniques General Computer-Animation Computer-Animation Languages Key-Frame Systems Morphing Simulating Accelerations Motion Specifications Direct Motion Specification Goal-Directed Systems Kinematics and Dynamics Articulated Figure Animation Periodic Motions OpenGL Animation Procedures 734 735 735 737 737 738 739 739 742 745 745 745 746 747 748 749 752 754 754 12-6 12-7 12-8 12-9 12-10 Between RGB and YIQ Color Spaces The YUV YC r C b Systems The CMY and CMYK Color Models The CMY Parameters Between CMY and RGB Color Spaces The HSV Color Model The HSV Parameters Selecting Shades, Tints, and Tones Between HSV and RGB Color Spaces The HLS Color Model Color Selection and Applications 722 723 723 723 724 724 724 726 726 728 728 730 731 731 "* E1 Hierarchical Modeling 14-1 14-2 14-3 14-4 14-5 Basic Modeling Concepts О.Г System Representations Symbol Hierarchies J Modeling Packages General Hierarchical Modeling Methods Local Coordinates Modeling О Creating Hierarchical Structures Hierarchical Modeling Using OpenGL Display Lists Г Г J 756 757 757 759 760 762 763 763 763 765 765 766 766 13-1 Computer Animation 732 Raster Methods for Computer Animation 734 Graphics File Formats 15-1 Image-File Configurations 15-2 Color-Reduction Methods 768 769 770

Contents XVII Uniform Color Reduction Popularity Color Reduction Median-Cut Color Reduction 15-3 File-Compression Techniques Run-Length Encoding LZW Encoding Other Pattern-Recognition Compression Methods Huffman Encoding Arithmetic Encoding Discrete Cosine Transform 15-4 Composition of the Major File Formats JPEG: Joint Photographic Experts Group CGM: Computer-Graphics Metafile Format TIFF: Tag Image-File Format PNG: Portable Network-Graphics... Format XBM: X Window System Bitmap Format & XPM: X Window System Pixmap Format Adobe Photoshop Format MacPaint: Macintosh Paint Format PICT: Picture Data Format BMP: Bitmap Format PCX: PC Paintbrush File Format TGA: Truevision Graphics-Adapter Format GIF: Graphics Interchange Format 15-5 A-l Mathematics for Computer Graphics Coordinate Reference Frames Two-Dimensional Cartesian Screen Coordinates Standard Two-Dimensional Cartesian Reference Frames Polar Coordinates in the xy Plane 770 771 771 771 772 772 773 773 776 776 778 779 780 781 781 781 782 782 782 782 783 783 783 783 784 784 o~i a / 787 787 788 788 A-2 A-3 A-4 A-5 A-6 A-7 A-8 A-9 A-10 Standard Three-Dimensional Cartesian Reference Frames Three-Dimensional Cartesian Screen Coordinates Three-Dimensional Curvilinear-Coordinate Systems Solid Angle Points and Vectors Point Properties Vector Properties Vector Addition and Scalar Multiplication Scalar Product of Two Vectors Vector Product of Two Vectors Tensors Basis Vectors and the Metric Tensor Determining Basis Vectors for a Coordinate Space Orthonormal Basis Metric Tensor Matrices Scalar Multiplication and Matrix Addition Matrix Multiplication Matrix Transpose Determinant of a Matrix Matrix Inverse Complex Numbers Basic Complex Arithmetic Imaginary Unit Complex Conjugate and Modulus of a Complex Number Complex Division Polar-Coordinate Representation for a Complex Number Quaternions Nonparametric Representations Parametric Representations Rate-of-Change Operators Gradient Operator Directional Derivative General Form of the Gradient Operator Laplace Operator Divergence Operator Curl Operator 789 790 790 791 792 792 792 794 794 795 796 796 796 797 798 799 800 800 801 801 802 802 803 803 804 804 805 805 807 807 808 809 809 810 810 810 811

xviii Contents Rate-of-Change Integral Transformation Theorems Stokes's Theorem Green's Theorem for a Plane Surface Divergence Theorem Green's Transformation Equations Area and Centroid of a Polygon Area of a Polygon Centroid of a Polygon Calculating Properties of Polyhedra Numerical Methods Solving Sets of Linear Equations Finding Roots of Nonlinear Equations 811 811 812 813 814 814 814 815 817 817 817 819 Evaluating Integrals 820 Solving Ordinary Differential Equations 822 Solving Partial Differential Equations 824 Least-Squares Curve-Fitting Methods for Data Sets 825 Bibliography 827 Subject Index 839 OpenGL Function Index 856 Core Library 856 GLU 857 GLUT 857