Linear transformation matrices

Source: Internet
Author: User

The line generation illustrates the fact that "arbitrary" (see below) Transformations (x multiplied by Y,x plus y, and any combination of them) can be done "once" by constructing a specific matrix, in the form of matrix multiplication. This leaves room for hardware optimization.

The graph illustrates the fact that both spatial and vertex transformations are linear homogeneous operations, that is, the "arbitrary" transformation described above, which means that the modern description of the kind of calculation can be applied to the graphics.

Graphics do not necessarily need to use a matrix to do, one matrix just meet the needs, and matrix multiplication words relatively simple and clear and conceptual unity (all the transformations are integrated together), Sunline computer can do optimization.

Some of the concepts of graphics can be seen as intentional: In order to cover all the algorithms, graphics created the "homogeneous coordinates" of the object, the fundamental purpose is to get some of the original matrix multiplication can not be included in the operation to get in, and at the same time to increase the number of one-dimensional computation = =

One of the main forces in representing linear transformations with matrices is the ability to easily combine transformations and inverse transformations. Combinatorial transformations: Combinations can be accomplished by matrix multiplication. If AAnd Bis a two linear transformation, then the vector xProceed first ATransform, and then proceed BThe process of transformation is that any linear transformation can be represented by a matrix as a consistent form of easy computation, and multiple transformations can be easily concatenated by multiplying the matrix. A linear transformation is not the only transformation that can be represented by a matrix. RThe affine transformation of the dimension and the perspective projection can all be expressed in homogeneous coordinates as RPDimension (that is, NA linear transformation of a +1-D real projection space). Therefore, a large number of 4x4 matrix transformations are used in three-dimensional computer graphics. Three-dimensional graphics, why use four-dimensional matrix it? There are two main reasons, first, in order to translate transformations, second, in order to distinguish points and vectors.

If you do not use the four-dimensional matrix, the translation transformation must be added and subtracted from the vector, but the four dimensions can unify the zoom translation rotation into matrix multiplication.

v = {X,y,z,w} When W is not 0 o'clock (General =1), represents a point, and when w=0, represents a vector.Let me answer this question, divided into two questions:

1. Why is the introduction of homogeneous coordinates possible to represent panning?

For:

First we use a vector to represent a point in space:
If we want to translate it, the translation vector is:
So the normal thing is:

If the homogeneous coordinates are not introduced, the translation is realized by using the 3x3 matrix multiplication simply.
All you want to do is find a matrix.Makes

And you'll find that you'll never find a matrix like this.

So we need to introduce a new dimension, the original
So we can find a 4x4 matrix for panning.




Now, there are:


2. Why should I introduce homogeneous coordinates to represent panning?

in computer graphics, coordinate transformations are usually not single, and a geometry may be designed with multiple shifts, rotations, and scales in each frame, and these changes we usually get a final change matrix in the way that each sub-change matrix is connected, thus reducing the amount of computation. So we need to also express the translation as a form of a change matrix. Therefore, only homogeneous coordinate systems can be introduced.

Linear transformation matrices

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.