Solution Manual for Computer Graphics with Open GL, 4/E, Donald D. Hearn, M. Pauline Baker, Warren Carithers, ISBN-10: 0136053580, ISBN-13: 9780136053583, Available Chs (Ch2 ~ 15)
Table of Contents
Preface xxi
About the Authors xxvi
1 A Survey of Computer Graphics 1
1-1 Graphs and Charts 2
1-2 Computer-Aided Design 2
1-3 Virtual-Reality Environments 4
1-4 Data Visualizations 4
1-5 Education and Training 5
1-6 Computer Art 5
1-7 Entertainment 6
1-8 Image Processing 7
1-9 Graphical User Interfaces 7
1-10 Summary 8
2 Computer Graphics Hardware 9
2-1 Video Display Devices 10
Refresh Cathode-Ray Tubes 10
Raster-Scan Displays 13
Random-Scan Displays 15
Color CRT Monitors 16
Flat-Panel Displays 18
Three-Dimensional Viewing Devices 20
Stereoscopic and Virtual-Reality Systems 21
2-2 Raster-Scan Systems 22
Video Controller 22
Raster-Scan Display Processor 24
2-3 GraphicsWorkstations and Viewing Systems 25
2-4 Input Devices 26
Keyboards, Button Boxes, and Dials 26
Mouse Devices 26
Trackballs and Spaceballs 27
Joysticks 27
Data Gloves 28
Digitizers 28
Image Scanners 29
Touch Panels 29
Light Pens 30
Voice Systems 30
2-5 Hard-Copy Devices 30
2-6 Graphics Networks 32
2-7 Graphics on the Internet 32
2-8 Summary 33
3 Computer Graphics
Software 35
3-1 Coordinate Representations 36
3-2 Graphics Functions 37
3-3 Software Standards 38
3-4 Other Graphics Packages 39
3-5 Introduction to OpenGL 40
Basic OpenGL Syntax 40
Related Libraries 40
Header Files 41
Display-Window Management Using GLUT 42
A Complete OpenGL Program 43
Error Handling in OpenGL 47
3-6 Summary 48
4 Graphics Output Primitives 51
4-1 Coordinate Reference Frames 52
Screen Coordinates 52
Absolute and Relative Coordinate Specifications 53
4-2 Specifying A Two-Dimensional World-Coordinate Reference Frame in OpenGL 54
4-3 OpenGL Point Functions 55
4-4 OpenGL Line Functions 57
4-5 OpenGL Curve Functions 58
4-6 Fill-Area Primitives 59
4-7 Polygon Fill Areas 60
Polygon Classifications 61
Identifying Concave Polygons 61
Splitting Concave Polygons 62
Splitting a Convex Polygon into a Setof Triangles 63
Inside-Outside Tests 63
Polygon Tables 66
Plane Equations 67
Front and Back Polygon Faces 68
4-8 OpenGL Polygon Fill-Area Functions 70
4-9 OpenGL Vertex Arrays 76
4-10 Pixel-Array Primitives 78
4-11 OpenGL Pixel-Array Functions 79
OpenGL Bitmap Function 79
OpenGL Pixmap Function 81
OpenGL Raster Operations 82
4-12 Character Primitives 83
4-13 OpenGL Character Functions 85
4-14 Picture Partitioning 86
4-15 OpenGL Display Lists 87
Creating and Naming an OpenGL Display List 87
Executing OpenGL Display Lists 88
Deleting OpenGL Display Lists 89
4-16 OpenGL Display-Window Reshape Function 89
4-17 Summary 92
5 Attributes of Graphics Primitives 105
5-1 OpenGL State Variables 106
5-2 Color and Grayscale 106
RGB Color Components 106
Color Tables 107
Grayscale 108
Other Color Parameters 109
5-3 OpenGL Color Functions 109
The OpenGL RGB and RGBA Color Modes 109
OpenGL Color-Index Mode 110
OpenGL Color Blending 111
OpenGL Color Arrays 112
Other OpenGL Color Functions 114
5-4 Point Attributes 115
5-5 OpenGL Point-Attribute Functions 115
5-6 Line Attributes 115
Line Width 115
Line Style 116
Pen and Brush Options 116
5-7 OpenGL Line-Attribute Functions 117
OpenGL Line-Width Function 117
OpenGL Line-Style Function 117
Other OpenGL Line Effects 119
5-8 Curve Attributes 119
5-9 Fill-Area Attributes 120
Fill Styles 120
Color-Blended Fill Regions 121
5-10 OpenGL Fill-Area Attribute Functions 121
OpenGL Fill-Pattern Function 121
OpenGL Texture and Interpolation Patterns 122
OpenGL Wire-Frame Methods 123
OpenGL Front-Face Function 126
5-11 Character Attributes 126
5-12 OpenGL Character-Attribute Functions 129
5-13 OpenGL Antialiasing Functions 129
5-14 OpenGL Query Functions 130
5-15 OpenGL Attribute Groups 131
5-16 Summary 131
6 Implementation Algorithms for Graphics Primitives and Attributes 137
6-1 Line-Drawing Algorithms 138
Line Equations 138
DDA Algorithm 139
Bresenhams Line Algorithm 140
Displaying Polylines 144
6-2 Parallel Line Algorithms 144
6-3 Setting Frame-Buffer Values 146
6-4 Circle-Generating Algorithms 147
Properties of Circles 147
Midpoint Circle Algorithm 149
6-5 Ellipse-Generating Algorithms 153
Properties of Ellipses 153
Midpoint Ellipse Algorithm 154
6-6 Other Curves 160
Conic Sections 161
Polynomials and Spline Curves 162
6-7 Parallel Curve Algorithms 163
6-8 Pixel Addressing and Object Geometry 163
Screen Grid Coordinates 164
Maintaining Geometric Properties of Displayed Objects 164
6-9 Attribute Implementations for Straight-Line Segments and Curves 166
Line Width 166
Line Style 168
Pen and Brush Options 169
Curve Attributes 170
6-10 General Scan-Line Polygon-Fill Algorithm 171
6-11 Scan-Line Fill of Convex Polygons 175
6-12 Scan-Line Fill for Regions with Curved Boundaries 176
6-13 Fill Methods for Areas with Irregular Boundaries 176
Boundary-Fill Algorithm 176
Flood-Fill Algorithm 180
6-14 Implementation Methods for Fill Styles 180
Fill Styles 181
Color-Blended Fill Regions 181
6-15 Implementation Methods for Antialiasing 183
Supersampling Straight-Line Segments 184
Subpixel Weighting Masks 186
Area Sampling Straight-Line Segments 186
Filtering Techniques 186
Pixel Phasing 186
Compensating for Line-Intensity Differences 187
Antialiasing Area Boundaries 188
6-16 Summary 190
7 Two-Dimensional Geometric Transformations 195
7-1 Basic Two-Dimensional Geometric Transformations 196
Two-Dimensional Translation 196
Two-Dimensional Rotation 198
Two-Dimensional Scaling 200
7-2 Matrix Representations and
Homogeneous Coordinates 201
Homogeneous Coordinates 202
Two-Dimensional Translation Matrix 203
Two-Dimensional Rotation Matrix 203
Two-Dimensional Scaling Matrix 203
7-3 Inverse Transformations 204
7-4 Two-Dimensional Composite Transformations 204
Composite Two-Dimensional
Translations 205
Composite Two-Dimensional Rotations 205
Composite Two-Dimensional Scalings 205
General Two-Dimensional Pivot-Point Rotation 206
General Two-Dimensional Fixed-Point Scaling 206
General Two-Dimensional Scaling Directions 207
Matrix Concatenation Properties 208
General Two-Dimensional Composite Transformations and Computational Efficiency 209
Two-Dimensional Rigid-Body Transformation 210
Constructing Two-Dimensional Rotation Matrices 211
Two-Dimensional Composite-Matrix Programming Example 211
7-5 Other Two-Dimensional Transformations 216
Reflection 216
Shear 218
7-6 Raster Methods for Geometric Transformations 220
7-7 OpenGL Raster Transformations 221
7-8 Transformations between Two-Dimensional Coordinate Systems 222
7-9 OpenGL Functions for Two-Dimensional
Geometric Transformations 224
Basic OpenGL Geometric Transformations 224
OpenGL Matrix Operations 226
7-10 OpenGL Geometric-Transformation Programming Examples 228
7-11 Summary 229
8 Two-Dimensional Viewing 233
8-1 The Two-Dimensional Viewing Pipeline 234
8-2 The ClippingWindow 235
Viewing-Coordinate Clipping Window 236
World-Coordinate Clipping Window 236
8-3 Normalization and Viewport Transformations 237
Mapping the Clipping Window into a Normalized Viewport 237
Mapping the Clipping Window into a Normalized Square 239
Display of Character Strings 241
Split-Screen Effects and Multiple Output Devices 241
8-4 OpenGL Two-Dimensional Viewing Functions 241
OpenGL Projection Mode 241
GLU Clipping-Window Function 242
OpenGL Viewport Function 242
Creating a GLUT Display Window 243
Setting the GLUT Display-Window Mode and Color 244
GLUT Display-Window Identifier 244
Deleting a GLUT Display Window 244
Current GLUT Display Window 244
Relocating and Resizing a GLUT Display Window 245
Managing Multiple GLUT Display Windows 245
GLUT Subwindows 246
Selecting a Display-Window Screen-Cursor Shape 246
Viewing Graphics Objects in a GLUT Display Window 247
Executing the Application Program 247
Other GLUT Functions 248
OpenGL Two-Dimensional Viewing Program Example 248
8-5 Clipping Algorithms 250
8-6 Two-Dimensional Point Clipping 250
8-7 Two-Dimensional Line Clipping 251
Cohen-Sutherland Line Clipping 252
Liang-Barsky Line Clipping 257
Nicholl-Lee-Nicholl Line Clipping 260
Line Clipping Using Nonrectangular Polygon Clip Windows 262
Line Clipping Using Nonlinear Clipping-Window Boundaries 262
8-8 Polygon Fill-Area Clipping 263
Sutherland–Hodgman Polygon Clipping 265
Weiler-Atherton Polygon Clipping 269
Polygon Clipping Using Nonrectangular Polygon Clip Windows 271
Polygon Clipping Using Nonlinear Clipping-Window Boundaries 272
8-9 Curve Clipping 272
8-10 Text Clipping 273
8-11 Summary 274
9 Three-Dimensional Geometric Transformations 279
9-1 Three-Dimensional Translation 280
9-2 Three-Dimensional Rotation 281
Three-Dimensional Coordinate-Axis Rotations 282
General Three-Dimensional Rotations 284
Quaternion Methods for Three-Dimensional Rotations 289
9-3 Three-Dimensional Scaling 293
9-4 Composite Three-Dimensional Transformations 295
9-5 Other Three-Dimensional Transformations 298
Three-Dimensional Reflections 298
Three-Dimensional Shears 299
9-6 Transformations between Three-Dimensional Coordinate Systems 299
9-7 Affine Transformations 300
9-8 OpenGL Geometric-Transformation Functions 300
OpenGL Matrix Stacks 300
9-9 OpenGL Three-Dimensional Geometric-Transformation Programming Examples 302
9-10 Summary 303
10 Three-Dimensional Viewing 307
10-1 Overview of Three-Dimensional Viewing Concepts 308
Viewing a Three-Dimensional Scene 308
Projections 308
Depth Cueing 309
Identifying Visible Lines and Surfaces 309
Surface Rendering 309
Exploded and Cutaway Views 309
Three-Dimensional and Stereoscopic Viewing 310
10-2 The Three-Dimensional Viewing Pipeline 310
10-3 Three-Dimensional Viewing-Coordinate Parameters 312
The View-Plane Normal Vector 312
The View-Up Vector 313
The uvn Viewing-Coordinate Reference Frame 313
Generating Three-Dimensional Viewing Effects 314
10-4 Transformation fromWorld to Viewing Coordinates 314
10-5 Projection Transformations 316
10-6 Orthogonal Projections 316
Axonometric and Isometric Orthogonal Projections 317
Orthogonal Projection Coordinates 317
Clipping Window and Orthogonal-Projection View Volume 318
Normalization Transformation for an Orthogonal Projection 320
10-7 Oblique Parallel Projections 321
Oblique Parallel Projections in Drafting and Design 322
Cavalier and Cabinet Oblique Parallel Projections 323
Oblique Parallel-Projection Vector 324
Clipping Window and Oblique
Parallel-Projection View Volume 325
Oblique Parallel-Projection Transformation Matrix 325
Normalization Transformation for an Oblique Parallel Projection 326
10-8 Perspective Projections 327
Perspective-Projection Transformation Coordinates 327
Perspective-Projection Equations: Special Cases 328
Vanishing Points for Perspective Projections 330
Perspective-Projection View Volume 331
Perspective-Projection Transformation Matrix 332
Symmetric Perspective-Projection Frustum 333
Oblique Perspective-Projection Frustum 335
Normalized Perspective-Projection Transformation Coordinates 338
10-9 The Viewport Transformation and Three- Dimensional Screen Coordinates 341
10-10 OpenGL Three-Dimensional Viewing Functions 341
OpenGL Viewing-Transformation Function 342
OpenGL Orthogonal-Projection Function 342
OpenGL Symmetric Perspective-Projection Function 344
OpenGL General Perspective-Projection Function 344
OpenGL Viewports and Display Windows 345
OpenGL Three-Dimensional Viewing Program Example 345
10-11 Three-Dimensional Clipping Algorithms 347
Clipping in Three-Dimensional Homogeneous Coordinates 348
Three-Dimensional Region Codes 349
Related products



