This is plmesh.c in view mode; [Download] [Up]
/* Plots a mesh representation of the function z[x][y]. The x values */ /* are stored as x[0..nx-1], the y values as y[0..ny-1], and the */ /* z values are in the 2-d array *z[]. The integer "opt" */ /* specifies: */ /* opt = 1: Draw lines parallel to x-axis */ /* opt = 2: Draw lines parallel to y-axis */ /* opt = 3: Draw lines parallel to both axes */ #include "plplot.h" #if defined(PLSTDC) && defined(STDLIB) #include <stdlib.h> #else extern void free(); #endif void plmesh(x,y,z,nx,ny,opt) int nx, ny, opt; FLOAT *x, *y, **z; { int *olovw; set3mode(1); /* Set 3d to mesh mode */ plot3d(x,y,z,nx,ny,opt,0); goldlovw(&olovw); free((VOID *)olovw); set3mode(0); /* Set 3d to solid mode */ }
These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.