XFORM(1)                                                              XFORM(1)



NNAAMMEE
       xform - transform a RADIANCE scene description

SSYYNNOOPPSSIISS
       xxffoorrmm  [ --cc ][ --II ][ --nn nnaammee ][ --mm nneewwmmoodd ][ --ff aarrggffiillee ][ xxff00 ][ --aa nn11
       xxff11 ....  ][ --ii 11 xxffff ] ffiillee ....

DDEESSCCRRIIPPTTIIOONN
       _X_f_o_r_m transforms each scene description _f_i_l_e according to  the  options
       given.   If  no  _f_i_l_e is specified, the standard input is read.  The _-_c
       option causes commands in the input not to be expanded.  The default is
       to  execute  all in line commands.  (See note below about file names.)
       The _-_n option causes all identifiers to be prefixed with _n_a_m_e_.  The  _-_m
       option  causes  all  surfaces  to be given the modifier _n_e_w_m_o_d_.  The _-_I
       option causes all surfaces to be inverted, reversing their surface nor-
       mal  orientations.   These  options  are followed by the transformation
       options, which are described below.

       The _-_f option causes the _x_f_o_r_m command line to be constructed from  the
       given  file, by inserting each line of the file at the current point in
       the command argument list.  Each line in the file will result in a log-
       ically  separate  invocation  of  _x_f_o_r_m_,  and may may contain any valid
       _x_f_o_r_m arguments, including nested _-_f options.  This is a convenient way
       to specify multiple copies of an object that do not fit a regular array
       pattern, without having to actually execute _x_f_o_r_m many times.  Separate
       scene  files  may  be specified this way as well, but remember that the
       constructed command line must fit the format of  initial  options  _(_-_n_,
       _-_m_, _-_c_, _-_I_) followed by the transform then the scene files.  No initial
       options may appear after the first transform option, and  no  transform
       options  will be understood after the first named file.  In the special
       case where the argument to the _-_f option is a hyphen ('-'), _x_f_o_r_m  will
       take  its  arguments  from  the standard input.  Note that _x_f_o_r_m cannot
       simultaneously take its scene information from the  standard  input  if
       the option is used in this way.  Competely empty lines and lines begin-
       ning with a pound sign  ('#')  will  be  silently  ignored.   Beginning
       "!xform" or "xform" command names will also be ignored.

       If  one  or  more scene files are given on the command line, _x_f_o_r_m will
       search the RADIANCE library directories  for  each  file.   (No  search
       takes  place  if a file name begins with a '.', '/' or '~' character.)
       Unless the _-_c option is present, _x_f_o_r_m will also change to that  file's
       directory  before  loading it.  Thus, any commands executed within that
       file will happen in that  file's  directory,  which  simplifies  object
       hierarchy construction.

       The  transformation consists of a sequence of operations which are exe-
       cuted in the order they appear.

OOPPTTIIOONNSS
       --tt _x _y _z  Translate the scene along the vector _x _y _z _.

       --rrxx _d_e_g_r_e_e_s
                 Rotate the scene _d_e_g_r_e_e_s about the x axis.  A positive  rota-
                 tion  corresponds  to counter-clockwise when looking down the
                 axis.

       --rryy _d_e_g_r_e_e_s
                 Rotate the scene _d_e_g_r_e_e_s about the y axis.

       --rrzz _d_e_g_r_e_e_s
                 Rotate the scene _d_e_g_r_e_e_s about the z axis.

       --ss _f_a_c_t_o_r Scale the scene by _f_a_c_t_o_r_.

       --mmxx       Mirror the scene about the yz plane.

       --mmyy       Mirror the scene about the xz plane.

       --mmzz       Mirror the scene about the xy plane.

       --ii _c_o_u_n_t  Iterate (repeat) the following transformation (up to the next
                 _-_i  option) _c_o_u_n_t times.  This option is primarily to support
                 the _-_a option, which is described below.

   AArrrraayyss
       An array is a  repeated  transformation  that  results  in  a  repeated
       object.  It is specified using the _-_a option, which takes the number to
       repeat as its argument.  The objects will step  by  the  transformation
       given  between  this _-_a option and the next _-_a or _-_i option.  The first
       object will have zero applications of the transform.  A two-dimensional
       array  is  given  by  two different transformations each preceded by an
       array count.

EEXXAAMMPPLLEE
       To rotate ``book'' 30 degrees about the x  axis  then  move  20  in  y,
       prepending the name book1:

         xform -n book1 -rx 30 -t 0 20 0 book > book1

       To  expand  all  commands  and see what information is actually used by
       RADIANCE:

         xform scene | more

       To create a two-dimensional array of 20 lights, after an initial  rota-
       tion and followed by a global translation (no command expansion):

         xform -c -rz 90 -a 5 -t 2 0 0 -a 4 -t 0 1.5 0 -i 1 -t 0 0 10 light

EENNVVIIRROONNMMEENNTT
       RAYPATH        path to search for scene files

AAUUTTHHOORR
       Greg Ward

BBUUGGSS
       Only regular (distortion-free) transformations are allowed.

SSEEEE AALLSSOO
       genbox(1), gensurf(1), oconv(1), replmarks(1), rpict(1), rvu(1)



RADIANCE                            6/4/99                            XFORM(1)
