ok...

This is a breakdown of what you can do with the independent elements in the matrix (for the first three rows):

[Scale X] [Scale X sheared along Y] [Scale X sheared along Z] [Translate X]

[Scale Y sheared along X] [Scale Y] [Scale Y sheared along Z] [Translate Y]

[Scale Z sheared along X] [Scale Z sheared along Y] [Scale Z] [Translate Z]

So if all you want to do is resize Y, you change the Scale Y value (other dimensions need to be multiplied by 1 so they stay the same.)

eg 2 * Y, 1 * X and 1 * Z

multmatrix([ [1, 0, 0, 0], [0, 2, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1] ]) cube([100, 30, 48]);

If you only modify the Scale, X or Scale Y or Scale Z values you won't get any shearing (weird angles)]]>

Quote

**Dust**

This is feeling like i'm doing your CS homework...

This is feeling like i'm doing your CS homework...

I try to use some parameters in a model and each resize results in another angle... Math is really not my cup of tea!

I have no idea what you mean with normalized and why you need to do it but anyway it work for me to calculate "for each unit in original-size shift X units"

Thanks.

PS.: What is CS?]]>

In the first eg

X values in the array are divided by X in the cube to get 1

Y values are divided by the Y

And Z values divided by the Z

Now the value in question is "Scale Y sheared along Z"

So it needs to be divided by the Z value 48 to be normalized. and 20 comes from your second example.

the normalized array is really

multmatrix([

[100/100, 0/30, 0/48, 0],

[0/100, 30/30, 20/48, 0],

[0/100, 0/30, 48/48, 0],

[0, 0, 0, 1]

]) cube([100, 30, 48]);

This is feeling like i'm doing your CS homework...]]>

Does that mean for each unit in original-size shift X units?

So 1 x 20 = 20 Units and 48 x 0.4166667 = 20?

Is that how it works?]]>

see

difference() { multmatrix([ [1, 0, 0, 0], [0, 1, 0.4, 0], [0, 0, 1, 0], [0, 0, 0, 1] ]) cube([100, 30, 48]); multmatrix([ [100, 0, 0, 0], [0, 30, 20, 0], [0, 0, 48, 0], [0, 0, 0, 1] ]) cube([1, 1, 1]); }

0.4 should be 20/48 ie 0.416666667]]>

multmatrix([ [1, 0, 0, 0], [0, 1, 0.4, 0], [0, 0, 1, 0], [0, 0, 0, 1] ]) cube([100, 30, 48]); translate([120,0,0]) multmatrix([ [100, 0, 0, 0], [0, 30, 20, 0], [0, 0, 48, 0], [0, 0, 0, 1] ]) cube([1, 1, 1]);

Why on earth are the both cubes identical? Why i need in one case a Scale Y sheared along Z with 0.4 and in the other case with the small cube scaled up i need 20?!]]>