Table of Contents

Name

contour - simple contour routine

Synopsis


#include <matdef.h>contour (a, nx, ny, z, nc, xmin, ymin, xmax, ymax, lineto)
real *a, z[], xmin, ymin, xmax, ymax;
int nx, ny, nc;
proc lineto;

contour_setdet(mode,value)
int mode;
real value;

Descriptioncontour expects a two dimensional matrix, contiguous in memory
in either C or FORTRAN definition (matdef(5NEMO)), pointed to by a. The
size of the matrix is nx by ny pixels. There must be nc sorted contour levels
supplied in the array z. The Plotting area is from xmin,ymin to xmax,ymax.
contour needs external relocate(x,y) and draw() routines which do the actual
line drawing. In NEMO can be supplied by the yapp(3NEMO) interface, or have
to defined in the calling program. In such the linestyle of the contours
can be externally set. An externally defined function  void lineto(real
x0, real y0, real x1, real y1) must be supplied to provide the transformation
from world to plot coordinates, since contour has no knowledge of the plotting
world. 
contour_setdef defines if contours need to ignore points which are
near undefined value. If mode=1, the value will be taken as the undefined
value. When this routine is never called contour doesn’t know about undefined
value, i.e. mode=0. 
BugsContour levels must be sorted in increasing order.
The MATDEF stuff could mirror your images if not used consistently. 
AuthorPeter
Teuben Files
~/src/image/misc    contour.c 

Update History


xx-jun-87    original version        PJT
1-feb-89    FORDEF/CDEF implemented -    PJT
10-sep-90    Added routine contour_setdef    PJT
6-may-95    new contour() with lineto now formally in NEMO     PJT


Table of Contents