Vector and Matrix Maths
by Devon Ly · in Torque Game Engine · 03/27/2004 (4:03 am) · 4 replies
Can anyone recommend a book or website that gets down to the fundamentals of vector and matrix maths, i'm looking over some of the Torque source code and alot of is going over my head. Due to my poor understand not of the coding side but of the math involved
#2
Covers pretty well all the mathematics you'd need for graphics, and currently in its second edition. Has some additional material on mathematics for game physics, which didn't seem as comprehensive (but there's Eberly's book for that, and others).
I own the first edition and found it worthwhile. The good thing about the book is that it does a decent job of covering the mathematics and relating the math to graphics. The book assumes that you know the basic concepts (i.e. what a vector is, how a spatial coordinate system works) and are comfortable with algebraic notation. If I could criticize anything about the book, it's that it should contain more code examples.
One thing to watch out for with any book is that most use a column major format for the rotation submatrix in affine transforms, as does OpenGL and therefore most examples or tutorials you'll find on the net, while Torque uses row major. It helps to keep the following in mind.
www.garagegames.com/mg/forums/result.thread.php?qt=9761
The (AB)^T=B^TA^T identity will be useful when working through book examples and converting them to Torque conventions.
03/27/2004 (6:40 am)
www.amazon.com/exec/obidos/tg/detail/-/1584502770/qid=1080397971/sr=8-1/ref=pd_k...Covers pretty well all the mathematics you'd need for graphics, and currently in its second edition. Has some additional material on mathematics for game physics, which didn't seem as comprehensive (but there's Eberly's book for that, and others).
I own the first edition and found it worthwhile. The good thing about the book is that it does a decent job of covering the mathematics and relating the math to graphics. The book assumes that you know the basic concepts (i.e. what a vector is, how a spatial coordinate system works) and are comfortable with algebraic notation. If I could criticize anything about the book, it's that it should contain more code examples.
One thing to watch out for with any book is that most use a column major format for the rotation submatrix in affine transforms, as does OpenGL and therefore most examples or tutorials you'll find on the net, while Torque uses row major. It helps to keep the following in mind.
If R is a rotation matrix in row major format
(the upper 3X3 matrix in Torque's MatrixF):
RR^T=I (because R is orthogonal (actually, it's orthonormal))
RR^-1=I (by definition; N.B. R always has an inverse, and
geometrically it represents the opposite rotation)
R^T=R^-1 (it's just an algebraic identity, but the interesting
part is the interpretation: for any matrix representing
a rotation, the opposite rotation is the transpose)
R^T=C (where C is the same rotation represented in column major format)
R^T=R^-1=C (if one convention is being followed, simply using a matrix
from the other convention has the effect of reversing the rotation)This is a bit of a pain because you'll often have to convert examples from colum major to row major format on the fly, which negates all the rotations. See for example:www.garagegames.com/mg/forums/result.thread.php?qt=9761
The (AB)^T=B^TA^T identity will be useful when working through book examples and converting them to Torque conventions.
#3
03/27/2004 (4:08 pm)
I wish I had paid more attention to my university lecturer when he was going over these topics all those year ago
#4
03/27/2004 (4:11 pm)
Anyway thanks guys, I'm gonna have to do some "cramming" this week
Associate Stefan Beffy Moises
Well, I'm sure you've checked out GameDev.net
I'm sure Gamasutra has some good articles, too...