## NAME

         create_squarewave - creates a square wave image

## SYNOPSIS

          #include "CVIPtoolkit.h"
          #include "waves.h"

         Image *create_squarewave(int img_size,  int  frequency,  int
         choice)

          <img_size> - number of rows (and columns) in new image
          <frequency> - sine wave frequency
          <choice> - enter 1 for horizontal, 2  for  vertical  square
         wave

## PATH

         $CVIPHOME/GEOMETRY/square.c

## DESCRIPTION

         This function creates a horizontal or vertical  square  wave
         image of size img_sizeXimg_size, of frequency 1 to 256.

## TYPES AND CONSTANTS

## RETURN VALUES

         A pointer to the new image

## HISTORY

         History information recorded: None

## EXAMPLE

          #include <CVIPtoolkit.h>
          #include <CVIPimage.h>
          #include <CVIPdef.h>
          #include <CVIPdrawimg.h>
          #include <CVIPconvert.h>
          #include <CVIPview.h>
          #define VIEWER "picture"
          #define VIDEO_APP "SunVideo &"

          void main()
          {
          Image *cvipImage;
          IMAGE_FORMAT format;
          char *outputfile;

          setDisplay_Image(VIEWER, "Default");

          /* the following call creates a image of  size  100  x  100
         with  freq uency 32 and the square wave is in the horizontal
         direction */

          cvipImage = create_squarewave(100,32,1);
          print_CVIP("\n\t\tEnter the Output File Name:  ");
          outputfile = getString_CVIP();
          view_Image(cvipImage,outputfile);
          getFileFormat_Image(cvipImage);
          write_Image(cvipImage,outputfile,CVIP_NO,CVIP_NO,format,1);
          free(outputfile);
          }

## SEE ALSO

         libgeometry

## AUTHOR

         Copyright (C) 1996 SIUE -  by  Scott  E.  Umbaugh,  Srinivas
         Madiraju, and Kun Luo .