Main Site Links Resources Tutorials
News VB Gaming Code Downloads DirectX 7
Contact Webmaster VB Programming Product Reviews DirectX 8
  General Multimedia Articles DirectX 9

Mathematics for 3D Game Programming & Computer Graphics, Second Edition
Author: Eric Lengyel
Publisher: Charles Rivers Media
ISBN: 1-58450-277-0
Purchasing: [Amazon.Com] - US$49.95, [] - UK£23.45, [TransAtlantic Publishers] - UK£33.50
Reviewed: 30th January 2004

Front Cover Shot:


This is the review of the second edition of one of the more popular mathematics texts (first edition reviewed here). Amongst game/multimedia developers the first edition became a very popular source - providing the 'nitty-gritty' equations that we need to implement algorithms, yet still giving us the background theory and proofs necessary; and most importantly - it was a readable book. By this I mean that, unlike most maths texts, it was comprehendible by mere mortals.


As just mentioned, the readable nature of the first edition (and this newer second edition) is really a shining light. Eric Lengyel is obviously a talented mathematician, yet also possess the rare talent of being able to teach the subject to people who aren't on the same level he is.

The great thing about this book is that you can read it in one of two ways: as a learning text book OR a reference book. The writing style is clear, relevant and to the point - you can read it cover-to-cover and gain a greater understanding of 3D mathematics. Conversely you can also use it as a reference text (useful for the more advanced programmers around); each chapter closes with a summary of all the equations derived/covered in the chapter-body so if you're just looking up the equation you can, but if you need to see the proof you can dive back into the chapter and read the explanation and proof.

New Sections

As is traditional with second-editions, the author has added a couple of new chapters to the text as well as provide general revisions (the layout/style of the book remains unchanged).

The section that seems to have received the most work is that dedicated to shadow rendering (more specifically, stencil shadow rendering). This is a very popular area at the moment that is quite mathematically intensive - whilst its no longer the cutting edge technique, it is probably the most commonly used. I personally doubt that stencil shadows will "disappear" anytime in the immediate future, but it isn't the most forward-looking chapter - particularly given that projection shadow mapping is considered to be the "next thing" and is far more dependent on fancy mathematics. Also, a printed version is very nice, but you can read essentially the same article by Lengyel on Gamasutra (here) that includes many of the same diagrams found in this book.

The other major addition to this book is the topic regarding numerical methods - given the ever more complex physics engines in use today, numerical approximations are incredibly important in simplifying complex physics into real-time calculable equations.

The final point to make regarding the new additions is that of the graphics pipeline overview; this is something that in my opinion should have been in the first edition. It is conceivable that the author added it to this edition after comments from readers of the first. Given the books dependence on the graphics processing capabilities of a desktop computer, a 'scene-setting' chapter giving an overview of what actually happened and where the various parts fitted together really should have been included from the start. Although, now that is it is present, its probably best not to complain!


As with the original book, it is worthwhile noting that you do need to be a confident mathematician to get anywhere near the most out of this book. That isn't to say you have to be a great mathematician - just a capable one that can handle a bit of hairy notation and derivation here-and-there. I consider myself a competent mathematician, but there are several proofs in this book that I plain don't understand - yet I can still jump to the conclusion (or derived equation) and use that accordingly; treating the derivation/origin as a bit of a black box.

The big pre-requisite that annoys me with this book is that of OpenGL. I fully appreciate that a book like this needs to choose a platform that it can demonstrate some of the more practical aspects with, and that OpenGL is a good choice here. Yet it is never fully explained / introduced.

I am, as I presume many readers of this site are, a DirectX programmer - and whilst there are many similarities between the two, there are too many OpenGL references thrown around in this book that don't have an adequate explanation. To understand them fully I needed to look them up online in the OpenGL API references. For example (in the shadows section): "glStencilOp( GL_KEEP, GL_KEEP, GL_DECR)" - I can make a reasonable guess given the context what this does, but without any explanation of this line of code in the text it is a little mystifying.

In Conclusion

This text is as good, if not better, than the first edition and for those that use the first edition heavily it may well be worth the 'upgrade'. However, it wears best with experience - both experience reading/using this book, and general graphics/programming/maths experience. Several of the areas that make this text shine by bringing complex maths to the masses will still only be truly appreciated by those that are of an intermediate to advanced level.

The added sections are useful, and they do complement the rest of the text well - but I wouldn't say they were essential; more of a case that now they are included along with the original material there is very little that this book does not cover.

Good Things Bad Things
• More good content, unlike some second editions, this one adds rather than replaces. • One of the better new sections is already freely available online
• Good new sections, with these now included, there is very little that this book does not cover. • Some of the new content really should have been in the first edition, so it's not so special it's included now.
• Still maintains its readability and succeeds in bringing 3D-maths to the masses • Pretty heavy on the mathematics at times : it is best if you are confident in mathematics.
• Can be treated as a reference as well as a learning aide • Dependency on OpenGL isn't explained as well as it could be.
• In depth for the proofs, but still summarises important facts/equations  
• Excellent amount of content for the asking price.  


DirectX 4 VB © 2000 Jack Hoxley. All rights reserved.
Reproduction of this site and it's contents, in whole or in part, is prohibited,
except where explicitly stated otherwise.
Design by Mateo
Contact Webmaster