Jump to content
  • Advertisement
Sign in to follow this  

3x3 Matrix for 2D ?

This topic is 4348 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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...

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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).

Share this post


Link to post
Share on other sites
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?

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!