How does the Transformation Matrix changes the geometrie?


How does the Transformation Matrix changes the geometrie?
#1
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.
[Image: dWuFliZ.png]

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.

[Image: zoILfQ9.png]

I changed the position so it is easier to see. Where in the files does the geometry change?
Reply
RE: How does the Transformation Matrix changes the geometrie?
#2
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
Reply
Shear matrix
#3
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.
Reply
RE: Shear matrix
#5
(2020-08-17, 17:46)Nils Schmidt Wrote: 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.
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.
Reply
RE: How does the Transformation Matrix changes the geometrie?
#4
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.
Reply
RE: How does the Transformation Matrix changes the geometrie?
#6
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
Reply
« Next Oldest | Next Newest »



Forum Jump:


Users browsing this thread: 1 Guest(s)