Programming and Graphics

(Kiana) #1

7.7 Three-dimensional interactive graph 247


vexit();

return 0;
}

The plotting parameters are passed to the functionsdrawplot3d.ccandplot
3dtrans.cc as global variables through the header file drawplot3d
globals.h:


#ifndef DRAWPLOT3DGLOBALSH
#define DRAWPLOT3DGLOBALSH

extern float xmin, xmax;
extern float ymin, ymax;
extern float zmin, zmax;
extern float vx, vy, vz;
extern float twist;
extern float angx; // rotation angle
extern float angy; // rotation angle
extern float angz; // rotation angle
extern float zoom; // zoom
extern float angxinit;
extern float angyinit;
extern float angzinit;
extern float zoominit;
extern int ntcx; // number of ticks on the x axis
extern int ntcy; // number of ticks on the y axis
extern int ntcz; // number of ticks on the y axis
extern int bgc; // background color
extern int axc; // axis color
extern int lbc; // label color
extern int lnc; // line color
extern int Iswap;
extern char labelx[]; // x-axis label
extern char labely[]; // y-axis label
extern char labelz[]; // y-axis label
extern char title1[]; // first title
extern char title2[]; // second title
extern char title3[]; // third title
extern int Iaxes; // draw axes?
extern int Itick; // ticks on axes?
extern int Itry; // repeat index for animation
extern int nc;
extern int np[];
extern float xd[][128];
extern float yd[][128];
extern float zd[][128];

#endif
Free download pdf