28 #define isatty _isatty 52 char hidden_options[]=
" d n m v H U Qb QB Qc Qf Qg Qi Qm Qr QR Qv Qx TR E V Fa FA FC Fp FS Ft FV Pv Gt Q0 Q1 Q2 Q3 Q4 Q5 Q6 Q7 Q8 Q9 ";
55 qvoronoi- compute the Voronoi diagram\n\ 56 http://www.qhull.org %s\n\ 59 first lines: dimension and number of points (or vice-versa).\n\ 60 other lines: point coordinates, best if one point per line\n\ 61 comments: start with a non-numeric character\n\ 64 Qu - compute furthest-site Voronoi diagram\n\ 66 Qhull control options:\n\ 67 Qz - add point-at-infinity to Voronoi diagram\n\ 70 Qs - search all points for the initial simplex\n\ 71 QGn - Voronoi vertices if visible from point n, -n if not\n\ 72 QVn - Voronoi vertices for input point n, -n if not\n\ 77 T4 - trace at level n, 4=all, 5=mem/gauss, -1= events\n\ 78 Tc - check frequently during execution\n\ 80 Tv - verify result: structure, convexity, and in-circle test\n\ 81 Tz - send all output to stdout\n\ 82 TFn - report summary when n or more facets created\n\ 83 TI file - input data from file, no spaces or single quotes\n\ 84 TO file - output results to file, may be enclosed in single quotes\n\ 85 TPn - turn on tracing when point n added to hull\n\ 86 TMn - turn on tracing at merge n\n\ 87 TWn - trace merge facets when width > n\n\ 88 TVn - stop qhull after adding point n, -n for before (see TCn)\n\ 89 TCn - stop qhull after building cone for point n (see TVn)\n\ 92 Cn - radius of centrum (roundoff added). Merge facets if non-convex\n\ 93 An - cosine of maximum angle. Merge facets if cosine > n or non-convex\n\ 94 C-0 roundoff, A-0.99/C-0.01 pre-merge, A0.99/C0.01 post-merge\n\ 95 Rn - randomly perturb computations by a factor of [1-n,1+n]\n\ 96 Wn - min facet width for non-coincident point (before roundoff)\n\ 98 Output formats (may be combined; if none, produces a summary to stdout):\n\ 99 s - summary to stderr\n\ 100 p - Voronoi vertices\n\ 101 o - OFF format (dim, Voronoi vertices, and Voronoi regions)\n\ 102 i - Delaunay regions (use 'Pp' to avoid warning)\n\ 108 Fc - count plus coincident points (by Voronoi vertex)\n\ 109 Fd - use cdd format for input (homogeneous with offset first)\n\ 110 FD - use cdd format for output (offset first)\n\ 111 FF - facet dump without ridges\n\ 112 Fi - separating hyperplanes for bounded Voronoi regions\n\ 113 FI - ID for each Voronoi vertex\n\ 114 Fm - merge count for each Voronoi vertex (511 max)\n\ 115 Fn - count plus neighboring Voronoi vertices for each Voronoi vertex\n\ 116 FN - count and Voronoi vertices for each Voronoi region\n\ 117 Fo - separating hyperplanes for unbounded Voronoi regions\n\ 118 FO - options and precision constants\n\ 119 FP - nearest point and distance for each coincident point\n\ 120 FQ - command used for qvoronoi\n\ 121 Fs - summary: #int (8), dimension, #points, tot vertices, tot facets,\n\ 122 for output: #Voronoi regions, #Voronoi vertices,\n\ 123 #coincident points, #non-simplicial regions\n\ 124 #real (2), max outer plane and min vertex\n\ 125 Fv - Voronoi diagram as Voronoi vertices between adjacent input sites\n\ 126 Fx - extreme points of Delaunay triangulation (on convex hull)\n\ 130 Geomview options (2-d only)\n\ 131 Ga - all points as dots\n\ 132 Gp - coplanar points and vertices as radii\n\ 133 Gv - vertices as spheres\n\ 134 Gi - inner planes only\n\ 136 Go - outer planes only\n\ 138 Gh - hyperplane intersections\n\ 140 GDn - drop dimension n in 3-d and 4-d output\n\ 143 PAn - keep n largest Voronoi vertices by 'area'\n\ 144 Pdk:n - drop facet if normal[k] <= n (default 0.0)\n\ 145 PDk:n - drop facet if normal[k] >= n\n\ 146 Pg - print good Voronoi vertices (needs 'QGn' or 'QVn')\n\ 147 PFn - keep Voronoi vertices whose 'area' is at least n\n\ 148 PG - print neighbors of good Voronoi vertices\n\ 149 PMn - keep n Voronoi vertices with most merges\n\ 150 Po - force output. If error, output neighborhood of facet\n\ 151 Pp - do not report precision problems\n\ 153 . - list of all options\n\ 154 - - one line descriptions of all options\n\ 166 qvoronoi- compute the Voronoi diagram. Qhull %s\n\ 167 input (stdin): dimension, number of points, point coordinates\n\ 168 comments start with a non-numeric character\n\ 170 options (qvoronoi.htm):\n\ 171 Qu - compute furthest-site Voronoi diagram\n\ 172 Tv - verify result: structure, convexity, and in-circle test\n\ 173 . - concise list of all options\n\ 174 - - one-line description of all options\n\ 177 output options (subset):\n\ 178 s - summary of results (default)\n\ 179 p - Voronoi vertices\n\ 180 o - OFF file format (dim, Voronoi vertices, and Voronoi regions)\n\ 181 FN - count and Voronoi vertices for each Voronoi region\n\ 182 Fv - Voronoi diagram as Voronoi vertices between adjacent input sites\n\ 183 Fi - separating hyperplanes for bounded regions, 'Fo' for unbounded\n\ 184 G - Geomview output (2-d only)\n\ 185 QVn - Voronoi vertices for input point n, -n if not\n\ 186 TO file- output results to file, may be enclosed in single quotes\n\ 189 rbox c P0 D2 | qvoronoi s o rbox c P0 D2 | qvoronoi Fi\n\ 190 rbox c P0 D2 | qvoronoi Fo rbox c P0 D2 | qvoronoi Fv\n\ 191 rbox c P0 D2 | qvoronoi s Qu Fv rbox c P0 D2 | qvoronoi Qu Fo\n\ 192 rbox c G1 d D2 | qvoronoi s p rbox c P0 D2 | qvoronoi s Fv QV0\n\ 205 Except for 'F.' and 'PG', upper-case options take an argument.\n\ 207 OFF_format p_vertices i_delaunay summary facet_dump\n\ 209 Fcoincident Fd_cdd_in FD_cdd_out FF-dump-xridge Fi_bounded\n\ 210 Fxtremes Fmerges Fneighbors FNeigh_region FOptions\n\ 211 Fo_unbounded FPoint_near FQvoronoi Fsummary Fvoronoi\n\ 214 Gvertices Gpoints Gall_points Gno_planes Ginner\n\ 215 Gcentrums Ghyperplanes Gridges Gouter GDrop_dim\n\ 217 PArea_keep Pdrop d0:0D0 Pgood PFacet_area_keep\n\ 218 PGood_neighbors PMerge_keep Poutput_forced Pprecision_not\n\ 220 QG_vertex_good Qsearch_1st Qupper_voronoi QV_point_good Qzinfinite\n\ 221 T4_trace Tcheck_often Tstatistics Tverify Tz_stdout\n\ 222 TFacet_log TInput_file TPoint_trace TMerge_trace TOutput_file\n\ 223 TWide_trace TVertex_stop TCone_stop\n\ 225 Angle_max Centrum_size Random_dist Wide_outside\n\ 243 int main(
int argc,
char *argv[]) {
244 int curlong, totlong;
245 int exitcode, numpoints,
dim;
253 if ((argc == 1) &&
isatty( 0 )) {
257 if (argc > 1 && *argv[1] ==
'-' && !*(argv[1]+1)) {
262 if (argc > 1 && *argv[1] ==
'.' && !*(argv[1]+1)) {
266 if (argc > 1 && *argv[1] ==
'-' && *(argv[1]+1)==
'V') {
270 qh_init_A(qh, stdin, stdout, stderr, argc, argv);
274 qh_option(qh,
"voronoi _bbound-last _coplanar-keep", NULL, NULL);
282 qh_option(qh,
"_merge-exact", NULL, NULL);
285 qh_init_B(qh, points, numpoints, dim, ismalloc);
299 if (curlong || totlong)
300 qh_fprintf_stderr(6263,
"qhull internal warning (main): did not free %d bytes of long memory(%d pieces)\n",
void qh_fprintf_stderr(int msgcode, const char *fmt,...)
void qh_check_output(void)
void qh_init_A(FILE *infile, FILE *outfile, FILE *errfile, int argc, char *argv[])
int main(int argc, char *argv[])
void qh_check_points(void)
void qh_produce_output(void)
void qh_freeqhull(boolT allmem)
void qh_option(const char *option, int *i, realT *r)
void qh_init_B(coordT *points, int numpoints, int dim, boolT ismalloc)
void qh_memfreeshort(int *curlong, int *totlong)
coordT * qh_readpoints(int *numpoints, int *dimension, boolT *ismalloc)
void qh_initflags(char *command)
void qh_checkflags(char *command, char *hiddenflags)