Previous: matrot Up: ../plot79_m.html Next: matrx


MATRS

       SUBROUTINE  MATRS (TNEW,TOLD)
 C$    (Rescale Cube)
 C$    When arbitrary  4-dimensional transformation  matrices  are
 C$    constructed from  the  primitive  operations  of  rotation,
 C$    scaling, translation, and skewing, it usually happens  that
 C$    an object  after transformation  extends  out of  the  unit
 C$    cube, even if it  did not do so  before.  In order to  make
 C$    maximum use of the viewing area, and preserve visibility of
 C$    extreme points of objects, it is often useful to  translate
 C$    and rescale the drawing so that it lies entirely within the
 C$    unit cube.  This  routine accepts  an input  transformation
 C$    matrix, TOLD(*,*),  and produces  an output  transformation
 C$    matrix, TNEW(*,*), which will guarantee that a  transformed
 C$    cube is entirely within a unit cube.  TNEW and TOLD may  be
 C$    the same matrix, if desired.
 C$    (03-APR-82)