
Jim x. ehen With contributions by Chunyang Chen, Nanyang Yu, Yanlin Luo, Yanling Liu and Zhigeng Pan Guide to Graphics Software Tools Second edition ~ Springer Contents Pre~ace ---------------------- - ----- - -v Chapter 1 Objects and Models 1.1 Graphics Models and Libraries ------- 1 1.2 OpenGL Programming 2 Understanding Example 1.1 3 1.3 Frame Buffer, Scan-conversion, and Clipping ----- 5 Scan-converting Lines 6 Scan-converting Circles and Other Curves 11 Scan-converting Triangles and Polygons 11 Scan-converting Characters 16 Clipping 16 1.4 Attributes and Antialiasing ------------- -17 Area Sampling 17 Antialiasing a Line with Weighted Area Sampling 18 1.5 Double-bl{tferingfor Animation - 21 1.6 Review Questions ------- - -26 X Contents 1.7 Programming Assignments - - -------- - -- 27 Chapter 2 Transformation and Viewing 2.1 Geometrie Transformation ----- 29 2.2 2D Transformation ---- - ---- - 30 20 Translation 30 20 Rotation 31 20 Scaling 32 Composition of2D Transformations 33 2.3 3D Transformation and Hidden-surjaee Removal -- - 38 3D Translation, Rotation, and Scaling 38 Transfonnation in OpenGL 40 Hidden-surface Remova! 45 Collision Oetection 46 30 Models: Cone, Cylinder, and Sphere 46 Composition of30 Transfonnations 51 2.4 Viewing ----- - 56 20 Viewing 56 30 Viewing 57 30 Clipping Against a Cube 61 Clipping Against an Arbitrary Plane 62 An Example ofViewing in OpenGL 62 2.5 Review Questions 65 2.6 Programming Assignments 67 Chapter 3 Color andLighting 3.1 Color -------- - - 69 RGß Mode and Index Mode 70 Eye Characteristics and Gamma Correction 71 Contents xi 3.2 Color Interpolation --- - 72 3.3 Lighting - - 74 Lighting Components 74 OpenGL Lighting Model 79 3.4 Visible-Surface Shading ----------- - 85 Back-Face Culling 85 Polygon Shading Models 87 Ray Tracing and Radiosity 90 3.5 Review Questions - 96 3.6 Programming Assignments 100 Chapter 4 Blending and Texture Mapping 4.1 Blending ---------- 101 OpenGL Blending Factors 102 Transparency and Hidden-Surface Removal 103 Antialiasing 105 Fog 105 4.2 Images ------ 107 4.3 Texture Mapping ------- 108 Pixel and Texel Relations 108 Texture Objects 112 Texture Coordinates 113 Levels ofDetail in Texture Mapping 116 4.4 Advanced Texture Mapping ----- - --- - 117 Bump Mapping 117 Light Mapping 119 Environment Mapping 120 Automatie Texture Coordinates 122 Displacement Mapping 123 4.5 RevieYv Questions - - - - ­ 124 4.6 Programming Assignments 125 xii Contents Chapter 5 OpenGL Programming in Java: JOGL 5.1 Introduction --- - - - - ---------- - -127 5.2 Setting Up Working Environment ------- - -128 5.3 Drawing a Point --- - 132 5.4 Drawing Randomly Generated Points --- - 134 5.5 Building an Executable JAR File -- - --- - 136 5.6 Review Questions - - - - - - - - ­ --- - --- 138 5.7 Programming Assignments -------- - 138 Chapter 6 Curved Models 6.1 Introduction ---- - -141 6.2 Quadratic Surfaces ------------- - - 142 Sphere 142 Ellipsoid 143 Cone 144 Cylinder 144 Texture Mapping on GLU Models 145 6.3 Tori, Po(vhedra, and Teapots in GLUT -------- 148 Tori 148 Polyhedra 148 Teapots 149 6.4 Cubic Curves - -152 Continuity Conditions 153 Hennite Curves 155 Bezier Curves 158 Natural Splines 163 B-splines 164 Non-unifonn B-splines 167 NURBS 168 Contents xiii 6.5 Bi-cubic Swlaces ------------ - 169 Hennite Surfaces 169 Bezier Surfaces 171 B-spline Surfaces 175 6.6 Review Questions 175 6.7 Programming Assignments 176 Chapter 7 Vertex Shading, Pixel Shading, and Parallel Processing 7.1 1ntrodllction 179 7.2 Programmable Pipelines 180 7.3 GLSL, Cg, and HLSL 182 Cg Basics 182 AVertex Program 183 Transfonnation and Viewing 186 A Fragment Program 188 7.4 Parallel Processing and Cuda 192 7.5 Introdllction 194 7.6 Per-Vertex Lighting 194 Vertex and Light Source Transfonnation 195 Vertex Nonnal Transfonnation 196 OpenGL Lighting Model 197 7.7 Per-Fragment Lighting 206 7.8 Per-Fragment Texture Mapping ----- 211 Texture Coordinates 211 Texture Objects 212 Texture and Lighting Blending 213 7.9 Per-Fragment Bump Mapping --- - - - 215 Bump Map Texture Coordinates 215 Bump Map Object 216 Nonnal Calculations 217 xiv Contents Fragment Lighting Calculations 218 7.10 Review Questions ---- - 221 7.11 Programming Assignments --- - 221 Chapter 8 Programming in Java3D 8.1 1ntroduction --- - 223 8.2 Scene Graph --- - 223 Setting Up Working Environment 225 Drawing a ColorCube Object 228 8.3 The SimpleUniverse - - 229 8.4 Transformation - - 232 8.5 Multiple Scene Graph Branches ------ - --- - 233 8.6 Animation -------------- - 236 8.7 Primitives -------------- - 240 8.8 Appearance - --------------- - --- - 244 8.9 Texture Mapping - - 247 8.10 Files and Loaders - - 249 8.11 Summary ------- - 251 8.12 Review Questions -- - ---- - 251 8.13 Programming Assignments ------ - 251 Chapter 9 OpenGL Shading Language 9.1 Introduction ----- - ---------- - - -- - 253 9.2 Anatomy oIa GLSL Program - - 253 9.3 GLSL Shader Basics - - 255 Contents XV 9.4 Compiling Shaders 256 9.5 Linking Shaders 257 9.6 ExeclIting Shaders 259 9.7 veuying Variables 260 9.8 Un!form Variables 261 9.9 Using TextlIres 263 9.10 Lighting 264 9.11 Advanced Shaders Techniqlles 267 Post Processing 267 Depth-based Texture Processing 270 Fog 274 Chapter 10 Direct3D Shader Programming 10.1 Introdllction ----- - 283 Setting Up Working Environment 284 An Example Framework 285 10.2 Rendering Primitives ----- - - - - - 288 Creating Primitives 289 Animation Using Shaders 294 10.3 Pixel Lighting ------ --------- - 298 Creating Depth Stencil View 299 Creating Input Layout 300 Creating Cube Geometry 301 Interfaces for Accessing Variables In Effect Object 303 Rendering the Scene 304 Lighting in Shaders 307 Directional Pixel Lighting 308 Directional Pixel Light with Specular 309 Point Pixel Lighting 310 Point Pixel Lighting with Specular 312 Spot Pixel Lighting 312 xvi Contents Hemisphere Pixel Lighting 313 10.4 Texture Mapping ---------- 314 Creating Views 314 Creating Input Layout 316 Render-to-texture Funetion 317 Texture Mapping in Shaders 319 Simple Texture Mapping 320 Multi-Texture Mapping 321 Texture and Lighting 321 Texture Animation 322 Light Mapping 323 Bump Mapping 323 10.5 Simu1ating Fixed Functiona1 Fog ---------- 325 Linear Fog 325 Exponential Fog 326 Square Exponential Fog 326 10.6 Cube Mapping ----------- 326 Creating Geometry 327 Creating Resourees far Cube Mapping 327 Rendering the Seene 329 Rendering to Cube Map in Shaders 330 Cube Mapping in Shaders 331 Cube Mapping with Refraetion 332 Cube mapping with Separated Refraction 334 Chapter 11 Advanced Topics 11.1 Introduction -- 335 11.2 Graphics Libraries -- 336 11.3 Visualization -- 336 Interaetive Visualization and Computational Steering 336 Data Visualization: Dimensions and Data Types 337 Parallel Coordinates 339 11.4 Modeling and Rendering -------------- 340 Contents xvii Curves and Surfaces 341 Sweep Representations 341 Ins tances 341 Constructive Solid Geometry 341 Procedural Models 342 Fractals 342 Partic1e systems 342 Image-based Modeling and Rendering 344 11.5 Animation andSimulation -- - 345 Physics-Based Modeling and Simulation: Triangular Polyhedra 346 Real-time Animation and Simulation: a Spider Web 348 The Efficiency of Modeling and Simulation 351 11.6 Virtual Reality 352 11.7 Graphics on the Internet: Web3D 354 Virtual Reality Modeling Language (VRML) 354 Java3D 354 Chapter 12 Low-Level Graphics Libraries 12.1 Introduction 355 12.2 OpenGL and Mesa -- --- - - - - - ------ 355 12.3 Direct3D/DirectX -- - - ------- -- - - - - 356 12.4 PHIGS and GKS-3D - --- - --- ------ 356 12.5 QuickDraw3D andXGL ------ - - - - - - 356 Chapter 13 Visualization 13.1 Introduction 357 13.2 Multipurpose Visualization Tools 358 13.3 Volume Rendering 358 xviii Contents 13.4 Vector Field and Fluid Flow ----------- - 359 13.5 Large Data Sets ----------------- - 359 Chapter 14 Modeling and Rendering 14.1 Modeling ------------ - ------- - 361 14.2 Rendering -------------------- - 361 14.3 Multipurpose Tools: Modeling, Rendering, and Animation 362 Chapter 15 Animation and Simulation 15.1 Animation --------------- - ---- - 365 15.2 Simulation ----------------- - -- - 366 Chapter 16 Virtual Reality 16.1 Virtual Reality ------------------ - 367 Chapter 17 Web3D Tools and Networked Environment 17.1 Web3D ---------------------- 369 17.2 Distributed Interactive Simulation ---- - --- - 369 17.3 Synchronization in a DIS ----------- - - - 370 The Clock Reckoning - Wall Clock Synchronization 371 Contents xix Chapter 18 3D File Formats 18.1 Introduction 373 18.2 3D File Formats 374 18.3 3D Programming Tool Libraries 375 18.4 3D Authoring Tools 375 18.5 3D File Format Converters 375 Built-In and Plug-In VRML Exporters 376 Independent 3D File Format Converters 376 AppendixA Basic Mathematics for 3D Computer Graphics 377 A.1 Vector Operations ------------------ 377 The Length and Direction 377 Addition and Subtraction 378 Dot Product and Cross Product 379 Reflection 380 A.2 Matrix Operations ------------------ 381 Transpose 381 Addition and Subtraction 382 Multiplications 382 Square Matrix and Inverse 384 AppendixB Graphics Software Tools 387 B.1 Graphics Tools Listed by Categories --------- 387 Low-level Graphics Libraries 387 Visualization Tools 388 Modeling Tools 389 XX Contents Rendering Tools 393 Animation Tools 395 Simulation Tools 397 Virtual Reality Tools 398 Web 3D Tools 399 3D File Format Converters 400 8.2 Alphabetical Listing andDescription ofGraphics Tools 401 20-sim 401 3DCANVAS 401 3D Choreographer 402 3D Grapher 402 3D INSTANT WEBSITE 403 3DSOM Pro 403 3D STUDIO MAX 404 3D Studio VIZ 404 3D Text Maker 405 3D
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages19 Page
-
File Size-