This has the equations for most of it Phil.
http://www.fastgraph.com/makegames/3drotation/
and
http://www.siggraph.org/education/materials/HyperGraph/modeling/mod_tran/3drota.htm
Some things are easy to explain, other things are not........ <- Store -> <-Freebies->