27 #define isatty _isatty 49 char hidden_options[]=
" d n v Qbb QbB Qf Qg Qm Qr QR Qv Qx Qz TR E V Fa FA FC FD FS Ft FV Gt Q0 Q1 Q2 Q3 Q4 Q5 Q6 Q7 Q8 Q9 ";
52 qhalf- compute the intersection of halfspaces about a point\n\ 53 http://www.qhull.org %s\n\ 56 optional interior point: dimension, 1, coordinates\n\ 57 first lines: dimension+1 and number of halfspaces\n\ 58 other lines: halfspace coefficients followed by offset\n\ 59 comments: start with a non-numeric character\n\ 62 Hn,n - specify coordinates of interior point\n\ 63 Qt - triangulated output\n\ 64 QJ - joggled input instead of merged facets\n\ 65 Qc - keep coplanar halfspaces\n\ 66 Qi - keep other redundant halfspaces\n\ 68 Qhull control options:\n\ 69 QJn - randomly joggle input in range [-n,n]\n\ 72 Qbk:0Bk:0 - remove k-th coordinate from input\n\ 73 Qs - search all halfspaces for the initial simplex\n\ 74 QGn - print intersection if visible to halfspace n, -n for not\n\ 75 QVn - print intersections for halfspace n, -n if not\n\ 80 T4 - trace at level n, 4=all, 5=mem/gauss, -1= events\n\ 81 Tc - check frequently during execution\n\ 82 Ts - print statistics\n\ 83 Tv - verify result: structure, convexity, and redundancy\n\ 84 Tz - send all output to stdout\n\ 85 TFn - report summary when n or more facets created\n\ 86 TI file - input data from file, no spaces or single quotes\n\ 87 TO file - output results to file, may be enclosed in single quotes\n\ 88 TPn - turn on tracing when halfspace n added to intersection\n\ 89 TMn - turn on tracing at merge n\n\ 90 TWn - trace merge facets when width > n\n\ 91 TVn - stop qhull after adding halfspace n, -n for before (see TCn)\n\ 92 TCn - stop qhull after building cone for halfspace n (see TVn)\n\ 95 Cn - radius of centrum (roundoff added). Merge facets if non-convex\n\ 96 An - cosine of maximum angle. Merge facets if cosine > n or non-convex\n\ 97 C-0 roundoff, A-0.99/C-0.01 pre-merge, A0.99/C0.01 post-merge\n\ 98 Rn - randomly perturb computations by a factor of [1-n,1+n]\n\ 99 Un - max distance below plane for a new, coplanar halfspace\n\ 100 Wn - min facet width for outside halfspace (before roundoff)\n\ 102 Output formats (may be combined; if none, produces a summary to stdout):\n\ 104 G - Geomview output (dual convex hull)\n\ 105 i - non-redundant halfspaces incident to each intersection\n\ 106 m - Mathematica output (dual convex hull)\n\ 107 o - OFF format (dual convex hull: dimension, points, and facets)\n\ 108 p - vertex coordinates of dual convex hull (coplanars if 'Qc' or 'Qi')\n\ 109 s - summary (stderr)\n\ 114 Fc - count plus redundant halfspaces for each intersection\n\ 115 - Qc (default) for coplanar and Qi for other redundant\n\ 116 Fd - use cdd format for input (homogeneous with offset first)\n\ 117 FF - facet dump without ridges\n\ 118 FI - ID of each intersection\n\ 119 Fm - merge count for each intersection (511 max)\n\ 120 FM - Maple output (dual convex hull)\n\ 121 Fn - count plus neighboring intersections for each intersection\n\ 122 FN - count plus intersections for each non-redundant halfspace\n\ 123 FO - options and precision constants\n\ 124 Fp - dim, count, and intersection coordinates\n\ 125 FP - nearest halfspace and distance for each redundant halfspace\n\ 126 FQ - command used for qhalf\n\ 127 Fs - summary: #int (8), dim, #halfspaces, #non-redundant, #intersections\n\ 128 for output: #non-redundant, #intersections, #coplanar\n\ 129 halfspaces, #non-simplicial intersections\n\ 130 #real (2), max outer plane, min vertex\n\ 131 Fv - count plus non-redundant halfspaces for each intersection\n\ 132 Fx - non-redundant halfspaces\n\ 136 Geomview output (2-d, 3-d and 4-d; dual convex hull)\n\ 137 Ga - all points (i.e., transformed halfspaces) as dots\n\ 138 Gp - coplanar points and vertices as radii\n\ 139 Gv - vertices (i.e., non-redundant halfspaces) as spheres\n\ 140 Gi - inner planes (i.e., halfspace intersections) only\n\ 142 Go - outer planes only\n\ 144 Gh - hyperplane intersections\n\ 146 GDn - drop dimension n in 3-d and 4-d output\n\ 149 PAn - keep n largest facets (i.e., intersections) by area\n\ 150 Pdk:n- drop facet if normal[k] <= n (default 0.0)\n\ 151 PDk:n- drop facet if normal[k] >= n\n\ 152 Pg - print good facets (needs 'QGn' or 'QVn')\n\ 153 PFn - keep facets whose area is at least n\n\ 154 PG - print neighbors of good facets\n\ 155 PMn - keep n facets with most merges\n\ 156 Po - force output. If error, output neighborhood of facet\n\ 157 Pp - do not report precision problems\n\ 159 . - list of all options\n\ 160 - - one line descriptions of all options\n\ 172 qhalf- halfspace intersection about a point. Qhull %s\n\ 173 input (stdin): [dim, 1, interior point], dim+1, n, coefficients+offset\n\ 174 comments start with a non-numeric character\n\ 176 options (qhalf.htm):\n\ 177 Hn,n - specify coordinates of interior point\n\ 178 Qt - triangulated output\n\ 179 QJ - joggled input instead of merged facets\n\ 180 Tv - verify result: structure, convexity, and redundancy\n\ 181 . - concise list of all options\n\ 182 - - one-line description of all options\n\ 185 output options (subset):\n\ 186 s - summary of results (default)\n\ 187 Fp - intersection coordinates\n\ 188 Fv - non-redundant halfspaces incident to each intersection\n\ 189 Fx - non-redundant halfspaces\n\ 190 o - OFF file format (dual convex hull)\n\ 191 G - Geomview output (dual convex hull)\n\ 192 m - Mathematica output (dual convex hull)\n\ 193 QVn - print intersections for halfspace n, -n if not\n\ 194 TO file - output results to file, may be enclosed in single quotes\n\ 197 rbox d | qconvex FQ n | qhalf s H0,0,0 Fp\n\ 198 rbox c | qconvex FQ FV n | qhalf s i\n\ 199 rbox c | qconvex FQ FV n | qhalf s o\n\ 212 Except for 'F.' and 'PG', upper_case options take an argument.\n\ 214 incidences Geomview mathematica OFF_format point_dual\n\ 215 summary facet_dump\n\ 217 Fc_redundant Fd_cdd_in FF_dump_xridge FIDs Fmerges\n\ 218 Fneighbors FN_intersect FOptions Fp_coordinates FP_nearest\n\ 219 FQhalf Fsummary Fv_halfspace FMaple Fx_non_redundant\n\ 221 Gvertices Gpoints Gall_points Gno_planes Ginner\n\ 222 Gcentrums Ghyperplanes Gridges Gouter GDrop_dim\n\ 224 PArea_keep Pdrop d0:0D0 Pgood PFacet_area_keep\n\ 225 PGood_neighbors PMerge_keep Poutput_forced Pprecision_not\n\ 227 Qbk:0Bk:0_drop Qcoplanar QG_half_good Qi_redundant QJoggle\n\ 228 Qsearch_1st Qtriangulate QVertex_good\n\ 230 T4_trace Tcheck_often Tstatistics Tverify Tz_stdout\n\ 231 TFacet_log TInput_file TPoint_trace TMerge_trace TOutput_file\n\ 232 TWide_trace TVertex_stop TCone_stop\n\ 234 Angle_max Centrum_size Random_dist Ucoplanar_max Wide_outside\n\ 252 int main(
int argc,
char *argv[]) {
253 int curlong, totlong;
254 int exitcode, numpoints,
dim;
260 if ((argc == 1) &&
isatty( 0 )) {
264 if (argc > 1 && *argv[1] ==
'-' && !*(argv[1]+1)) {
269 if (argc > 1 && *argv[1] ==
'.' && !*(argv[1]+1)) {
273 if (argc > 1 && *argv[1] ==
'-' && *(argv[1]+1)==
'V') {
277 qh_init_A(stdin, stdout, stderr, argc, argv);
278 exitcode= setjmp(
qh errexit);
287 qhull error: options 'Qbk:n' and 'QBk:n' are not used with qhalf.\n\ 288 Use 'Qbk:0Bk:0 to drop dimension k.\n");
296 qh_init_B(points, numpoints, dim, ismalloc);
300 if (
qh VERIFYoutput && !
qh FORCEoutput && !
qh STOPpoint && !
qh STOPcone)
310 if (curlong || totlong)
311 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)
int main(int argc, char *argv[])
void qh_init_A(FILE *infile, FILE *outfile, FILE *errfile, 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)
void qh_errexit(int exitcode, facetT *facet, ridgeT *ridge)
coordT * qh_readpoints(int *numpoints, int *dimension, boolT *ismalloc)
void qh_initflags(char *command)
void qh_checkflags(char *command, char *hiddenflags)