construct shear matrices by angle

Source: Internet
Author: User

Shear is the transformation of the coordinate system, non-uniform stretching. When shearing, the angle changes, but the area or volume does not change. It can also be understood as the angle change between axes, resulting in distortions.

For example, this is the x-coordinate of the y-coordinate of the shear, the robot's Y coordinate does not change, only the x-coordinate changes, the changed coordinates x ' can be understood as the y-coordinate multiplied by the shear factor s and the original coordinate x's and: X ' = x + sy. If 3D, increase the z-coordinate of the shear factor t:x ' = x + sy,y ' = y + tz

The shear factor is calculated from the shear angle.

Then the code to shear the x-coordinate according to the y-coordinate is:

floats = Tan (D3dxtoradian ( -));D 3DXMATRIX matshear (1.0f,0.0f,0.0f,0.0f, S,1.0f,0.0f,0.0f,0.0f,0.0f,1.0f,0.0f,0.0f,0.0f,0.0f,1.0f); G_device->settransform (d3dts_world,&matshear);

construct shear matrices by angle

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.