Matrix x Vertex (in this order !!) = TransformedVertex This is done by multiplying the vertex with the matrix : They will allow us to transform our (x,y,z,w) vertices. In 3D graphics we will mostly use 4x4 matrices. For instance, a 2x3 matrix can look like this : Simply put, a matrix is an array of numbers with a predefined number of rows and colums. Transformation matrices An introduction to matrices Homogeneous coordinates allow us to use a single mathematical formula to deal with these two cases. What could mean “translate a direction” ? Not much. However, for a translation (when you move the point in a certain direction), things are different. When you rotate a point or a direction, you get the same result. What difference does this make ? Well, for a rotation, it doesn’t change anything. If w = 0, then the vector (x,y,z,0) is a direction.If w = 1, then the vector (x,y,z,1) is a position in space.This will be more clear soon, but for now, just remember this : Until then, we only considered 3D vertices as a (x,y,z) triplet. This is the single most important tutorial of the whole set. The ship stays where it is and the engines move the universe around it. Cumulating transformations : the ModelViewProjection matrix.The Model, View and Projection matrices.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |