/* make_cyl_spiral_635.c write out a cyl_spiral_635.dat for run6 */ #include #include #define LINES 128 /* storage max for nx */ #define POINTS 128 /* storage max for ny */ #define TRIS 16384 /* storage max for points */ int main(int argc, char *argv[]) { struct point { float x, y, z; int index; }; struct point raw[LINES][POINTS]; struct tri_poly { int p1, p2, p3; }; struct tri_poly tri_raw[TRIS]; FILE *fp; int i, j; int points, polys; double x, y, z; int nx = 63; /* last == first */ int ny = 15; double pi = 3.141592653589793238462643383279502884197; /* p306 curves and surfaces */ double a = 0.1; /* inner radius */ double b = 1.0; /* max z */ double c = 0.5; /* outer radius */ double n = 3; /* cycles */ double u = 0.0; /* parametric in u and v */ double du = 2.0*pi/(double)ny; double v = 0.0; double dv = 2.0*pi/(double)(nx-1); printf("make_cyl_spiral_635 running \n"); points = 1; /* thats the standard */ for(i=0; i