Game Physics Engine Development



tải về 6.67 Mb.
Chế độ xem pdf
trang14/292
Chuyển đổi dữ liệu24.10.2023
Kích6.67 Mb.
#55399
1   ...   10   11   12   13   14   15   16   17   ...   292
Ian Millington-Game Physics Engine Development-EN

T
H E
M
AT H E M AT I C S
O F
P
H Y S I C S
E
N G I N E S
Creating a physics engine involves a lot of mathematics. If you’re the kind of person
who is nervous about math, then you may find some of this material hard going. I’ve
tried throughout the book to step through the mathematical background slowly and
clearly.
If you have difficulty following the mathematics, don’t worry: you can still use the
accompanying source code for the corresponding bit. While it is better to understand
all of the engine in case you need to tweak or modify it you can still implement and
use it quite successfully without fully comprehending the math.


8
Chapter 1 Introduction
As a quick reference, the mathematical equations and formulae in the book are
also collected together in appendix D for easy location when programming a game.
If you are an experienced game developer, then the chances are you will know
a fair amount of three-dimensional (3D) mathematics: vectors, matrices, and linear
algebra. If you are relatively new to games, then these topics may be beyond your
comfort zone.
In this book I will assume you know some mathematics, and I will cover the rest.
If I assume you know something, but you aren’t confident in using it, then it would be
worth getting hold of a reference book or looking for a web tutorial before proceeding,
so you can easily follow the text.
1.4.1 T
H E
M
AT H
Y
O U
N
E E D
T O
K
N O W
I’m going to assume every potential physics developer knows some mathematics.
The most important thing to be comfortable with is algebraic notation. I will
introduce new concepts directly in notation, and if you flick through this book, you
will see many formulae written into the text.
I’ll assume you are happy to read an expression like
x
=
4
t
sin θ
2
and can understand that xt, and θ are variables and how to combine them to get a
result.
I will also assume you know some basic algebra: you should be able to understand
that, if the preceding formula is correct, then
t
=
4
x
sin θ
2
These kinds of algebraic manipulations will pop up all through the book without
explanation.
Finally I’ll assume you are familiar with trigonometry and coordinate geometry:
sines, cosines, and tangents, and their relationship to right-angled triangles and to
two-dimensional geometry in general. In particular, you should know that if we have
the triangle shown in figure 1.1, then these formulae hold:
b
sin θ
c
cos θ
b
tan θ


1.4 The Mathematics of Physics Engines

tải về 6.67 Mb.

Chia sẻ với bạn bè của bạn:
1   ...   10   11   12   13   14   15   16   17   ...   292




Cơ sở dữ liệu được bảo vệ bởi bản quyền ©hocday.com 2024
được sử dụng cho việc quản lý

    Quê hương