TIENE EN SU CESTA DE LA COMPRA
en total 0,00 €
This book is suitable for undergraduate students in computer science and engineering, for students in other disciplines who have good programming skills, and for professionals.
Computer animation and graphics are now prevalent in everyday life from the computer screen, to the movie screen, to the smart phone screen. The growing excitement about WebGL applications and their ability to integrate HTML5, inspired the authors to exclusively use WebGL in the Seventh Edition of Interactive Computer Graphics with WebGL. Thisis the only introduction to computer graphics text for undergraduates that fully integrates WebGL and emphasizes application-based programming. The top-down, programming-oriented approach allows for coverage of engaging 3D material early in the course so students immediately begin to create their own 3D graphics.
Teaching and Learning Experience
This program will provide a better teaching and learning experience-for you and your students. It will help:
Engage Students Immediately with 3D Material: A top-down, programming-oriented approach allows for coverage of engaging 3D material early in the course so students immediately begin to create their own graphics.
Introduce Computer Graphics Programming with WebGL and JavaScript: WebGL is not only fully shader-based-each application must provide at least a vertex shader and a fragment shader-but also a version that works within the latest web browsers.
CHAPTER 1 GRAPHICS SYSTEMS AND MODELS 1
1.1 Applications of Computer Graphics 2
1.1.1 Display of Information 2
1.1.2 Design 3
1.1.3 Simulation and Animation 3
1.1.4 User Interfaces 4
1.2 A Graphics System 5
1.2.1 Pixels and the Framebuffer 5
1.2.2 The CPU and the GPU 6
1.2.3 Output Devices 7
1.2.4 Input Devices 9
1.3 Images: Physical and Synthetic 10
1.3.1 Objects and Viewers 10
1.3.2 Light and Images 12
1.3.3 Imaging Models 13
1.4 Imaging Systems 15
1.4.1 The Pinhole Camera 15
1.4.2 The Human Visual System 17
1.5 The Synthetic-Camera Model 18
1.6 The Programmer's Interface 20
1.6.1 The Pen-Plotter Model 21
1.6.2 Three-Dimensional APIs 23
1.6.3 A Sequence of Images 26
1.6.4 The Modeling-Rendering Paradigm 27
1.7 Graphics Architectures 28
1.7.1 Display Processors 29
1.7.2 Pipeline Architectures 29
1.7.3 The Graphics Pipeline 30
1.7.4 Vertex Processing 31
1.7.5 Clipping and Primitive Assembly 31
1.7.6 Rasterization 32
1.7.7 Fragment Processing 32
1.8 Programmable Pipelines 32
1.9 Performance Characteristics 33
1.10 OpenGL Versions and WebGL 34
Summary and Notes 36
Suggested Readings 36
Exercises 37
CHAPTER 2 GRAPHICS PROGRAMMING 39
2.1 The Sierpinski Gasket 39
2.2 Programming Two-Dimensional Applications 42
2.3 The WebGL Application Programming Interface 47
2.3.1 Graphics Functions 47
2.3.2 The Graphics Pipeline and State Machines 49
2.3.3 OpenGL and WebGL 50
2.3.4 The WebGL Interface 50
2.3.5 Coordinate Systems 51
2.4 Primitives and Attributes 53
2.4.1 Polygon Basics 55
2.4.2 Polygons in WebGL 56
2.4.3 Approximating a Sphere 57
2.4.4 Triangulation 58
2.4.5 Text 59
2.4.6 Curved Objects 60
2.4.7 Attributes 61
2.5 Color 62
2.5.1 RGB Color 64
2.5.2 Indexed Color 66
2.5.3 Setting of Color Attributes 67
2.6 Viewing 68
2.6.1 The Orthographic View 68
2.6.2 Two-Dimensional Viewing 71
2.7 Control Functions 71
2.7.1 Interaction with the Window System 72
2.7.2 Aspect Ratio and Viewports 73
2.7.3 Application Organization 74
2.8 The Gasket Program 75
2.8.1 Sending Data to the GPU 78
2.8.2 Rendering the Points 78
2.8.3 The Vertex Shader 79
2.8.4 The Fragment Shader 80
2.8.5 Combining the Parts 80
2.8.6 The initShaders Function 81
2.8.7 The init Function 82
2.8.8 Reading the Shaders from the Application 83
2.9 Polygons and Recursion 83
2.10 The Three-Dimensional Gasket 86
2.10.1 Use of Three-Dimensional Points 86
2.10.2 Naming Conventions 88
2.10.3 Use of Polygons in Three Dimensions 88
2.10.4 Hidden-Surface Removal 91
Summary and Notes 93
Suggested Readings 94
Exercises 95
CHAPTER 3 INTERACTION AND ANIMATION 99
3.1 Animation 99
3.1.1 The Rotating Square 100
3.1.2 The Display Process 102
3.1.3 Double Buffering 103
3.1.4 Using a Timer 104
3.1.5 Using setAnimFrame 105
3.2 Interaction 106
3.3 Input Devices 107
3.4 Physical Input Devices 108
3.4.1 Keyboard Codes 108
3.4.2 The Light Pen 109
3.4.3 The Mouse and the Trackball 109
3.4.4 Data Tablets,Touch Pads, and Touch Screens 110
3.4.5 The Joystick 111
3.4.6 Multidimensional Input Devices 111
3.4.7 Logical Devices 112
3.4.8 Input Modes 113
3.5 Clients and Servers 115
3.6 Programming Event-Driven Input 116
3.6.1 Events and Event Listeners 117
3.6.2 Adding a Button 117
3.6.3 Menus 119
3.6.4 Using Keycodes 120
3.6.5 Sliders 121
3.7 Position Input 122
3.8 Window Events 123
3.9 Picking 125
3.10 Building Models Interactively 126
3.11 Design of Interactive Programs 130
Summary and Notes 130
Suggested Readings 131
Exercises 132
CHAPTER 4 GEOMETRIC OBJECTS AND TRANSFORMATIONS 135
4.1 Scalars, Points, and Vectors 136
4.1.1 Geometric Objects 136
4.1.2 Coordinate-Free Geometry 138
4.1.3 The Mathematical View: Vector and Affine Spaces 138
4.1.4 The Computer Science View 139
4.1.5 Geometric ADTs 140
4.1.6 Lines 141
4.1.7 Affine Sums 141
4.1.8 Convexity 142
4.1.9 Dot and Cross Products 142
4.1.10 Planes 143
4.2 Three-Dimensional Primitives 145
4.3 Coordinate Systems and Frames 146
4.3.1 Representations and N-Tuples 148
4.3.2 Change of Coordinate Systems 149
4.3.3 Example: Change of Representation 151
4.3.4 Homogeneous Coordinates 153
4.3.5 Example: Change in Frames 155
4.3.6 Working with Representations 157
4.4 Frames in WebGL 159
4.5 Matrix and Vector Types 163
4.5.1 Row versus Column Major Matrix Representations 165
4.6 Modeling a Colored Cube 165
4.6.1 Modeling the Faces 166
4.6.2 Inward- and Outward-Pointing Faces 167
4.6.3 Data Structures for Object Representation 167
4.6.4 The Colored Cube 168
4.6.5 Color Interpolation 170
4.6.6 Displaying the Cube 170
4.6.7 Drawing with Elements 171
4.7 Affine Transformations 172
4.8 Translation, Rotation, and Scaling 175
4.8.1 Translation 175
4.8.2 Rotation 176
4.8.3 Scaling 177
4.9 Transformations in Homogeneous Coordinates 179
4.9.1 Translation 179
4.9.2 Scaling 181
4.9.3 Rotation 181
4.9.4 Shear 183
4.10 Concatenation of Transformations 184
4.10.1 Rotation About a Fixed Point 185
4.10.2 General Rotation 186
4.10.3 The Instance Transformation 187
4.10.4 Rotation About an Arbitrary Axis 188
4.11 Transformation Matrices in WebGL 191
4.11.1 Current Transformation Matrices 192
4.11.2 Basic Matrix Funct