Game Development Reference
In-Depth Information
F IGURE 1.1
Trigonometry and coordinate geometry.
Especially when a is of length 1, we will use these results tens of times in the topic
without further discussion.
1.4.2
T HE M ATH W E ' LL R EVIEW
Because the experience of developers varies so much, I will not assume that you are
familiar with three-dimensional mathematics to the same extent. This isn't taught in
high schools and is often quite specialized to computer graphics. If you have been a
game developer for a long time, then you will no doubt be able to skip through these
reviews as they arise.
We will cover the way vectors work in the next chapter, including the way a three-
dimensional coordinate system relates to the two-dimensional mathematics of high
school geometry. I will review the way vectors can be combined, including the scalar
and vector product, and their relationship to positions and directions in three dimen-
sions.
We will also review matrices. Matrices are used to transform vectors: moving them
in space or changing their coordinate systems. We will also see matrices called “ten-
sors” at a couple of points, which have different uses but the same structure. We will
review the mathematics of matrices, including matrix multiplication, transformation
of vectors, matrix inversion, and basis changes.
These topics are fundamental to any kind of 3D programming and are used ex-
tensively in graphics development and in many AI algorithms too. Most of you will
be quite familiar with them, and there are comprehensive topics available that cover
them in great depth.
Each of these topics is reviewed lightly once in this topic, but afterward I'll assume
that you are happy to see the results used directly. They are the bread-and-butter
topics for physics development, so it would be inconvenient to step through them
each time they arise.
If you find later sections difficult, it is worth flicking back in the topic and reread-
ing the reviews, or finding a more comprehensive reference to linear algebra or com-
puter graphics and teaching yourself how they work.