在好例子网,分享、交流、成长!
您当前所在位置:首页Others 开发实例一般编程问题 → 3D Math Primer for graphics and game development

3D Math Primer for graphics and game development

一般编程问题

下载此实例
  • 开发语言:Others
  • 实例大小:20.40M
  • 下载次数:18
  • 浏览次数:71
  • 发布时间:2022-02-25
  • 实例类别:一般编程问题
  • 发 布 人:sevenlee
  • 文件格式:.pdf
  • 所需积分:2

实例介绍

【实例简介】3D Math Primer for graphics and game development

【实例截图】

【核心代码】

Contents
Acknowledgments xiii
Introduction xv
1 Cartesian Coordinate Systems 1
1.1 1D Mathematics . . . . . . . . . . . . . . . . . . . . . . 2
1.2 2D Cartesian Space . . . . . . . . . . . . . . . . . . . . . 5
1.3 3D Cartesian Space . . . . . . . . . . . . . . . . . . . . . 12
1.4 Odds and Ends . . . . . . . . . . . . . . . . . . . . . . . 19
1.5 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
2 Vectors 31
2.1 Mathematical Definition of Vector, and Other Boring Stuff 32
2.2 Geometric Definition of Vector . . . . . . . . . . . . . . 34
2.3 Specifying Vectors with Cartesian Coordinates . . . . . 36
2.4 Vectors versus Points . . . . . . . . . . . . . . . . . . . . 39
2.5 Negating a Vector . . . . . . . . . . . . . . . . . . . . . . 43
2.6 Vector Multiplication by a Scalar . . . . . . . . . . . . . 45
2.7 Vector Addition and Subtraction . . . . . . . . . . . . . 47
2.8 Vector Magnitude (Length) . . . . . . . . . . . . . . . . 51
2.9 Unit Vectors . . . . . . . . . . . . . . . . . . . . . . . . . 53
2.10 The Distance Formula . . . . . . . . . . . . . . . . . . . 55
2.11 Vector Dot Product . . . . . . . . . . . . . . . . . . . . . 56
2.12 Vector Cross Product . . . . . . . . . . . . . . . . . . . . 66
2.13 Linear Algebra Identities . . . . . . . . . . . . . . . . . . 70
2.14 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
3 Multiple Coordinate Spaces 79
3.1 Why Bother with Multiple Coordinate Spaces? . . . . . 80
3.2 Some Useful Coordinate Spaces . . . . . . . . . . . . . . 81
3.3 Basis Vectors and Coordinate Space Transformations . . 86
3.4 Nested Coordinate Spaces . . . . . . . . . . . . . . . . . 106
vii
viii Contents
3.5 In Defense of Upright Space . . . . . . . . . . . . . . . . 108
3.6 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . 109
4 Introduction to Matrices 113
4.1 Mathematical Definition of Matrix . . . . . . . . . . . . 113
4.2 Geometric Interpretation of Matrix . . . . . . . . . . . . 124
4.3 The Bigger Picture of Linear Algebra . . . . . . . . . . . 130
4.4 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . 132
5 Matrices and Linear Transformations 137
5.1 Rotation . . . . . . . . . . . . . . . . . . . . . . . . . . . 138
5.2 Scale . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 144
5.3 Orthographic Projection . . . . . . . . . . . . . . . . . . 148
5.4 Reflection . . . . . . . . . . . . . . . . . . . . . . . . . . 151
5.5 Shearing . . . . . . . . . . . . . . . . . . . . . . . . . . . 152
5.6 Combining Transformations . . . . . . . . . . . . . . . . 153
5.7 Classes of Transformations . . . . . . . . . . . . . . . . . 154
5.8 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . 159
6 More on Matrices 161
6.1 Determinant of a Matrix . . . . . . . . . . . . . . . . . . 161
6.2 Inverse of a Matrix . . . . . . . . . . . . . . . . . . . . . 168
6.3 Orthogonal Matrices . . . . . . . . . . . . . . . . . . . . 171
6.4 4 × 4 Homogeneous Matrices . . . . . . . . . . . . . . . 176
6.5 4 × 4 Matrices and Perspective Projection . . . . . . . . 183
6.6 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . 189
7 Polar Coordinate Systems 191
7.1 2D Polar Space . . . . . . . . . . . . . . . . . . . . . . . 191
7.2 Why Would Anybody Use Polar Coordinates? . . . . . . 201
7.3 3D Polar Space . . . . . . . . . . . . . . . . . . . . . . . 203
7.4 Using Polar Coordinates to Specify Vectors . . . . . . . 213
7.5 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . 214
8 Rotation in Three Dimensions 217
8.1 What Exactly is “Orientation”? . . . . . . . . . . . . . . 218
8.2 Matrix Form . . . . . . . . . . . . . . . . . . . . . . . . 220
8.3 Euler Angles . . . . . . . . . . . . . . . . . . . . . . . . . 229
8.4 Axis-Angle and Exponential Map Representations . . . . 244
8.5 Quaternions . . . . . . . . . . . . . . . . . . . . . . . . . 246
8.6 Comparison of Methods . . . . . . . . . . . . . . . . . . 273
8.7 Converting between Representations . . . . . . . . . . . 275
8.8 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . 291
Contents ix
9 Geometric Primitives 295
9.1 Representation Techniques . . . . . . . . . . . . . . . . . 295
9.2 Lines and Rays . . . . . . . . . . . . . . . . . . . . . . . 297
9.3 Spheres and Circles . . . . . . . . . . . . . . . . . . . . . 303
9.4 Bounding Boxes . . . . . . . . . . . . . . . . . . . . . . . 304
9.5 Planes . . . . . . . . . . . . . . . . . . . . . . . . . . . . 311
9.6 Triangles . . . . . . . . . . . . . . . . . . . . . . . . . . . 317
9.7 Polygons . . . . . . . . . . . . . . . . . . . . . . . . . . . 332
9.8 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . 339
10 Mathematical Topics from 3D Graphics 343
10.1 How Graphics Works . . . . . . . . . . . . . . . . . . . . 345
10.2 Viewing in 3D . . . . . . . . . . . . . . . . . . . . . . . . 362
10.3 Coordinate Spaces . . . . . . . . . . . . . . . . . . . . . 369
10.4 Polygon Meshes . . . . . . . . . . . . . . . . . . . . . . . 381
10.5 Texture Mapping . . . . . . . . . . . . . . . . . . . . . . 393
10.6 The Standard Local Lighting Model . . . . . . . . . . . 396
10.7 Light Sources . . . . . . . . . . . . . . . . . . . . . . . . 414
10.8 Skeletal Animation . . . . . . . . . . . . . . . . . . . . . 424
10.9 Bump Mapping . . . . . . . . . . . . . . . . . . . . . . . 431
10.10 The Real-Time Graphics Pipeline . . . . . . . . . . . . . 438
10.11 Some HLSL Examples . . . . . . . . . . . . . . . . . . . 457
10.12 Further Reading . . . . . . . . . . . . . . . . . . . . . . 475
10.13 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . 476
11 Mechanics 1: Linear Kinematics and Calculus 479
11.1 Overview and Other Expectation-Reducing Remarks . . 479
11.2 Basic Quantities and Units . . . . . . . . . . . . . . . . 483
11.3 Average Velocity . . . . . . . . . . . . . . . . . . . . . . 486
11.4 Instantaneous Velocity and the Derivative . . . . . . . . 490
11.5 Acceleration . . . . . . . . . . . . . . . . . . . . . . . . . 513
11.6 Motion under Constant Acceleration . . . . . . . . . . . 516
11.7 The Integral . . . . . . . . . . . . . . . . . . . . . . . . . 530
11.8 Uniform Circular Motion . . . . . . . . . . . . . . . . . . 542
11.9 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . 549
12 Mechanics 2: Linear and Rotational Dynamics 553
12.1 Newton’s Three Laws . . . . . . . . . . . . . . . . . . . . 554
12.2 Some Simple Force Laws . . . . . . . . . . . . . . . . . . 562
12.3 Momentum . . . . . . . . . . . . . . . . . . . . . . . . . 581
12.4 Impulsive Forces and Collisions . . . . . . . . . . . . . . 590
12.5 Rotational Dynamics . . . . . . . . . . . . . . . . . . . . 603
12.6 Real-Time Rigid Body Simulators . . . . . . . . . . . . . 621
x Contents
12.7 Suggested Reading . . . . . . . . . . . . . . . . . . . . . 639
12.8 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . 640
13 Curves in 3D 645
13.1 Parametric Polynomial Curves . . . . . . . . . . . . . . 646
13.2 Polynomial Interpolation . . . . . . . . . . . . . . . . . . 653
13.3 Hermite Curves . . . . . . . . . . . . . . . . . . . . . . . 665
13.4 B´ ezier Curves . . . . . . . . . . . . . . . . . . . . . . . . 670
13.5 Subdivision . . . . . . . . . . . . . . . . . . . . . . . . . 685
13.6 Splines . . . . . . . . . . . . . . . . . . . . . . . . . . . . 690
13.7 Hermite and B´ ezier Splines . . . . . . . . . . . . . . . . 694
13.8 Continuity . . . . . . . . . . . . . . . . . . . . . . . . . . 697
13.9 Automatic Tangent Control . . . . . . . . . . . . . . . . 702
13.10 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . 711
14 Afterword 715
14.1 What Next? . . . . . . . . . . . . . . . . . . . . . . . . . 715
14.2 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . 715
A Geometric Tests 717
A.1 Closest Point on 2D Implicit Line . . . . . . . . . . . . . 717
A.2 Closest Point on a Parametric Ray . . . . . . . . . . . . 718
A.3 Closest Point on a Plane . . . . . . . . . . . . . . . . . . 719
A.4 Closest Point on a Circle or Sphere . . . . . . . . . . . . 719
A.5 Closest Point in an AABB . . . . . . . . . . . . . . . . . 720
A.6 Intersection Tests . . . . . . . . . . . . . . . . . . . . . . 720
A.7 Intersection of Two Implicit Lines in 2D . . . . . . . . . 721
A.8 Intersection of Two Rays in 3D . . . . . . . . . . . . . . 722
A.9 Intersection of a Ray and Plane . . . . . . . . . . . . . . 724
A.10 Intersection of an AABB and Plane . . . . . . . . . . . . 725
A.11 Intersection of Three Planes . . . . . . . . . . . . . . . . 726
A.12 Intersection of Ray and a Circle or Sphere . . . . . . . . 727
A.13 Intersection of Two Circles or Spheres . . . . . . . . . . 729
A.14 Intersection of a Sphere and AABB . . . . . . . . . . . . 731
A.15 Intersection of a Sphere and a Plane . . . . . . . . . . . 732
A.16 Intersection of a Ray and a Triangle . . . . . . . . . . . 734
A.17 Intersection of Two AABBs . . . . . . . . . . . . . . . . 737
A.18 Intersection of a Ray and an AABB . . . . . . . . . . . 740
B Answers to the Exercises 745
B.1 Chapter 1 . . . . . . . . . . . . . . . . . . . . . . . . . . 745
B.2 Chapter 2 . . . . . . . . . . . . . . . . . . . . . . . . . . 746
B.3 Chapter 3 . . . . . . . . . . . . . . . . . . . . . . . . . . 758
Contents xi
B.4 Chapter 4 . . . . . . . . . . . . . . . . . . . . . . . . . . 759
B.5 Chapter 5 . . . . . . . . . . . . . . . . . . . . . . . . . . 763
B.6 Chapter 6 . . . . . . . . . . . . . . . . . . . . . . . . . . 765
B.7 Chapter 7 . . . . . . . . . . . . . . . . . . . . . . . . . . 767
B.8 Chapter 8 . . . . . . . . . . . . . . . . . . . . . . . . . . 772
B.9 Chapter 9 . . . . . . . . . . . . . . . . . . . . . . . . . . 774
B.10 Chapter 10 . . . . . . . . . . . . . . . . . . . . . . . . . 779
B.11 Chapter 11 . . . . . . . . . . . . . . . . . . . . . . . . . 781
B.12 Chapter 12 . . . . . . . . . . . . . . . . . . . . . . . . . 784
B.13 Chapter 13 . . . . . . . . . . . . . . . . . . . . . . . . . 792
B.14 Chapter 14 . . . . . . . . . . . . . . . . . . . . . . . . . 799
Bibliography 801
Index 807

网友评论

发表评论

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

查看所有0条评论>>

小贴士

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

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

关于好例子网

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

;
报警