Up: Home page for Qhull (local)
Up: Qhull manual: Table of Contents
Up: Programs • Options • Output • Formats • Geomview • Print • Qhull • Precision • Trace • Functions (local)
Up: Qhull code
To: Geom • Global • Io • Mem • Merge • Poly • Qhull • Set • Stat • User

## user.c -- user-definable operations

> This section contains functions and constants that the user may want to change.

Copyright © 1995-2019 C.B. Barber

» Geom • Global • Io • Mem • Merge • Poly • Qhull • Set • Stat • User

### Index to user.c, usermem.c, userprintf.c, userprintf_rbox.c and user.h

- qhull library constants
- user.h data types and configuration macros
- joggle constants
- performance related constants
- memory constants
- conditional compilation
- merge constants
- user.c functions
- usermem.c functions
- userprintf.c functions

### »Qhull library constants

- FILENAMElen -- max length of TI or TO filename
- msgcode -- unique message codes for qh_fprintf
- qh_OPTIONline -- max length of option line ('FO')

### »user.h data types and configuration macros

- realT, qh_REAL... size of floating point numbers
- countT, COUNTmax size of counts and identifiers, typically 'int' or 'long long'
- qh_CPUclock clock() function for reporting the total time spent by Qhull
- qh_RANDOM... random number generator

### »definition constants

- qh_DEFAULTbox define default box size for rbox, 'Qbb', and 'QbB' (Geomview expects 0.5)
- qh_INFINITE on output, indicates Voronoi center at infinity
- qh_ORIENTclock define convention for orienting facets
- qh_RANDOMdist for testing qh.DISTround (sets qh.RANDOMfactor for qh.RANDOMdist, same as option 'Rn')

### »joggle constants

- qh_JOGGLEagain how often to retry before using qh_JOGGLEmaxincrease again
- qh_JOGGLEdefault default value for qh.JOGGLEmax for 'QP'
- qh_JOGGLEincrease factor to increase qh.JOGGLEmax on retrys for 'QPn'
- qh_JOGGLEmaxincrease max for increasing qh.JOGGLEmax relative to qh.MAXwidth
- qh_JOGGLEmaxretry report error if this many retries
- qh_JOGGLEretry how often to retry before using qh_JOGGLEmax

### »performance related constants

- qh_HASHfactor total/used hash slots
- qh_INITIALmax if dim >= qh_INITIALmax, use min/max coordinate points for initial simplex
- qh_INITIALsearch if qh.INITIALmax, search points up to this dimension
- qh_NOtrace disallow tracing
- qh_VERIFYdirect 'Tv' verifies all points X facets if op count is smaller

### »memory constants

- qh_MEMalign memory alignment for qh_meminitbuffers() in global.c
- qh_MEMbufsize size of additional memory buffers
- qh_MEMinitbuf size of initial memory buffer

### »conditional compilation

- compiler defined symbols, e.g., _STDC_ and _cplusplus
- qh_COMPUTEfurthest compute furthest distance to an outside point instead of storing it with the facet
- qh_KEEPstatistics enable statistic gathering and reporting with option 'Ts'
- qh_MAXcheckpoint report up to qh_MAXcheckpoint errors per facet in qh_check_point ('Tv')
- qh_MAXoutside record outer plane for each facet
- qh_NOmerge disable facet merging
- qh_NOtrace disable tracing with option 'T4'
- qh_QHpointer access global data with pointer or static structure
- qh_QUICKhelp use abbreviated help messages, e.g., for degenerate inputs

### »merge constants

