14 #include "libqhull/random_r.h" 22 #pragma warning( disable : 4706) 26 -rbox- generate various point distributions. Default is random in cube.\n\ 28 args (any order, space separated): Version: 2016/01/18 r\n\ 29 3000 number of random points in cube, lens, spiral, sphere or grid\n\ 31 c add a unit cube to the output ('c G2.0' sets size)\n\ 32 d add a unit diamond to the output ('d G2.0' sets size)\n\ 33 l generate a regular 3-d spiral\n\ 34 r generate a regular polygon, ('r s Z1 G0.1' makes a cone)\n\ 35 s generate cospherical points\n\ 36 x generate random points in simplex, may use 'r' or 'Wn'\n\ 37 y same as 'x', plus simplex\n\ 38 Cn,r,m add n nearly coincident points within radius r of m points\n\ 39 Pn,m,r add point [n,m,r] first, pads with 0, maybe repeated\n\ 41 Ln lens distribution of radius n. Also 's', 'r', 'G', 'W'.\n\ 42 Mn,m,r lattice(Mesh) rotated by [n,-m,0], [m,n,0], [0,0,r], ...\n\ 43 '27 M1,0,1' is {0,1,2} x {0,1,2} x {0,1,2}. Try 'M3,4 z'.\n\ 44 W0.1 random distribution within 0.1 of the cube's or sphere's surface\n\ 45 Z0.5 s random points in a 0.5 disk projected to a sphere\n\ 46 Z0.5 s G0.6 same as Z0.5 within a 0.6 gap\n\ 48 Bn bounding box coordinates, default %2.2g\n\ 49 h output as homogeneous coordinates for cdd\n\ 50 n remove command line from the first line of output\n\ 51 On offset coordinates by n\n\ 52 t use time as the random number seed(default is command line)\n\ 53 tn use n as the random number seed\n\ 54 z print integer coordinates, default 'Bn' is %2.2g\n\ 60 int main(
int argc,
char **argv) {
71 if (argc == 2 && strcmp(argv[1],
"D4")==0)
72 qh_fprintf_stderr(0,
"\nStarting the rbox smoketest for qhull. An immediate failure indicates\nthat reentrant rbox was linked to non-reentrant routines. An immediate\nfailure of qhull may indicate that qhull was linked to the wrong\nqhull library. Also try 'rbox D4 | qhull T1'\n");
74 qh_init_A(qh, stdin, stdout, stderr, argc, argv);
void qh_fprintf_stderr(int msgcode, const char *fmt,...)
#define QHULL_LIB_CHECK_RBOX
void qh_init_A(FILE *infile, FILE *outfile, FILE *errfile, int argc, char *argv[])
int main(int argc, char **argv)
int qh_rboxpoints(FILE *fout, FILE *ferr, char *rbox_command)