vgsin(1)

PROGRAM
vgsin - Creates a sinusoidal image.

SYNTAX

vgsin

-o  resulting image

[-trigger]
    trigger input

[-r]
    number of rows

[-c]
    number of columns

[-b]
    number of data bands

[-m]
    maximum image level

[-fx]
    Frequency in X direction (rad/pix)

[-fy]
    Frequency in Y direction (rad/pix)

[-px]
    Phase offset in X direction (radians)

[-py]
    Phase offset in Y direction (radians)

[-fs]
    Relative sampling frequency

[-t]
    Output image data type:
     'float' (select FLOAT data type),
      or 'complex' (select COMPLEX data type)
       [default = float]

[-V]
    Gives the version for vgsin

[-U]
    Gives the usage for vgsin

[-P]
    Prompts for command line options

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

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

DESCRIPTION
vgsin creates a two dimensional image of dimension rows * columns. The image pixel values follow a sinusoidal waveform. The user can specify the frequency, phase, amplitude, sampling frequency and image dimensions.

The spatial frequencies are specified in radians/pixel, and the phase offsets are specified in radians. The expression generated is then
sin(fx*x + px + fy*y + py)
where fx and fy are the frequencies in the X and Y directions respectively, and px an py are the phase shifts in the X and Y directions respectively.

The phase fronts of the sinusoid are perpedicular to the direction given by the angle atan2(b,a). For a reference on this see J. Goodman, "Introduction to Fourier Optics".

The sampling frequency modifies the generated expression as follows:
sin(fx*x/fs + px + fy*y/fs + py)
which allows one to shift the frequency to match that of an incoming data stream (in 1D).

The resulting images may be of type FLOAT or COMPLEX. A complex image is generated using the formula cos[stuff] + j*sin[stuff].

The trigger input can be used to cause vgsin to re-execute when used inside cantata. No image is read from this input.

REQUIRED ARGUMENTS

-o  type: outfile
    desc: resulting image

OPTIONAL ARGUMENTS

-trigger
    type: infile
    desc: trigger input

-r  type: integer
    desc: number of rows
    default: 512
    bounds: value > 0

-c  type: integer
    desc: number of columns
    default: 512
    bounds: value > 0

-b  type: integer
    desc: number of data bands
    default: 1
    bounds: value > 0

-m  type: float
    desc: maximum image level
    default: 1
    bounds: value >= 0.0

-fx type: float
    desc: Frequency in X direction (rad/pix)
    default: 1
    bounds: value >= 0.0

-fy type: float
    desc: Frequency in Y direction (rad/pix)
    default: 1
    bounds: value >= 0.0

-px type: float
    desc: Phase offset in X direction (radians)
    default: 0
    bounds: value >= 0.0

-py type: float
    desc: Phase offset in Y direction (radians)
    default: 0
    bounds: value >= 0.0

-fs type: float
    desc: Relative sampling frequency
    default: 1
    bounds: value > 0.0

-t  type: string
    desc: Output image data type
    allowed values:
     'float' (select FLOAT data type),
      or 'complex' (select COMPLEX data type)

EXAMPLES
vgsin -o sin.xv -r 50 -c 30 -fx 100 -fy 0 -px 20 -py 35 -t float
vgsin -o sin2.xv -t complex

SEE ALSO
intro(1), verror(3), vgparms(3), vutils(3), lvgsin(3) vgconst(1)

RESTRICTIONS
vgsin can only generate VFF_TYP_FLOAT and VFF_TYP_COMPLEX type images.

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