Matrices
Ah, the matrix, by far the most esoteric and potentially “frightening” aspect of 3D programmers to the beginners who are just starting out. Things just appear so complicated when you jump in without a firm grasp of what's going on, but in reality, matrix math can be simple after you get used to it.
By definition, a matrix is a rectangular array where each entry contains a number, such as the following:
In this example, the first matrix is a 4x4 matrix and the second, a 3x3 matrix. (The numbers are completely arbitrary and have no bearing on the matrix itself.) Matrices are not required to be square; you could just as easily have a 4x1 ...
Get Beginning 3D Game Programming now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.