NAME

     regular_mesh - create a  regular  mesh  corresponding  to  a
     given mesh and a given image

SYNOPSIS

     #include "mesh.h"  struct  mesh  *regular_mesh(struct  mesh*
     inmesh,int width,int height);

PATH

     $CVIPHOME/GEOMETRY/warp.c

DESCRIPTION

     The regular_mesh() create a new  mesh  which  has  the  same
     number   of   rows   and   columns   as   the   input   mesh
     structure(pointed to by "inmesh").  All the  cells  in  this
     new mesh have exactly the same size.  The whole mesh has the
     width  and  height  given  by  the  arguments  "width"   and
     "height".

TYPES AND CONSTANTS

     struct mesh_node {
          int x;
          int y;
     };

     struct mesh {
          int width;
          int height;
          struct mesh_node** nodes;
     };

     struct float_pair {
          float x;
          float y;
     };
     (e.g.)
     typedef ... newval;
     #define AVAL ...
     extern newval that;

RETURN VALUES

     The regular_mesh() returns a pointer points to the new  mesh
     structure just created.

EXAMPLE

     #include "mesh.h" #include <CVIPio.h> main() {
          char           *inputfile;
          Image          *inputImage;
          int       width, height;
          struct mesh    *inmesh, *outmesh;

          print_CVIP("0Input   the   mesh    file    name:    ");
       /*OPTIONAL1, get*/
          inputfile              =              getString_CVIP();
                    /*OPTIONAL1, a*/
          inmesh  =  file_to_mesh(inputfile);        /*OPTIONAL1,
     mesh structure*/

          print_CVIP("0Width of  the  image:   ");   /*OPTIONAL2,
     get*/
          width =  getInt_CVIP(10,  1,  1024);       /*OPTIONAL2,
     an*/
          print_CVIP("0Height of  the  image:   ");  /*OPTIONAL2,
     image*/
          height = getInt_CVIP(10, 1, 1024);      /*OPTIONAL2*/
          inputImage = black_pgm(width, height);  /*OPTIONAL2*/

          outmesh = regular_mesh(inmesh, width, height);

          display_mesh(inputImage,    outmesh);      /*OPTIONAL3,
     display the mesh*/ }

BUGS

     None at this time

SEE ALSO

     file_to_mesh(), keyboard_to_mesh(), mesh_to_file();

AUTHOR

     Copyright (C) 1995 SIUE - by Scott Umbaugh and Jianxin Tan.