- qh_BESTcentrum if many vertices for facet, qh_findbestneighbor tests centrums instead of vertices
- qh_BESTnonconvex if many neighbors for facet, qh_findbestneighbor only tests nonconvex ridges
- qh_COPLANARratio what is qh.MINvisible?
- qh_DIMreduceBuild max dimension for vertex reduction
- qh_DIMmergeVertex max dimension for vertex merging
- qh_DISToutside when is a point clearly outside of a facet for qh_findbestnew and qh_partitionall
- qh_MAXnarrow max. cosine for qh.NARROWhull
- qh_MAXcoplanarcentrum if 'Qx' and many merges, use f.maxoutside for coplanarity test instead of qh.centrum_radius
- qh_MAXnarrow max. cosine in initial hull that sets qh.NARROWhull
- qh_MAXnewcentrum when does qh_reducevertices_centrum() reset the centrum?
- qh_MAXnewmerges when does qh_merge_nonconvex() call qh_reducevertices_centrums?
- qh_RATIOconcavehorizon ratio of horizon vertex distance to qh.max_outside for concave, twisted new facets in qh_test_nonsimplicial_merge
- qh_RATIOconvexmerge ratio of vertex distance to qh.min_vertex for clearly convex new facets in qh_test_nonsimplicial_merge
- qh_RATIOcoplanarapex ratio of best distance for coplanar apex vs. vertex merge in qh_getpinchedmerges
- qh_RATIOcoplanaroutside ratio to repartition a coplanar point as an outside point in qh_partitioncoplanar and qh_check_maxout
- qh_RATIOmaxsimplex ratio for searching all points in qh_maxsimplex
- qh_RATIOnearinside ratio for retaining inside points for qh_check_maxout
- qh_RATIOpinchedsubridge ratio to qh.ONEmerge to accept vertices in qh_findbest_pinchedvertex
- qh_RATIOtrypinched ratio to qh.ONEmerge to try qh_getpinchedmerges in qh_buildcone_mergepinched
- qh_RATIOtwisted maximum ratio to qh.ONEmerge to merge twisted facets in qh_merge_twisted
- qh_SEARCHdist when is facet coplanar with the best facet for qh_findbesthorizon
- qh_USEfindbestnew when to use qh_findbestnew for qh_partitionpoint()
- qh_WARNnarrow max. cosine in initial hull to warn about qh.NARROWhull
- qh_WIDEcoplanar what is a wide facet
- qh_WIDEduplicate merge ratio for errexit from qh_forcedmerges due to duplicate ridge
- qh_WIDEridge merge ratio for selecting a forced dupridge merge
- qh_WIDEmaxoutside precision ratio for maximum increase for qh.max_outside in qh_check_maxout
- qh_WIDEmaxoutside2 precision ratio for maximum qh.max_outside in qh_check_maxout
- qh_WIDEpinched merge ratio for distance between pinched vertices compared to current facet width for qh_getpinchedmerges and qh_next_vertexmerge
- qh_ZEROdelaunay define facets that are ignored in Delaunay triangulations

### »user.c functions

- Qhull template for calling qh_new_qhull from your program
- qh_errexit report error and exit qhull()
- qh_errprint print information about facets and ridges
- qh_new_qhull call qhull on an array of points
- qh_printfacetlist print all fields of all facets
- qh_printhelp_degenerate prints descriptive message for precision error
- qh_printhelp_internal print help message for an internal error
- qh_printhelp_narrowhull prints descriptive message to warn about a narrow hull
- qh_printhelp_singular print help message for singular data
- qh_printhelp_topology print help message for a topology error due to merging
- qh_printhelp_wide print help message for a wide merge error
- qh_user_memsizes define additional quick allocation sizes

### »usermem.c functions

- qh_exit exit program, same as exit(). May be redefined as throw "QH10003.." by libqhullcpp/usermem_r-cpp.cpp
- qh_fprintf_stderr print to stderr when qh.ferr is not defined.
- qh_free free memory, same as free().
- qh_malloc allocate memory, same as malloc()

### »userprintf.c and userprintf_rbox,c functions

- qh_fprintf print information from Qhull, sames as fprintf().
- qh_fprintf_rbox print information from Rbox, sames as fprintf().

Up: Home page for Qhull (local)
Up: Qhull manual: Table of Contents
Up: Programs • Options • Output • Formats • Geomview • Print • Qhull • Precision • Trace • Functions (local)
Up: Qhull code
To: Geom • Global • Io • Mem • Merge • Poly • Qhull • Set • Stat • User

The Geometry Center Home Page

Comments to: qhull@qhull.org
Created: May 2, 1997 --- Last modified: see top