# Using Matrices

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

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

1. 1
Rutin
42
2. 2
3. 3
4. 4
5. 5

• 9
• 27
• 20
• 14
• 14
• ### Forum Statistics

• Total Topics
633386
• Total Posts
3011606
• ### Who's Online (See full list)

There are no registered users currently online

×