lvgpwl(3)

LIBRARY ROUTINE
lvgpwl - Generates a set of piecewise linear periodic image.

LIBRARY CALL
#include "vinclude.h"
int lvgpwl(image,rows,cols,bands,fs,minimum,maximum,xperiod,yperiod,
           xrise,yrise,xfall,yfall,xwidth,ywidth,type)
    struct xvimage **image;
    int    type,bands,rows,cols;
    float  fs,minimum,maximum,xperiod,yperiod,xrise,yrise,xfall,yfall,
           xwidth,ywidth;

INPUT

image
    resulting image.

rows
    number of rows in image

cols
    number of columns in image

fs  sampling frequency

minimum
    minimum value of function

maximum
    maximum value of function

xperiod
    X period of the function in seconds

yperiod
    Y period of the function in seconds

xrise
    X rise time in seconds

yrise
    Y rise time in seconds

xfall
    X fall time in seconds

yfall
    Y fall time in seconds

xwidth
    X width of pulse

ywidth
    Y width of pulse

type
    data type of output image. This must be either VFF_TYP_FLOAT or VFF_TYP_COMPLEX.

OUTPUT

image
    holds the result of the data generation.

return Value:
    1 on success, 0 on failure.

MODIFICATIONS

Jeremy Worley 05 Mar 1992 08:26 MST
    Fixed up an fprintf function that had too few arguments based on the format field. Added rows,cols, and bands to the list of explicitly declared arguments to lvgpwl().

DESCRIPTION
creates a two dimensional piecewise linear image. The image pixel values follow a square waveform. The user can specify the period, phase, minima and maxima, sampling frequency, rise and fall times, and image dimensions.
NOTE: According to the Sampling Theorem, the sampling frequency should be at least twice that of the signal frequency to generate a signal properly.

SEE ALSO
vgpwl(1), intro(3), vipl(3), verror(3), vutils(3)

RESTRICTIONS
can only generate VFF_TYP_FLOAT and VFF_TYP_COMPLEX type images.

AUTHOR
Jeremy Worley

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