Matrices Used In Computer Graphics
A limited time offer! Get a custom sample essay written according to your requirements urgent 3h delivery guaranteedOrder Now
Every one of us uses matrices nearly everyday in our lives and probably unaware of it. Matrices are commonly used in computers for their 3D graphics. Most of the matrices that are used are either 3×3 or 4×4 matrices and are computed by either rotation matrices or translation matrices. The matrices that are used are an array that holds numbers, commonly called a 3×3 array or 4×4 array.
Examples of 3×3 and 4×4 matrices.
The reason that matrices are used is because matrices have some very interesting properties. One of these is the ability to concatenate many mathematical operations into one single matrix. This means that with just one matrix it is possible to perform the task of literally hundreds of operations within that one single matrix. Another reason that matrices are used is because they are very easy to use and a matrix multiply routine is really all you need to get all the desired results. The algebra involved is also fairly well hidden from the programmer of the graphics, which, therefore, makes the code much easier to read and thus easier to understand. Another good characteristic of matrices is that they are very intuitive. This means that someone can look at a matrix and be able to actually visualize something as complex as its rotation, just by the way the numbers are arranged in the matrix.
In computer programming of its graphics the matrices are simply used a multidimensional array. The only thing that is even the least bit complicated, in theory, is how to multiply the matrix and what to multiply it. This is how they are able to concentrate multiple matrices into one single matrix. The following is how you would use matrix multiplication on a 4×4 matrix to another 4×4 matrix:
Although this may look complicated at first glance, it really isn’t. If you look closely at it and you’ll see that it is really just a simple pattern. Here are some of the matrices that are used in computer graphics in order to make the objects they represent turn into 3D objects.
This matrix represents the rotation on the x-axis.
This matrix represents the rotation on the y-axis.
This matrix represents the rotation on the z-axis.
With these matrices it is able to make an object rotate and freely move within a 3D space, given by the coordinates of the x-axis, y-axis, and z-axis in 3Dspace. There are many can different operations that can be used, including 3D algebra operations, that will make it possible to put them all into a single matrix. The good thing about this is that if it is put into one matrix it will be much smaller. This is helpful because it would reduce the amount of space it takes up in the computer, thus making the computer to be able to run faster and make the graphics sharper and clearer.
In the end when the matrices are ready to be used by the computer is where the properties of matrices really give an advantage to the programmer. If they would want to perform all the operations in the final matrix to a 3D point, all they have to do is multiply the matrix and the point in the 3D space where it will occur. The result of this will be a 3D point transformed by the matrix. Here’s what that looks like:
So with the many properties of matrices it is easy to see why it would be an advantage to program computer graphics by using matrices. It enables the programmer to use large sums of numbers, but not take up an extremely large portion of the computer’s memory. With the ability that matrices have to handle extremely large numbers with little effort ends up being very beneficial to programmers using it to create 3D graphics. This is just one of the many beneficial ways that matrices and linear algebra can be used in the “real world.”