How does the Transformation Matrix changes the geometrie? - Printable Version +- LDraw.org Discussion Forums ( https://forums.ldraw.org)+-- Forum: LDraw Programs ( https://forums.ldraw.org/forum-7.html)+--- Forum: LDraw File Processing and Conversion ( https://forums.ldraw.org/forum-22.html)+--- Thread: How does the Transformation Matrix changes the geometrie? ( /thread-24171.html) |

How does the Transformation Matrix changes the geometrie? - Nils Meinerta - 2020-08-17
Hello, I'm not sure if this is a stupid question, but I haven't been able to find an answer in the documentation. I came across the subfile box2-7.dat in the basepart 3289s01.dat. In the file, the box is used for the backside of the slope. What I don't understand is how the angle of the subfile changes form 90 degree to a different angle. As far as I understand can the transfomation matrix only affect the rotation, position and scaling of the subfile. Here is the box2-7 subfile. As you can see, the angle between the two quads is 90 degree. And here is how the box2-7 subfile look in 3289s01.dat. The angle between the two quads is different as well as the dimensions. I changed the position so it is easier to see. Where in the files does the geometry change? RE: How does the Transformation Matrix changes the geometrie? - Max Martin Richter - 2020-08-17
The trick behind this transformation is a stretching for the sides. As you can see the matrix is not: 1 16 0 0 0 1 0 0 0 1 0 0 0 1 first of all it is changed in its dimensions like: 1 16 0 0 0 16 0 0 0 8 0 0 0 2 then the angle correction for z_y is added: 1 16 0 0 0 16 0 0 0 8 0 0 -16 2 in the last step it is moved into it's final position: 1 16 0 12 -28 16 0 0 0 8 0 0 -16 2 Just play around with the other 0 values and see what will happen. /Max Shear matrix - Nils Schmidt - 2020-08-17
The matrix of this type is a "shear matrix": Code: `1 16 0 0 0 16 0 0 0 8 0 0 -16 2 box2-7.dat` In total you can get four matrix transformations: - Translation
- Rotation
- Scaling
- Shear
https://en.wikipedia.org/wiki/Shear_matrix You can combine all these transformations with matrix multiplication. RE: How does the Transformation Matrix changes the geometrie? - Travis Cobbs - 2020-08-17
As has been pointed out, this is a shear matrix. Having said that, I don't think any part would ever be held due to not using a sheared box primitive in a place where it is possible. To a certain extent, this usage of box could almost be seen a showing off by the part author. RE: Shear matrix - Nils Meinerta - 2020-08-18
(2020-08-17, 17:46)Nils Schmidt Wrote: The matrix of this type is a "shear matrix":Oh, I see, this is the information that I was lacking. The link in the documentation was only talking about Translation, Rotation and Scaling as well. Thanks. RE: How does the Transformation Matrix changes the geometrie? - N. W. Perry - 2020-08-19
Here's a site (in French) that discusses this very topic in some detail, and with various examples: https://jc-tchang.philohome.com/manuel/prim_def.htm |