在好例子网,分享、交流、成长!
您当前所在位置:首页Others 开发实例Clojure → Mathematics for 3D Game Programming&Computer Graphics

Mathematics for 3D Game Programming&Computer Graphics

Clojure

下载此实例
  • 开发语言:Others
  • 实例大小:9.14M
  • 下载次数:11
  • 浏览次数:25
  • 发布时间:2023-03-31
  • 实例类别:Clojure
  • 发 布 人:monho
  • 文件格式:.pdf
  • 所需积分:2

实例介绍

【实例简介】Mathematics for 3D Game Programming&Computer Graphics

【实例截图】

【核心代码】

Contents
Preface xiii
What’s New in the Third Edition xiii
Contents Overview xiv
Website and Code Listings xvii
Notational Conventions xvii
Chapter 1  The Rendering Pipeline 1
1.1 Graphics Processors 1
1.2 Vertex Transformation 4
1.3 Rasterization and Fragment Operations 6
Chapter 2  Vectors 11
2.1 Vector Properties 11
2.2 The Dot Product 15
2.3 The Cross Product 19
2.4 Vector Spaces 26
Chapter 2 Summary 29
Exercises for Chapter 2 30
Chapter 3  Matrices 31
3.1 Matrix Properties 31
3.2 Linear Systems 34
3.3 Matrix Inverses 40
3.4 Determinants 47
3.5 Eigenvalues and Eigenvectors 54
3.6 Diagonalization 58
iv  Contents
Chapter 3 Summary 62
Exercises for Chapter 3 64
Chapter 4  Transforms 67
4.1 Linear Transformations 67
4.1.1 Orthogonal Matrices 68
4.1.2 Handedness 70
4.2 Scaling Transforms 70
4.3 Rotation Transforms 71
4.3.1 Rotation About an Arbitrary Axis 74
4.4 Homogeneous Coordinates 75
4.4.1 Four-Dimensional Transforms 76
4.4.2 Points and Directions 77
4.4.3 Geometrical Interpretation of the w Coordinate 78
4.5 Transforming Normal Vectors 78
4.6 Quaternions 80
4.6.1 Quaternion Mathematics 80
4.6.2 Rotations with Quaternions 82
4.6.3 Spherical Linear Interpolation 86
Chapter 4 Summary 89
Exercises for Chapter 4 91
Chapter 5  Geometry for 3D Engines 93
5.1 Lines in 3D Space 93
5.1.1 Distance Between a Point and a Line 93
5.1.2 Distance Between Two Lines 94
5.2 Planes in 3D Space 97
5.2.1 Intersection of a Line and a Plane 98
5.2.2 Intersection of Three Planes 99
5.2.3 Transforming Planes 101
5.3 The View Frustum 102
5.3.1 Field of View 103
5.3.2 Frustum Planes 106
5.4 Perspective-Correct Interpolation 107
5.4.1 Depth Interpolation 108
5.4.2 Vertex Attribute Interpolation 110
5.5 Projections 111
5.5.1 Perspective Projections 112
5.5.2 Orthographic Projections 116
  v
