Function:struct XYZ
From S2PLOT
struct XYZ
Data structure for (x,y,z) coordinates.
Definition
typedef struct {
double x, y, z;
} XYZ;
Description
Data structure for storing (x,y,z) coordinates.
See Also
struct COLOUR | Data structure for (r,g,b) colour indices. |
Code Example
#include <stdio.h>
#include <stdlib.h>
#include "s2plot.h"
int main(int argc, char *argv[])
{
XYZ xyz; /* Declare an XYZ variable */
COLOUR col; /* Declare a COLOUR variable */
s2opend("/?",argc, argv); /* Open the display */
s2swin(-1.,1., -1.,1., -1.,1.); /* Set the window coordinates */
s2box("BCDET",0,0,"BCDET",0,0,"BCDET",0,0); /* Draw coordinate box */
xyz.x = 0.0; /* Set some values */
xyz.y = 0.5;
xyz.z = -0.3;
col.r = 0.3; /* Set colour value */
col.g = 1.0;
col.b = 0.7;
ns2vpoint(xyz, col); /* Draw the point */
s2show(1); /* Open the s2plot window */
return 1;
}
Back to S2PLOT function list.