View Full Version : scale in matrix

01-01-2009, 11:33 PM
Apart from non-normalised matrices with no rotation in them, can we get the scale values from a matrix ?

01-02-2009, 02:16 AM
Sure, just treat the columns as vectors and compute their lengths.

Rosario Leonardi
01-04-2009, 01:39 PM
If you have a generic matrix like this one

r0 r3 r6 t0
r1 r4 r7 t1
r2 r5 r8 t2
0 0 0 1
XScale = sqrt(r0*r0+r3*r3+r6*r6);
YScale = sqrt(r1*r1+r4*r4+r7*r7);
ZScale = sqrt(r2*r2+r5*r5+r8*r8);