3x3 Matrix for 2D ?

Started by
2 comments, last by Christopher Harris 17 years, 9 months ago
I was skimming across the internet looking for 2D matrix math examples, when I found Sam's Publishing website... they had something about it on there for some reason. I looked at the tutorial and one thing stuck out to me. Why are they using a 2D vector with components x, y, and w? and why are they using a 3x3? I'm also curious as to what w ever did in the first place...
Advertisement
The short version: w is used in homogenous coordinate systems. Basically, it distinguishes between point vectors and direction/magnitude vectors; points having a w of 1 and direction/magnitude have a w of 0. This allows transformations to be applied in a uniform manner to both types of vectors.
If you are curious and know some linear algebra you may want to look up "projective geometry" on the internet, to see where the theory comes from. It's also a lot easier to visualise homogeneous coordinates in 2d (projected on the surface of a 3d hemisphere) than in 3d (projected onto a 4d hyperspehere).
"Most people think, great God will come from the sky, take away everything, and make everybody feel high" - Bob Marley
Thanks SiCrane.

I'm still curious however, where can I find tutorials or referances of 2D Matrix maths. I'm implementing my own math system, no questions. Its a learning experience. I'm going to be using it for transforming shapes (arrays of points). Anyone have a nice site?

This topic is closed to new replies.

Advertisement