Many a time I’ve heard statements like “Games programming? 3D graphics? that requires an awful lot of maths right? and graduate level math at that…” ….and therein onwards the interest dies off due to the pre-mis-conceptions about the role that mathematics will play in games development.
For a programmer/developer/software engineer, learning the concepts of 3D mathematics needed for developing games is not an impossible task (the math we use in 3D game programming is referred to as ‘3D math’ but is actually a composite collection of topics from different mathematical disciplines as we shall see shortly). Of course, there will be some due inherent complexity, as there should be with good reason, but we tackle complexity everyday in software engineering: software architecture and patterns, databases and database design, mastering specific technologies that we use to build systems with, web site user experience, all bring about their own inherent complexities, but we master them and control them in order to reach our objectives. In that regard, what is so different about 3D mathematics that we cannot master the complexity, understand it, and apply it? That being said, this may be a good time as any to elaborate on what 3D mathematics is made up of.
The math used in the rendering of 3D games is based on a sub-set of topics derived from the mathematical branches of linear algebra, (solid) geometry, real analysis, and higher algebra. In addition, any artificial intelligence used in game logic and physics simulations, employs real world physics and mathematics as well. But we are currently concerned with the mathematics needed for drawing and rendering 3D graphics for games, and that is what we will focus on at the moment, though we will discus all aspects of game programming, including AI, in later topics.
To this end, I will be creating a thread of posts in this blog that deal with 3D math topics in a linearly progressive fashion, including code examples showing their applications where possible. This is in order to show and prove to the reader, that learning 3D mathematics is not the daunting task it is labeled to be, and also to pave the way for the game programming concepts and topics discussed in this blog that rely on mathematics. It is one of the most rewarding experiences, that when you are developing 3D computer games, you actually understand the mathematical concepts and principles behind what you are doing. For at that point, no aspect of the game is out of your control, as you know and understand exactly what is happening under the hood.