To transform, premultiply a column matrix p = x y z by matrix T, as in p' = Tp with p' the new, transformed version of p. Rigidly rotate around X axis by angle a. c is cosine(a), s is sine(a). T = 1 0 0 0 c -s 0 s c Rigidly Rotate around Y axis by angle a. c is cosine(a), s is sine(a). T = c 0 s 0 1 0 -s 0 c Rigidly Rotate around Z axis by angle a. c is cosine(a), s is sine(a). T = c -s 0 s c 0 0 0 1 Shrink (or stretch) by factor f T = f 0 0 0 f 0 0 0 f Skew (here, tilt the Y coordinate as X increases (Y = Y+aX) leaving Z alone) T = 1 0 0 a 1 0 0 0 1