Sign in to follow this  

Using Matrices

This topic is 3586 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 have experiences in game programming(directx and opengl) and matrixes are the "must" for the game programming as far as I know.And I have read books and tutorials about them, and now I wonder if I could use them in other project than game programming.I need a new "aspect" for this though. For example if I had a picture of white and black pixels can I load it into an 2d array(Matrix?) and rotate it 90 180 or 270 degrees ? I know how to rotate a matrix about "given degrees" but it's a vague to me because I have never used em except the locations and such in games. And can I *reflect the matrixes in the middle with a shortcut trick(like multiplying it with another matrix) or should I calculate it in programm myself with a function? It would be greatly appreciated if someone guide me about these ^^ *(Reflection: The pattern was reflected horizontally (turned into a mirror image of itself by reflecting around a vertical line in the middle of the image))

Share this post


Link to post
Share on other sites
Matrices are simply a way of organizing your data into a 2D array. If you're familiar with the various operations on a matrix, you can use a combination of these to achieve a desired effect. The operations you choose depend on the way you store the data in your matrices.

The strength to matrix systems in 3d game engines is such as the similarity between matrix multiplication and dot products, the triangle represented by 3x3 matrix, the identity matrix representing an orthogonal basis, etc...

Say you had an image, with dimensions n x m. Say you wanted to rotate the image, as you said, 90, 180, or 270 degrees. You could simply take the transpose of your matrix n times, where n = degree of turn / 90. Of course, this only works for right angle turns.

I am not familiar with other uses of matrices outside of the game development area, although I've thought of some uses. Someone else would probably do a better job explaining that.

Share this post


Link to post
Share on other sites

This topic is 3586 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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this