home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 22 gnu / 22-gnu.zip / gnuplapi.zip / gnuplot-api-os2 / build / pm3d.h < prev    next >
Encoding:
C/C++ Source or Header  |  1999-07-21  |  2.4 KB  |  99 lines

  1. /* GNUPLOT - pm3d.h */
  2.  
  3. /*[
  4.  *
  5.  * Petr Mikulik, December 1998 -- July 1999
  6.  * Copyright: open source as much as possible
  7.  *
  8.  * 
  9.  * What is here: #defines, global variables and declaration of routines for 
  10.  * the pm3d plotting mode
  11.  *
  12. ]*/
  13.  
  14.  
  15. /* avoid multiple includes */
  16. #ifndef PM3D_H
  17. #define PM3D_H
  18.  
  19.  
  20. #define PM3D_VERSION "gp3708e-pm3d"
  21.  
  22. /****
  23.   Global options for pm3d algorithm (to be accessed by set / show)
  24. ****/
  25.  
  26. /*
  27.   where to plot pm3d: base or top (colour map) or surface (colour surface)
  28.     - if pm3d.where is "", then don't plot in pm3d mode
  29.     - pm3d_at_where can be any combination of the #defines below. For instance,
  30.     "b" plot at botton only, "st" plots firstly surface, then top, etc.
  31.   (for pm3d.where)    
  32. */
  33. #define PM3D_AT_BASE    'b'
  34. #define PM3D_AT_TOP    't'
  35. #define PM3D_AT_SURFACE    's'
  36.  
  37. /*
  38.   options for flushing scans (for pm3d.flush)
  39.   Note: new terminology compared to my pm3d program; in gnuplot it became
  40.   begin and right instead of left and right
  41. */
  42. #define PM3D_FLUSH_BEGIN   'b'
  43. #define PM3D_FLUSH_END     'r'
  44. #define PM3D_FLUSH_CENTER  'c'
  45.  
  46. /* 
  47.   direction of taking the scans: forward = as the scans are stored in the
  48.   file; backward = opposite direction, i.e. like from the end of the file
  49. */
  50. #define PM3D_SCANS_FORWARD  'f'
  51. #define PM3D_SCANS_BACKWARD 'b'
  52.  
  53. /*
  54.   clipping method:
  55.     PM3D_CLIP_1IN: all 4 points of the quadrangle must be defined and at least
  56.            1 point of the quadrangle must be in the x and y ranges
  57.     PM3D_CLIP_4IN: all 4 points of the quadrangle must be in the x and y ranges
  58. */
  59. #define PM3D_CLIP_1IN '1'
  60. #define PM3D_CLIP_4IN '4'
  61.  
  62. /*
  63.   structure defining all properties of pm3d plotting mode
  64.   (except for the properties of the smooth colour box, see color_box instead)
  65. */
  66. typedef struct {
  67.   char where[7];    /* base, top, surface */
  68.   char flush;       /* left, right, center */
  69.   char direction;    /* forward, backward */
  70.   char clip;        /* 1in, 4in */
  71.   char pm3d_zmin, pm3d_zmax; /* use zmin,zmax of 0: 'set zrange'; 1: pm3d below */
  72.   double zmin, zmax;    /* pm3d's zmin, zmax */
  73. } pm3d_struct;
  74.  
  75.  
  76. extern pm3d_struct pm3d;
  77.  
  78.  
  79. /* global variables
  80. The following two are used in z2gray(), and for labeling draw_color_smooth_box()
  81. */
  82. extern double used_pm3d_zmin, used_pm3d_zmax;
  83.  
  84.  
  85. /****
  86.   Declaration of routines
  87. ****/
  88.  
  89. int set_pm3d_zminmax();
  90.  
  91. void pm3d_plot(struct surface_points * plot, char pm3d_at_which_z);
  92.  
  93. void filled_color_contour_plot(struct surface_points *plot, int contours_where);
  94.  
  95.  
  96. #endif /* PM3D_H */
  97.  
  98. /* eof pm3d.h */
  99.