Go to the documentation of this file.
66 char flags[]=
"qhull Tv";
67 FILE *outfile= stdout;
69 FILE *errfile= stderr;
78 qh_printf_stderr(6238,
"Qhull link error. The global variable qh_qh was not initialized\n\
79 to NULL by global.c. Please compile this program with -Dqh_QHpointer_dllimport\n\
80 as well as -Dqh_QHpointer, or use libqhullstatic, or use a different tool chain.\n\n");
87 flags, outfile, errfile);
96 if (curlong || totlong)
97 qh_fprintf(errfile, 7068,
"qhull internal warning (main): did not free %d bytes of long memory(%d pieces)\n", totlong, curlong);
130 char *qhull_cmd, FILE *outfile, FILE *errfile) {
131 int exitcode, hulldim;
145 if (strncmp(qhull_cmd,
"qhull ", (
size_t)6)) {
146 qh_fprintf(errfile, 6186,
"qhull error (qh_new_qhull): start qhull_cmd argument with \"qhull \"\n");
150 if(numpoints==0 && points==NULL){
151 trace1((
qh ferr, 1047,
"qh_new_qhull: initialize Qhull\n"));
154 trace1((
qh ferr, 1044,
"qh_new_qhull: build new Qhull for %d %d-d points with %s\n", numpoints,
dim, qhull_cmd));
155 exitcode = setjmp(
qh errexit);
174 new_ismalloc= ismalloc;
176 qh_init_B(new_points, numpoints, hulldim, new_ismalloc);
184 if (
qh VERIFYoutput && !
qh STOPpoint && !
qh STOPcone)
215 if (
qh ERREXITcalled) {
216 qh_fprintf(
qh ferr, 8126,
"\nqhull error while processing previous error. Exit program\n");
220 if (!
qh QHULLfinished)
222 qh_errprint(
"ERRONEOUS", facet, NULL, ridge, NULL);
223 qh_fprintf(
qh ferr, 8127,
"\nWhile executing: %s | %s\n",
qh rbox_command,
qh qhull_command);
225 if (
qh furthest_id >= 0) {
226 qh_fprintf(
qh ferr, 8129,
"Last point added to hull was p%d.",
qh furthest_id);
229 if (
qh QHULLfinished)
230 qh_fprintf(
qh ferr, 8131,
"\nQhull has finished constructing the hull.");
231 else if (
qh POSTmerging)
232 qh_fprintf(
qh ferr, 8132,
"\nQhull has started post-merging.");
235 if (
qh FORCEoutput && (
qh QHULLfinished || (!facet && !ridge)))
241 if (
qh PRINTstatistics) {
247 if (
qh PRINTprecision)
257 qh_fprintf(
qh ferr, 6187,
"qhull error while ending program, or qh->NOerrexit not cleared after setjmp(). Exit program with error.\n");
263 longjmp(
qh errexit, exitcode);
291 if (atridge->
top && atridge->
top != atfacet && atridge->
top != otherfacet)
294 && atridge->
bottom != atfacet && atridge->
bottom != otherfacet)
297 atfacet= atridge->
top;
305 if (
qh fout &&
qh FORCEoutput && atfacet && !
qh QHULLfinished && !
qh IStracing) {
306 qh_fprintf(
qh ferr, 8139,
"ERRONEOUS and NEIGHBORING FACETS to output\n");
348 if (
qh MERGEexact ||
qh PREmerge ||
qh JOGGLEmax <
REALmax/2)
350 A Qhull error has occurred. Qhull should have corrected the above\n\
351 precision error. Please send the input and all of the output to\n\
352 qhull_bug@qhull.org\n");
355 Precision problems were detected during construction of the convex hull.\n\
356 This occurs because convex hull algorithms assume that calculations are\n\
357 exact, but floating-point arithmetic has roundoff errors.\n\
359 To correct for precision problems, do not use 'Q0'. By default, Qhull\n\
360 selects 'C-0' or 'Qx' and merges non-convex facets. With option 'QJ',\n\
361 Qhull joggles the input to prevent precision problems. See \"Imprecision\n\
362 in Qhull\" (qh-impre.htm).\n\
364 If you use 'Q0', the output may include\n\
365 coplanar ridges, concave ridges, and flipped facets. In 4-d and higher,\n\
366 Qhull may produce a ridge with four neighbors or two facets with the same \n\
367 vertices. Qhull reports these events when they occur. It stops when a\n\
368 concave ridge, flipped facet, or duplicate facet occurs.\n");
372 Qhull is currently using single precision arithmetic. The following\n\
373 will probably remove the precision problems:\n\
374 - recompile qhull for realT precision(#define REALfloat 0 in user.h).\n");
376 if (
qh DELAUNAY && !
qh SCALElast &&
qh MAXabs_coord > 1e4)
379 When computing the Delaunay triangulation of coordinates > 1.0,\n\
380 - use 'Qbb' to scale the last coordinate to [0,m] (max previous coordinate)\n");
381 if (
qh DELAUNAY && !
qh ATinfinity)
383 When computing the Delaunay triangulation:\n\
384 - use 'Qz' to add a point at-infinity. This reduces precision problems.\n");
388 If you need triangular output:\n\
389 - use option 'Qt' to triangulate the output\n\
390 - use option 'QJ' to joggle the input points and remove precision errors\n\
391 - use option 'Ft'. It triangulates non-simplicial facets with added points.\n\
393 If you must use 'Q0',\n\
394 try one or more of the following options. They can not guarantee an output.\n\
395 - use 'QbB' to scale the input to a cube.\n\
396 - use 'Po' to produce output and prevent partitioning for flipped facets\n\
397 - use 'V0' to set min. distance to visible facet as 0 instead of roundoff\n\
398 - use 'En' to specify a maximum roundoff error less than %2.2g.\n\
399 - options 'Qf', 'Qbb', and 'QR0' may also help\n",
403 To guarantee simplicial output:\n\
404 - use option 'Qt' to triangulate the output\n\
405 - use option 'QJ' to joggle the input points and remove precision errors\n\
406 - use option 'Ft' to triangulate the output by adding points\n\
407 - use exact arithmetic (see \"Imprecision in Qhull\", qh-impre.htm)\n\
425 qh_fprintf(fp, 9375,
"qhull precision warning: \n\
426 The initial hull is narrow (cosine of min. angle is %.16f).\n\
427 Is the input lower dimensional (e.g., on a plane in 3-d)? Qhull may\n\
428 produce a wide facet. Options 'QbB' (scale to unit box) or 'Qbb' (scale\n\
429 last coordinate) may remove this warning. Use 'Pp' to skip this warning.\n\
430 See 'Limitations' in qh-impre.htm.\n",
443 realT min, max, *coord, dist;
447 The input to qhull appears to be less than %d dimensional, or a\n\
448 computation has overflowed.\n\n\
449 Qhull could not construct a clearly convex simplex from points:\n",
454 The center point is coplanar with a facet, or a vertex is coplanar\n\
455 with a neighboring facet. The maximum round off error for\n\
456 computing distances is %2.2g. The center point, facets and distances\n\
457 to the center point are as follows:\n\n",
qh DISTround);
466 qh_fprintf(fp, 9381,
" distance= %4.2g\n", dist);
471 These points are the dual of the given halfspaces. They indicate that\n\
472 the intersection is degenerate.\n");
474 These points either have a maximum or minimum x-coordinate, or\n\
475 they maximize the determinant for k coordinates. Trial points\n\
476 are first selected from points that maximize a coordinate.\n");
479 Because of the high dimension, the min x-coordinate and max-coordinate\n\
480 points are used if the determinant is non-zero. Option 'Qs' will\n\
481 do a better, though much slower, job. Instead of 'Qs', you can change\n\
482 the points by randomly rotating the input with 'QR0'.\n");
484 qh_fprintf(fp, 9385,
"\nThe min and max coordinates for each dimension are:\n");
485 for (k=0; k <
qh hull_dim; k++) {
488 for (i=
qh num_points, coord=
qh first_point+k; i--; coord +=
qh hull_dim) {
492 qh_fprintf(fp, 9386,
" %d: %8.4g %8.4g difference= %4.4g\n", k, min, max, max-min);
496 If the input should be full dimensional, you have several options that\n\
497 may determine an initial simplex:\n\
498 - use 'QJ' to joggle the input and make it full dimensional\n\
499 - use 'QbB' to scale the points to the unit cube\n\
500 - use 'QR0' to randomly rotate the input for different maximum points\n\
501 - use 'Qs' to search all points for the initial simplex\n\
502 - use 'En' to specify a maximum roundoff error less than %2.2g.\n\
503 - trace execution with 'T3' to see the determinant for each point.\n",
507 - recompile qhull for realT precision(#define REALfloat 0 in libqhull.h).\n");
510 If the input is lower dimensional:\n\
511 - use 'QJ' to joggle the input and make it full dimensional\n\
512 - use 'Qbk:0Bk:0' to delete coordinate k from the input. You should\n\
513 pick the coordinate with the least range. The hull will have the\n\
515 - determine the flat containing the points, rotate the points\n\
516 into a coordinate plane, and delete the other coordinates.\n\
517 - add one or more points to make the input full dimensional.\n\
void qh_printvertex(FILE *fp, vertexT *vertex)
void qh_printfacetlist(facetT *facetlist, setT *facets, boolT printall)
#define FORALLfacet_(facetlist)
void qh_printfacet(FILE *fp, facetT *facet)
void qh_printvertexlist(FILE *fp, const char *string, facetT *facetlist, setT *facets, boolT printall)
#define FOREACHfacet_(facets)
void qh_printafacet(FILE *fp, qh_PRINT format, facetT *facet, boolT printall)
int qh_new_qhull(int dim, int numpoints, coordT *points, boolT ismalloc, char *qhull_cmd, FILE *outfile, FILE *errfile)
void qh_check_output(void)
void qh_printridge(FILE *fp, ridgeT *ridge)
void qh_errexit(int exitcode, facetT *facet, ridgeT *ridge)
void qh_printstatistics(FILE *fp, const char *string)
void qh_printhelp_narrowhull(FILE *fp, realT minangle)
void qh_check_points(void)
#define otherfacet_(ridge, facet)
void qh_freeqhull(boolT allmem)
void qh_printpointid(FILE *fp, const char *string, int dim, pointT *point, int id)
void qh_setfeasible(int dim)
coordT * qh_sethalfspace_all(int dim, int count, coordT *halfspaces, pointT *feasible)
void qh_exit(int exitcode)
void qh_user_memsizes(void)
#define minimize_(minval, val)
void qh_printsummary(FILE *fp)
int qh_pointid(pointT *point)
void qh_distplane(pointT *point, facetT *facet, realT *dist)
void qh_prepare_output(void)
void qh_produce_output(void)
void qh_printhelp_degenerate(FILE *fp)
void qh_printhelp_singular(FILE *fp)
void qh_memfreeshort(int *curlong, int *totlong)
void qh_printend(FILE *fp, qh_PRINT format, facetT *facetlist, setT *facets, boolT printall)
void qh_initflags(char *command)
#define FOREACHvertex_(vertices)
void qh_printneighborhood(FILE *fp, qh_PRINT format, facetT *facetA, facetT *facetB, boolT printall)
void qh_printstats(FILE *fp, int idx, int *nextindex)
void qh_fprintf(FILE *fp, int msgcode, const char *fmt,...)
#define maximize_(maxval, val)
void qh_errprint(const char *string, facetT *atfacet, facetT *otherfacet, ridgeT *atridge, vertexT *atvertex)
void qh_meminit(FILE *ferr)
void qh_init_B(coordT *points, int numpoints, int dim, boolT ismalloc)
void qh_initqhull_start(FILE *infile, FILE *outfile, FILE *errfile)
void qh_collectstatistics(void)
void qh_memstatistics(FILE *fp)
void qh_printbegin(FILE *fp, qh_PRINT format, facetT *facetlist, setT *facets, boolT printall)
hpp-fcl
Author(s):
autogenerated on Fri Aug 2 2024 02:45:15