CSS Master

(Primo) #1
Figure 6.20. The 4×4 matrix for 3D transforms

Thismatrixcorrespondstothematrix3dfunction,whichaccepts 16 arguments,
oneforeachvalueofthe 4 × 4 matrix.Two-dimensionaltransformscanalsobeex-
pressedusinga 3 × 3 matrix,seeninFigure6.21.

Figure 6.21. A 3×3 matrix used for 2D transforms

This 3 × 3 matrixcorrespondstothematrixtransformfunction.Thematrix()
functionacceptssixparameters,oneeachforvaluesathroughf.

Eachtransformfunctioncanbedescribedusingamatrixandthematrixormatrix3d
functions.Figure6.22showsthe 4 × 4 matrixforthescale3dfunction,wheresx,sy,
andszarethescalingfactorsoftheX,Y,andZdimensionsrespectively.

246 CSS Master

Free download pdf