5.5.3 Extracting Frustum Planes 118
5.6 Reflections and Oblique Clipping 120
Chapter 5 Summary 126
Exercises for Chapter 5 129
Chapter 6  Ray Tracing 131
6.1 Root Finding 131
6.1.1 Quadratic Polynomials 131
6.1.2 Cubic Polynomials 132
6.1.3 Quartic Polynomials 135
6.1.4 Newton’s Method 136
6.1.5 Refinement of Reciprocals and Square Roots 139
6.2 Surface Intersections 140
6.2.1 Intersection of a Ray and a Triangle 141
6.2.2 Intersection of a Ray and a Box 143
6.2.3 Intersection of a Ray and a Sphere 144
6.2.4 Intersection of a Ray and a Cylinder 145
6.2.5 Intersection of a Ray and a Torus 147
6.3 Normal Vector Calculation 148
6.4 Reflection and Refraction Vectors 149
6.4.1 Reflection Vector Calculation 150
6.4.2 Refraction Vector Calculation 151
Chapter 6 Summary 153
Exercises for Chapter 6 154
Chapter 7  Lighting and Shading 157
7.1 RGB Color 157
7.2 Light Sources 158
7.2.1 Ambient Light 158
7.2.2 Directional Light Sources 159
7.2.3 Point Light Sources 159
7.2.4 Spot Light Sources 160
7.3 Diffuse Reflection 161
7.4 Specular Reflection 162
7.5 Texture Mapping 164
7.5.1 Standard Texture Maps 166
7.5.2 Projective Texture Maps 167
7.5.3 Cube Texture Maps 169
7.5.4 Filtering and Mipmaps 171
vi  Contents
7.6 Emission 174
7.7 Shading Models 175
7.7.1 Calculating Normal Vectors 175
7.7.2 Gouraud Shading 176
7.7.3 Blinn-Phong Shading 177
7.8 Bump Mapping 178
7.8.1 Bump Map Construction 178
7.8.2 Tangent Space 180
7.8.3 Calculating Tangent Vectors 180
7.8.4 Implementation 185
7.9 A Physical Reflection Model 187
7.9.1 Bidirectional Reflectance Distribution Functions 187
7.9.2 Cook-Torrance Illumination 191
7.9.3 The Fresnel Factor 192
7.9.4 The Microfacet Distribution Function 195
7.9.5 The Geometrical Attenuation Factor 198
7.9.6 Implementation 200
Chapter 7 Summary 205
Exercises for Chapter 7 209
Chapter 8  Visibility Determination 211
8.1 Bounding Volume Construction 211
8.1.1 Principal Component Analysis 212
8.1.2 Bounding Box Construction 215
8.1.3 Bounding Sphere Construction 217
8.1.4 Bounding Ellipsoid Construction 218
8.1.5 Bounding Cylinder Construction 220
8.2 Bounding Volume Tests 221
8.2.1 Bounding Sphere Test 221
8.2.2 Bounding Ellipsoid Test 222
8.2.3 Bounding Cylinder Test 226
8.2.4 Bounding Box Test 228
8.3 Spatial Partitioning 230
8.3.1 Octrees 230
8.3.2 Binary Space Partitioning Trees 232
8.4 Portal Systems 235
8.4.1 Portal Clipping 236
8.4.2 Reduced View Frustums 238
  vii
Chapter 8 Summary 240
Exercises for Chapter 8 244
Chapter 9  Polygonal Techniques 245
9.1 Depth Value Offset 245
9.1.1 Projection Matrix Modification 246
9.1.2 Offset Value Selection 247
9.1.3 Implementation 248
9.2 Decal Application 249
9.2.1 Decal Mesh Construction 250
9.2.2 Polygon Clipping 252
9.3 Billboarding 254
9.3.1 Unconstrained Quads 254
9.3.2 Constrained Quads 257
9.3.3 Polyboards 258
9.4 Polygon Reduction 260
9.5 T-Junction Elimination 264
9.6 Triangulation 267
Chapter 9 Summary 274
Exercises for Chapter 9 277
Chapter 10  Shadows 279
10.1 Shadow Casting Set 279
10.2 Shadow Mapping 281
10.2.1 Rendering the Shadow Map 281
10.2.2 Rendering the Main Scene 283
10.2.3 Self-Shadowing 284
10.3 Stencil Shadows 286
10.3.1 Algorithm Overview 286
10.3.2 Infinite View Frustums 291
10.3.3 Silhouette Determination 294
10.3.4 Shadow Volume Construction 299
10.3.5 Determining Cap Necessity 303
10.3.6 Rendering Shadow Volumes 307
10.3.7 Scissor Optimization 309
Chapter 10 Summary 314
Exercises for Chapter 10 315
viii  Contents
Chapter 11  Curves and Surfaces 317
11.1 Cubic Curves 317
11.2 Hermite Curves 320
11.3 Bézier Curves 322
11.3.1 Cubic Bézier Curves 322
11.3.2 Bézier Curve Truncation 326
11.3.3 The de Casteljau Algorithm 327
11.4 Catmull-Rom Splines 329
11.5 Cubic Splines 331
11.6 B-Splines 334
11.6.1 Uniform B-Splines 335
11.6.2 B-Spline Globalization 340
11.6.3 Nonuniform B-Splines 342
11.6.4 NURBS 345
11.7 Bicubic Surfaces 348
11.8 Curvature and Torsion 350
Chapter 11 Summary 355
Exercises for Chapter 11 357
Chapter 12  Collision Detection 361
12.1 Plane Collisions 361
12.1.1 Collision of a Sphere and a Plane 362
12.1.2 Collision of a Box and a Plane 364
12.1.3 Spatial Partitioning 366
12.2 General Sphere Collisions 366
12.3 Sliding 371
12.4 Collision of Two Spheres 372
Chapter 12 Summary 376
Exercises for Chapter 12 378
Chapter 13  Linear Physics 379
13.1 Position Functions 379
13.2 Second-Order Differential Equations 381
13.2.1 Homogeneous Equations 381
13.2.2 Nonhomogeneous Equations 385
13.2.3 Initial Conditions 388
13.3 Projectile Motion 390
13.4 Resisted Motion 394
  ix
