[comp.graphics] Question on factoring a 3D rotation matrix

unhd (Joseph M Joy) (09/26/90)

I have a question regarding the factorizing of a 3D rotation matrix
into shear matrices. Let me define things first.

A general rotation matrix (non-homogeneous coordinates) has the form:
           a b c                            (x)
    R =    d e f           (x',y',z') = R * (y)
           g h i                            (z)
where a...g are expressions involving the sines and cosines of the rotation
angles. (x', y', z') is the result of rotating vector (x, y, z) using R.

A shear matrix has one of the three forms below:
	  1 p q       1 0 0      1 0 0
    H =   0 1 0  OR   p 1 q  OR  0 1 0
	  0 0 1       0 0 1      p q 1
where p and q can be any real numbers.

R can be factored into H1 * H2 * ... H7, where Hi are shear matrices
(i.e. have the form of H above).

THE QUESTION IS, will a lesser number suffice, and if so, what are these
shear matrices?

4 is impossible. I have been trying to solve for n = 5 and n = 6, but things 
have been getting very messy.

NOTE: I have factored R into THREE ``shear-and-scale'' matrices
of the form
      p q r       1 0 0      1 0 0
S =   0 1 0  OR   p q r  OR  0 1 0
      0 0 1       0 0 1      p q r
This breaks down the general 3D rotation (or other affine
transformation) into THREE scanline operations, resulting in a fast
algorithm for applying affine (and perspective) transformations to 3D
arrays.  If R can be factored into, say, five shear matrices, this
could result in a faster algorithm, analogous  to  Alan Paeth's 2D
rotation algorithm.

Any help will be greatly appreciated and acknowledged.

Joseph. 
jmj@unh.edu, (603)862-4335