
vrect2pol(1)                 Khoros                  vrect2pol(1)

PROGRAM
     vrect2pol - Conversion of Rectangular to Polar or Polar to
     Rectangular Data

SYNTAX
     vrect2pol

     -i             input data file (xviff file)

     -o             output data file (xviff file)

     [-c]           0 = Rect_to_Polar  1 = Polar_to_Rect

     [-d]           data processing direction (0 = down vectors,
                    1 = across bands)

     [-V]           Gives the version for vrect2pol

     [-U]           Gives the usage for vrect2pol

     [-P]           Prompts for command line options

     [-A [file1]]   Creates the answer file called vrect2pol.ans
                    or file1

     [-a [file1]]   Uses vrect2pol.ans or file1 as the answer
                    file

DESCRIPTION
     vrect2pol will convert a data file from rectangular coordi-
     nate system to the polar coordinate system, or convert polar
     to rectangular.  The conversion assumes that the data is in
     radians for the polar to rectangular conversion. The conver-
     sion from rectangular to polar will result in angles meas-
     ured in radians.

     Polar to Rectangular Conversion
                    If the process direction down vectors (d=0)
                    is chosen, then the first data band will
                    represent the radius, and the second data
                    band will contain the angle (theta).  Each
                    subsequent doublet of bands in the input
                    image contains the polar representation of
                    the data in this same format.  Since the data
                    must be presented in radius/angle pairs, the
                    input file must contain an even number of
                    data bands.  The resulting output image will
                    contain the same number of bands, where the
                    odd numbered bands (where first band = 1) are
                    the x coordinates and the even numbered bands
                    are the y coordinates of the converted data.

                    If the process direction across bands (d=1)
                    is chosen, then each data band is considered
                    to be a single 1-D signal. Therefore, the
                    radius-angle pairs are stored sequentially
                    across the band.  The output (rectangular)
                    x-y pairs will be represented in this same
                    organization.

     Rectangular to Polar Conversion
                    If the process direction down vectors (d=0)
                    is chosen, then the first data band will
                    represent the x coordinate, and the second
                    data band will contain the y coordinate.
                    Each subsequent doublet of bands in the input
                    image contains the rectangular representation
                    of the data in this same format.  Since the
                    data must be presented in x-y pairs, the
                    input file must contain an even number of
                    data bands.  The resulting output image will
                    contain the same number of bands, where the
                    odd numbered bands (where first band = 1) are
                    the radial components and the even numbered
                    bands are the anglular components of the con-
                    verted data.

     Data Processing Direction
                    If the process direction across bands (d=1)
                    is chosen, then each data band is considered
                    to be a single 1-D signal. Therefore, the x-y
                    pairs are stored sequentially across the
                    band.  The output (polar) radius-angle pairs
                    will be represented in this same organiza-
                    tion.

     drectpol operates only on VFF_TYP_FLOAT and VFF_TYP_COMPLEX
     data.

     NOTE:  If the input data type is VFF_TYP_COMPLEX, the com-
     plex representation will be changed from polar to rectangu-
     lar or vice versa.

     drectpol operates only on VFF_TYP_FLOAT and VFF_TYP_COMPLEX
     data.

REQUIRED ARGUMENTS
     -i     type: infile
            desc: input data file (xviff file)

     -o     type: outfile
            desc: output data file (xviff file)

OPTIONAL ARGUMENTS
     -c     type: boolean
            desc: 0 = Rect_to_Polar  1 = Polar_to_Rect
            default: false

     -d     type: boolean
            desc: data processing direction (0 = down vectors, 1
            = across bands)
            default: true

EXAMPLES
     vrect2pol -i polar_image -o rect_image -d 0 -c 1

     This will convert the 2 band image from polar to rectangular
     coordinates.  The first band of the resulting image will be
     the x-coordinate and the second band will be the y-
     coordinate.

SEE ALSO
     intro(1), verror(3), vgparms(3), vutils(3), lvrect2pol(3)

RESTRICTIONS
     The data storage type for the data must be VFF_TYP_FLOAT or
     VFF_TYP_COMPLEX.

COPYRIGHT
     Copyright 1992, University of New Mexico.  All rights
     reserved.

Khoros                    Release: 1.0                          1