13.5 Friction 396
Chapter 13 Summary 400
Exercises for Chapter 13 402
Chapter 14  Rotational Physics 405
14.1 Rotating Environments 405
14.1.1 Angular Velocity 405
14.1.2 The Centrifugal Force 407
14.1.3 The Coriolis Force 408
14.2 Rigid Body Motion 410
14.2.1 Center of Mass 410
14.2.2 Angular Momentum and Torque 413
14.2.3 The Inertia Tensor 414
14.2.4 Principal Axes of Inertia 422
14.2.5 Transforming the Inertia Tensor 426
14.3 Oscillatory Motion 430
14.3.1 Spring Motion 430
14.3.2 Pendulum Motion 434
Chapter 14 Summary 436
Exercises for Chapter 14 438
Chapter 15  Fluid and Cloth Simulation 443
15.1 Fluid Simulation 443
15.1.1 The Wave Equation 443
15.1.2 Approximating Derivatives 447
15.1.3 Evaluating Surface Displacement 450
15.1.4 Implementation 453
15.2 Cloth Simulation 457
15.2.1 The Spring System 457
15.2.2 External Forces 459
15.2.3 Implementation 459
Chapter 15 Summary 461
Exercises for Chapter 15 462
Chapter 16  Numerical Methods 463
16.1 Trigonometric Functions 463
16.2 Linear Systems 465
16.2.1 Triangular Systems 465
16.2.2 Gaussian Elimination 467
x  Contents
16.2.3 LU Decomposition 470
16.2.4 Error Reduction 477
16.2.5 Tridiagonal Systems 479
16.3 Eigenvalues and Eigenvectors 483
16.4 Ordinary Differential Equations 490
16.4.1 Euler’s Method 490
16.4.2 Taylor Series Method 492
16.4.3 Runge-Kutta Method 493
16.4.4 Higher-Order Differential Equations 495
Chapter 16 Summary 496
Exercises for Chapter 16 498
Appendix A Complex Numbers 499
A.1 Definition 499
A.2 Addition and Multiplication 499
A.3 Conjugates and Inverses 500
A.4 The Euler Formula 501
Appendix B Trigonometry Reference 505
B.1 Function Definitions 505
B.2 Symmetry and Phase Shifts 506
B.3 Pythagorean Identities 507
B.4 Exponential Identities 507
B.5 Inverse Functions 508
B.6 Laws of Sines and Cosines 509
Appendix C Coordinate Systems 513
C.1 Cartesian Coordinates 513
C.2 Cylindrical Coordinates 514
C.3 Spherical Coordinates 516
C.4 Generalized Coordinates 520
Appendix D Taylor Series 523
D.1 Derivation 523
D.2 Power Series 525
D.3 The Euler Formula 526
Appendix E Answers to Exercises 529
Chapter 2 529
  xi
Chapter 3 529
Chapter 4 530
Chapter 5 530
Chapter 6 530
Chapter 7 531
Chapter 8 531
Chapter 9 531
Chapter 10 531
Chapter 11 532
Chapter 12 532
Chapter 13 532
Chapter 14 533
Chapter 15 534
Chapter 16 534
Index 535

网友评论

发表评论

(您的评论需要经过审核才能显示)

查看所有0条评论>>

小贴士

感谢您为本站写下的评论,您的评论对其它用户来说具有重要的参考价值,所以请认真填写。

  • 类似“顶”、“沙发”之类没有营养的文字,对勤劳贡献的楼主来说是令人沮丧的反馈信息。
  • 相信您也不想看到一排文字/表情墙,所以请不要反馈意义不大的重复字符,也请尽量不要纯表情的回复。
  • 提问之前请再仔细看一遍楼主的说明,或许是您遗漏了。
  • 请勿到处挖坑绊人、招贴广告。既占空间让人厌烦,又没人会搭理,于人于己都无利。

关于好例子网

本站旨在为广大IT学习爱好者提供一个非营利性互相学习交流分享平台。本站所有资源都可以被免费获取学习研究。本站资源来自网友分享,对搜索内容的合法性不具有预见性、识别性、控制性,仅供学习研究,请务必在下载后24小时内给予删除,不得用于其他任何用途,否则后果自负。基于互联网的特殊性,平台无法对用户传输的作品、信息、内容的权属或合法性、安全性、合规性、真实性、科学性、完整权、有效性等进行实质审查;无论平台是否已进行审查,用户均应自行承担因其传输的作品、信息、内容而可能或已经产生的侵权或权属纠纷等法律责任。本站所有资源不代表本站的观点或立场,基于网友分享,根据中国法律《信息网络传播权保护条例》第二十二与二十三条之规定,若资源存在侵权或相关问题请联系本站客服人员,点此联系我们。关于更多版权及免责申明参见 版权及免责申明

;
报警