software/MFrame/graphicalFunctions/matrix.cpp
/* 
 *	zshear -	
 *		shear z using x and y.
 */
zshear
shear z using x and y.
zshear shear z using x and y .
void ZShearMatrix(RGBMatrix matrix, float dx, float dy)
{
    RGBMatrix mmat;
    mmat[0][0] = 1.0;
    mmat[0][1] = 0.0;
    mmat[0][2] = dx;
    mmat[0][3] = 0.0;
    mmat[1][0] = 0.0;
    mmat[1][1] = 1.0;
    mmat[1][2] = dy;
    mmat[1][3] = 0.0;
    mmat[2][0] = 0.0;
    mmat[2][1] = 0.0;
    mmat[2][2] = 1.0;
    mmat[2][3] = 0.0;
    mmat[3][0] = 0.0;
    mmat[3][1] = 0.0;
    mmat[3][2] = 0.0;
    mmat[3][3] = 1.0;
    MultiplyMatrix(mmat, matrix, matrix);
}
void ZShearMatrix ( RGBMatrix matrix , float dx , float dy ) { RGBMatrix mmat ; mmat [ 0 ] [ 0 ] = 1.0 ; mmat [ 0 ] [ 1 ] = 0.0 ; mmat [ 0 ] [ 2 ] = dx ; mmat [ 0 ] [ 3 ] = 0.0 ; mmat [ 1 ] [ 0 ] = 0.0 ; mmat [ 1 ] [ 1 ] = 1.0 ; mmat [ 1 ] [ 2 ] = dy ; mmat [ 1 ] [ 3 ] = 0.0 ; mmat [ 2 ] [ 0 ] = 0.0 ; mmat [ 2 ] [ 1 ] = 0.0 ; mmat [ 2 ] [ 2 ] = 1.0 ; mmat [ 2 ] [ 3 ] = 0.0 ; mmat [ 3 ] [ 0 ] = 0.0 ; mmat [ 3 ] [ 1 ] = 0.0 ; mmat [ 3 ] [ 2 ] = 0.0 ; mmat [ 3 ] [ 3 ] = 1.0 ; MultiplyMatrix ( mmat , matrix , matrix ) ; }
zshear 
              shear z using x and y.
zshear shear z using x and y .