finished writing an interface that allowed for r[q] to return matrices.  this
would have meant a major change to the Josim code, but what is desired is an
efficient way to compute the transformation matrices.  letting r[q] return a
matrix solves a small part of the problem; decided to head in a different
direction so that intermediate results can be cached without fundamental changes
to the Josim code.