Matrix Example of transform attribute

Source: Internet
Author: User

Do not understand how the matrix method of the transform attribute is used. No problem, please read these three articles first:
-A simple transformation method of transform attribute
-One of the matrix methods of transform attributes
-matrix method of transform attribute second matrix review matrix definition

Matrix Conversion Formula (A, B, C, D, TX, Ty)

X ' = a * x + c * y + tx
Y ' = b * x + d * y + ty Matrix to realize the theoretical analysis of symmetry effect

symmetric effect, that is, a line for the reference, the graphic folded.
Consider dispersing the graphic to a number of points, and the single point of symmetry along the vertical line is shown in the following illustration:

From the above graph symmetrical relation can know x = X '.
Assuming the coordinates of point A are (x, y) and the coordinates of a ' are (x ', y '), then the coordinates of a ' are represented by a point:

X ' =-X
Y ' = y

Combined with matrix conversion formula,

X ' =-1 * x + 0 * y + 0
Y ' = 0 * x + 1 * y + 0

Therefore, in order to achieve the symmetry effect, only the matrix method parameters A, B, C, D, TX, Ty, respectively, are set to -1,0,0,1,0,0. Sample Code

. matrix-style-symmetric {
    Transform:matrix ( -1, 0, 0, 1, 0, 0);
}
Run effect

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.