http://mathforum.org/mathimages/index.php/Transformation_Matrix
http://www.imagico.de/imenu/insert_menu.html#226
http://processing.org/reference/applyMatrix_.html
For shearing, using matrices, you should use something like this:
Code:float f = 2; //shear factor
pushMatrix();
applyMatrix(1,f,0,0,
0,1,0,0,
0,0,1,0,
0,0,0,1);
rect(0,0,100,100);
popMatrix();
(in this example it is a shear of X on Y)
Code:float f = 2; //shear factor
pushMatrix();
applyMatrix(1,0,0,0,
f,1,0,0,
0,0,1,0,
0,0,0,1);
rect(0,0,100,100);
popMatrix();
(in this example it is a shear of Y on X)
Code:float f = 2; //shear factor
pushMatrix();
applyMatrix(1,0,0,0,
0,1,0,0,
0,f,1,0,
0,0,0,1);
rect(0,0,100,100);
popMatrix();
(in this example it is a shear of Z on Y)
In general, all those possibilities will result in a shear effect:
Code:applyMatrix(1,f,f,0,
f,1,f,0,
f,f,1,0,
0,0,0,1);
You have 8 possible shearing
shearXY
shearXZ
shearYX
shearYZ
shearZX
shearZY