Linear Transformations' Filter (transfrm.c)

This little more complex program transfroms all the geometry in the read data which can be any number of files according to the specified transformations on the command line. The command line is parsed via GAGetArgs and its associated functions. The transformation matrix is then computed with the aid of the matrix package and applied to the read geometry at once.

\begin{center}\vbox{\input{cexample/transfrm.tex}
}\end{center}

Here is the result of running 'transfrm -h':

This is Transform...
Usage: Transfrm [-x Degs] [-y Degs] [-z Degs] [-t X Y Z] [-s Scale] [-h] DFiles

When you are considering the usefulness of this tool remember that the transformations are applied to the geometry in an internal order which is different from the command line order. That is,

     transfrm -x 30 -y 30 geometry.dat > tgeometry.dat
will compute the exact same transfrom as,
     transfrm -y 30 -x 30 geometry.dat > tgeometry.dat
This, while rotation is not a commutative operation. Nonetheless, you may split the operations. That is:
     transfrm -y 30 geometry.dat | transfrm -x 30 - > tgeometry.dat
or
     transfrm -x 30 geometry.dat | transfrm -y 30 - > tgeometry.dat
will do exactly what one expects.