Skip to content

AFNI/NIfTI Server

Sections
Personal tools
You are here: Home » AFNI » Documentation

Doxygen Source Code Documentation


Main Page   Alphabetical List   Data Structures   File List   Data Fields   Globals   Search  

user.h

Go to the documentation of this file.
00001 /*<html><pre>  -<a                             href="qh-user.htm"
00002   >-------------------------------</a><a name="TOP">-</a>
00003 
00004    user.h
00005    user redefinable constants
00006 
00007    see qh-user.htm.  see COPYING for copyright information.
00008 
00009    before reading any code, review qhull.h for data structure definitions and 
00010    the "qh" macro.
00011 */
00012 
00013 #ifndef qhDEFuser
00014 #define qhDEFuser 1
00015 
00016 /*============= data types and configuration macros ==========*/
00017 
00018 /*-<a                             href="qh-user.htm#TOC"
00019   >--------------------------------</a><a name="realT">-</a>
00020   
00021   realT
00022     set the size of floating point numbers
00023   
00024   qh_REALdigits 
00025     maximimum number of significant digits
00026   
00027   qh_REAL_1, qh_REAL_2n, qh_REAL_3n
00028     format strings for printf
00029   
00030   qh_REALmax, qh_REALmin
00031     maximum and minimum (near zero) values  
00032   
00033   qh_REALepsilon
00034     machine roundoff.  Maximum roundoff error for addition and multiplication.
00035     
00036   notes:
00037    Select whether to store floating point numbers in single precision (float)
00038    or double precision (double).
00039    
00040    Use 'float' to save about 8% in time and 25% in space.  This is particularly
00041    help if high-d where convex hulls are space limited.  Using 'float' also
00042    reduces the printed size of Qhull's output since numbers have 8 digits of 
00043    precision.
00044    
00045    Use 'double' when greater arithmetic precision is needed.  This is needed
00046    for Delaunay triangulations and Voronoi diagrams when you are not merging 
00047    facets.
00048 
00049    If 'double' gives insufficient precision, your data probably includes
00050    degeneracies.  If so you should use facet merging (done by default)
00051    or exact arithmetic (see imprecision section of manual, qh-impre.htm).  
00052    You may also use option 'Po' to force output despite precision errors.
00053 
00054    You may use 'long double', but many format statements need to be changed
00055    and you may need a 'long double' square root routine.  S. Grundmann
00056    (sg@eeiwzb.et.tu-dresden.de) has done this.  He reports that the code runs 
00057    much slower with little gain in precision.    
00058 
00059    WARNING: on some machines,    int f(){realT a= REALmax;return (a == REALmax);}
00060       returns False.  Use (a > REALmax/2) instead of (a == REALmax).
00061 
00062    REALfloat =   1      all numbers are 'float' type
00063              =   0      all numbers are 'double' type
00064 */
00065 #define REALfloat 0
00066 
00067 #if (REALfloat == 1)
00068 #define realT float
00069 #define REALmax FLT_MAX
00070 #define REALmin FLT_MIN
00071 #define REALepsilon FLT_EPSILON
00072 #define qh_REALdigits 8   /* maximum number of significant digits */
00073 #define qh_REAL_1 "%6.8g "
00074 #define qh_REAL_2n "%6.8g %6.8g\n"
00075 #define qh_REAL_3n "%6.8g %6.8g %6.8g\n"
00076 
00077 #elif (REALfloat == 0)
00078 #define realT double
00079 #define REALmax DBL_MAX
00080 #define REALmin DBL_MIN
00081 #define REALepsilon DBL_EPSILON
00082 #define qh_REALdigits 16    /* maximum number of significant digits */
00083 #define qh_REAL_1 "%6.16g "
00084 #define qh_REAL_2n "%6.16g %6.16g\n"
00085 #define qh_REAL_3n "%6.16g %6.16g %6.16g\n"
00086 
00087 #else
00088 #error unknown float option
00089 #endif
00090 
00091 /*-<a                             href="qh-user.htm#TOC"
00092   >--------------------------------</a><a name="CPUclock">-</a>
00093   
00094   qh_CPUclock
00095     define the clock() function for reporting the total time spent by Qhull
00096     returns CPU ticks as a 'long int'
00097     qh_CPUclock is only used for reporting the total time spent by Qhull
00098 
00099   qh_SECticks 
00100     the number of clock ticks per second
00101 
00102   notes:
00103     looks for CLOCKS_PER_SEC, CLOCKS_PER_SECOND, or assumes microseconds
00104     to define a custom clock, set qh_CLOCKtype to 0
00105 
00106     if your system does not use clock() to return CPU ticks, replace
00107     qh_CPUclock with the corresponding function.  It is converted
00108     to unsigned long to prevent wrap-around during long runs.
00109    
00110 
00111    Set qh_CLOCKtype to
00112    
00113      1          for CLOCKS_PER_SEC, CLOCKS_PER_SECOND, or microsecond
00114                 Note:  may fail if more than 1 hour elapsed time
00115 
00116      2          use qh_clock() with POSIX times() (see global.c)
00117 */
00118 #define qh_CLOCKtype 1  /* change to the desired number */
00119 
00120 #if (qh_CLOCKtype == 1)
00121 
00122 #if defined (CLOCKS_PER_SECOND)
00123 #define qh_CPUclock    ((unsigned long)clock())  /* return CPU clock */
00124 #define qh_SECticks CLOCKS_PER_SECOND
00125 
00126 #elif defined (CLOCKS_PER_SEC)
00127 #define qh_CPUclock    ((unsigned long)clock())  /* return CPU clock */
00128 #define qh_SECticks CLOCKS_PER_SEC
00129 
00130 #elif defined (CLK_TCK)
00131 #define qh_CPUclock    ((unsigned long)clock())  /* return CPU clock */
00132 #define qh_SECticks CLK_TCK
00133 
00134 #else
00135 #define qh_CPUclock    ((unsigned long)clock())  /* return CPU clock */
00136 #define qh_SECticks 1E6
00137 #endif
00138 
00139 #elif (qh_CLOCKtype == 2)
00140 #define qh_CPUclock    qh_clock()  /* return CPU clock */
00141 #define qh_SECticks 100
00142 
00143 #else /* qh_CLOCKtype == ? */
00144 #error unknown clock option
00145 #endif
00146 
00147 /*-<a                             href="qh-user.htm#TOC"
00148   >--------------------------------</a><a name="RANDOM">-</a>
00149   
00150   qh_RANDOMtype, qh_RANDOMmax, qh_RANDOMseed
00151     define random number generator
00152 
00153     qh_RANDOMint generates a random integer between 0 and qh_RANDOMmax.  
00154     qh_RANDOMseed sets the random number seed for qh_RANDOMint
00155 
00156   Set qh_RANDOMtype (default 5) to:
00157     1       for random() with 31 bits (UCB)
00158     2       for rand() with RAND_MAX or 15 bits (system 5)
00159     3       for rand() with 31 bits (Sun)
00160     4       for lrand48() with 31 bits (Solaris)
00161     5       for qh_rand() with 31 bits (included with Qhull)
00162   
00163   notes:
00164     Random numbers are used by rbox to generate point sets.  Random
00165     numbers are used by Qhull to rotate the input ('QRn' option),
00166     simulate a randomized algorithm ('Qr' option), and to simulate
00167     roundoff errors ('Rn' option).
00168 
00169     Random number generators differ between systems.  Most systems provide
00170     rand() but the period varies.  The period of rand() is not critical
00171     since qhull does not normally use random numbers.  
00172 
00173     The default generator is Park & Miller's minimal standard random
00174     number generator [CACM 31:1195 '88].  It is included with Qhull.
00175 
00176     If qh_RANDOMmax is wrong, qhull will report a warning and Geomview 
00177     output will likely be invisible.
00178 */
00179 #define qh_RANDOMtype 5   /* *** change to the desired number *** */
00180 
00181 #if (qh_RANDOMtype == 1)
00182 #define qh_RANDOMmax ((realT)0x7fffffffUL)  /* 31 bits, random()/MAX */
00183 #define qh_RANDOMint random()
00184 #define qh_RANDOMseed_(seed) srandom(seed);
00185 
00186 #elif (qh_RANDOMtype == 2)
00187 #ifdef RAND_MAX
00188 #define qh_RANDOMmax ((realT)RAND_MAX)
00189 #else
00190 #define qh_RANDOMmax ((realT)32767)   /* 15 bits (System 5) */
00191 #endif
00192 #define qh_RANDOMint  rand()
00193 #define qh_RANDOMseed_(seed) srand((unsigned)seed);
00194   
00195 #elif (qh_RANDOMtype == 3)
00196 #define qh_RANDOMmax ((realT)0x7fffffffUL)  /* 31 bits, Sun */
00197 #define qh_RANDOMint  rand()
00198 #define qh_RANDOMseed_(seed) srand((unsigned)seed);
00199 
00200 #elif (qh_RANDOMtype == 4)
00201 #define qh_RANDOMmax ((realT)0x7fffffffUL)  /* 31 bits, lrand38()/MAX */
00202 #define qh_RANDOMint lrand48()
00203 #define qh_RANDOMseed_(seed) srand48(seed);
00204 
00205 #elif (qh_RANDOMtype == 5)
00206 #define qh_RANDOMmax ((realT)2147483646UL)  /* 31 bits, qh_rand/MAX */
00207 #define qh_RANDOMint qh_rand()
00208 #define qh_RANDOMseed_(seed) qh_srand(seed);
00209 /* unlike rand(), never returns 0 */
00210 
00211 #else
00212 #error: unknown random option
00213 #endif
00214 
00215 /*-<a                             href="qh-user.htm#TOC"
00216   >--------------------------------</a><a name="ORIENTclock">-</a>
00217   
00218   qh_ORIENTclock
00219     0 for inward pointing normals by Geomview convention
00220 */
00221 #define qh_ORIENTclock 0 
00222 
00223 
00224 /*========= performance related constants =========*/
00225 
00226 /*-<a                             href="qh-user.htm#TOC"
00227   >--------------------------------</a><a name="HASHfactor">-</a>
00228   
00229   qh_HASHfactor
00230     total hash slots / used hash slots.  Must be at least 1.1.
00231       
00232   notes:
00233     =2 for at worst 50% occupancy for qh hash_table and normally 25% occupancy
00234 */
00235 #define qh_HASHfactor 2
00236 
00237 /*-<a                             href="qh-user.htm#TOC"
00238   >--------------------------------</a><a name="VERIFYdirect">-</a>
00239   
00240   qh_VERIFYdirect
00241     with 'Tv' verify all points against all facets if op count is smaller
00242 
00243   notes:
00244     if greater, calls qh_check_bestdist() instead
00245 */
00246 #define qh_VERIFYdirect 1000000 
00247 
00248 /*-<a                             href="qh-user.htm#TOC"
00249   >--------------------------------</a><a name="INITIALsearch">-</a>
00250   
00251   qh_INITIALsearch
00252      if qh_INITIALmax, search points up to this dimension
00253 */
00254 #define qh_INITIALsearch 6
00255 
00256 /*-<a                             href="qh-user.htm#TOC"
00257   >--------------------------------</a><a name="INITIALmax">-</a>
00258   
00259   qh_INITIALmax
00260     if dim >= qh_INITIALmax, use min/max coordinate points for initial simplex
00261       
00262   notes:
00263     from points with non-zero determinants
00264     use option 'Qs' to override (much slower)
00265 */
00266 #define qh_INITIALmax 8
00267 
00268 /*-<a                             href="qh-user.htm#TOC"
00269   >--------------------------------</a><a name="JOGGLEdefault">-</a>
00270   
00271   qh_JOGGLEdefault
00272     default qh.JOGGLEmax is qh.DISTround * qh_JOGGLEdefault
00273 
00274   notes:
00275     rbox s r 100 | qhull QJ1e-15 QR0 generates 90% faults at distround 7e-16
00276     rbox s r 100 | qhull QJ1e-14 QR0 generates 70% faults
00277     rbox s r 100 | qhull QJ1e-13 QR0 generates 35% faults
00278     rbox s r 100 | qhull QJ1e-12 QR0 generates 8% faults
00279     rbox s r 100 | qhull QJ1e-11 QR0 generates 1% faults
00280     rbox s r 100 | qhull QJ1e-10 QR0 generates 0% faults
00281     rbox 1000 W0 | qhull QJ1e-12 QR0 generates 86% faults
00282     rbox 1000 W0 | qhull QJ1e-11 QR0 generates 20% faults
00283     rbox 1000 W0 | qhull QJ1e-10 QR0 generates 2% faults
00284     the later have about 20 points per facet, each of which may interfere
00285 
00286     pick a value large enough to avoid retries on most inputs
00287 */
00288 #define qh_JOGGLEdefault 30000.0
00289 
00290 /*-<a                             href="qh-user.htm#TOC"
00291   >--------------------------------</a><a name="JOGGLEincrease">-</a>
00292   
00293   qh_JOGGLEincrease
00294     factor to increase qh.JOGGLEmax on qh_JOGGLEretry or qh_JOGGLEagain
00295 */
00296 #define qh_JOGGLEincrease 10.0
00297 
00298 /*-<a                             href="qh-user.htm#TOC"
00299   >--------------------------------</a><a name="JOGGLEretry">-</a>
00300   
00301   qh_JOGGLEretry
00302     if ZZretry = qh_JOGGLEretry, increase qh.JOGGLEmax
00303 
00304   notes:
00305     try twice at the original value in case of bad luck the first time
00306 */
00307 #define qh_JOGGLEretry 2
00308 
00309 /*-<a                             href="qh-user.htm#TOC"
00310   >--------------------------------</a><a name="JOGGLEagain">-</a>
00311   
00312   qh_JOGGLEagain
00313     every following qh_JOGGLEagain, increase qh.JOGGLEmax
00314 
00315   notes:
00316     1 is OK since it's already failed qh_JOGGLEretry times
00317 */
00318 #define qh_JOGGLEagain 1
00319 
00320 /*-<a                             href="qh-user.htm#TOC"
00321   >--------------------------------</a><a name="JOGGLEmaxincrease">-</a>
00322   
00323   qh_JOGGLEmaxincrease
00324     maximum qh.JOGGLEmax due to qh_JOGGLEincrease
00325     relative to qh.MAXwidth
00326 
00327   notes:
00328     qh.joggleinput will retry at this value until qh_JOGGLEmaxretry
00329 */
00330 #define qh_JOGGLEmaxincrease 1e-2
00331 
00332 /*-<a                             href="qh-user.htm#TOC"
00333   >--------------------------------</a><a name="JOGGLEmaxretry">-</a>
00334   
00335   qh_JOGGLEmaxretry
00336     stop after qh_JOGGLEmaxretry attempts
00337 */
00338 #define qh_JOGGLEmaxretry 100
00339 
00340 /*========= memory constants =========*/
00341 
00342 /*-<a                             href="qh-user.htm#TOC"
00343   >--------------------------------</a><a name="MEMalign">-</a>
00344   
00345   qh_MEMalign
00346     memory alignment for qh_meminitbuffers() in global.c
00347     
00348   notes:
00349     to avoid bus errors, memory allocation must consider alignment requirements.
00350     malloc() automatically takes care of alignment.   Since mem.c manages
00351     its own memory, we need to explicitly specify alignment in
00352     qh_meminitbuffers().
00353 
00354     A safe choice is sizeof(double).  sizeof(float) may be used if doubles 
00355     do not occur in data structures and pointers are the same size.  Be careful
00356     of machines (e.g., DEC Alpha) with large pointers. 
00357 
00358     If using gcc, best alignment is
00359               #define qh_MEMalign fmax_(__alignof__(realT),__alignof__(void *))
00360 */
00361 #define qh_MEMalign fmax_(sizeof(realT), sizeof(void *))
00362 
00363 /*-<a                             href="qh-user.htm#TOC"
00364   >--------------------------------</a><a name="MEMbufsize">-</a>
00365   
00366   qh_MEMbufsize
00367     size of additional memory buffers
00368     
00369   notes:
00370     used for qh_meminitbuffers() in global.c
00371 */
00372 #define qh_MEMbufsize 0x10000       /* allocate 64K memory buffers */
00373 
00374 /*-<a                             href="qh-user.htm#TOC"
00375   >--------------------------------</a><a name="MEMinitbuf">-</a>
00376   
00377   qh_MEMinitbuf
00378     size of initial memory buffer
00379     
00380   notes:
00381     use for qh_meminitbuffers() in global.c
00382 */
00383 #define qh_MEMinitbuf 0x20000      /* initially allocate 128K buffer */
00384 
00385 /*-<a                             href="qh-user.htm#TOC"
00386   >--------------------------------</a><a name="INFINITE">-</a>
00387   
00388   qh_INFINITE
00389     on output, indicates Voronoi center at infinity
00390 */
00391 #define qh_INFINITE  -10.101
00392 
00393 /*-<a                             href="qh-user.htm#TOC"
00394   >--------------------------------</a><a name="DEFAULTbox">-</a>
00395   
00396   qh_DEFAULTbox
00397     default box size (Geomview expects 0.5)
00398 */
00399 #define qh_DEFAULTbox 0.5 
00400 
00401 /*======= conditional compilation ============================*/
00402 
00403 /*-<a                             href="qh-user.htm#TOC"
00404   >--------------------------------</a><a name="compiler">-</a>
00405 
00406   __cplusplus
00407     defined by C++ compilers
00408 
00409   __MSC_VER
00410     defined by Microsoft Visual C++
00411   
00412   __MWERKS__ && __POWERPC__
00413     defined by Metrowerks when compiling for the Power Macintosh
00414 
00415   __STDC__
00416     defined for strict ANSI C 
00417 */
00418 
00419 /*-<a                             href="qh-user.htm#TOC"
00420   >--------------------------------</a><a name="COMPUTEfurthest">-</a>
00421  
00422   qh_COMPUTEfurthest 
00423     compute furthest distance to an outside point instead of storing it with the facet
00424     =1 to compute furthest
00425   
00426   notes:
00427     computing furthest saves memory but costs time
00428       about 40% more distance tests for partitioning
00429       removes facet->furthestdist 
00430 */
00431 #define qh_COMPUTEfurthest 0
00432                          
00433 /*-<a                             href="qh-user.htm#TOC"
00434   >--------------------------------</a><a name="KEEPstatistics">-</a>
00435  
00436   qh_KEEPstatistics   
00437     =0 removes most of statistic gathering and reporting
00438 
00439   notes:
00440     if 0, code size is reduced by about 4%.
00441 */
00442 #define qh_KEEPstatistics 1
00443                        
00444 /*-<a                             href="qh-user.htm#TOC"
00445   >--------------------------------</a><a name="MAXoutside">-</a>
00446  
00447   qh_MAXoutside 
00448     record outer plane for each facet
00449     =1 to record facet->maxoutside
00450   
00451   notes:
00452     this takes a realT per facet and slightly slows down qhull
00453     it produces better outer planes for geomview output 
00454 */
00455 #define qh_MAXoutside 1
00456 
00457 /*-<a                             href="qh-user.htm#TOC"
00458   >--------------------------------</a><a name="NOmerge">-</a>
00459  
00460   qh_NOmerge
00461     disables facet merging if defined
00462     
00463   notes:
00464     This saves about 10% space.
00465     
00466     Unless 'Q0'
00467       qh_NOmerge sets 'QJ' to avoid precision errors
00468 
00469     #define qh_NOmerge    
00470 
00471   see:
00472     <a href="mem.h#NOmem">qh_NOmem</a> in mem.c
00473     
00474     see user.c/user_eg.c for removing io.o
00475 */  
00476     
00477 /*-<a                             href="qh-user.htm#TOC"
00478   >--------------------------------</a><a name="NOtrace">-</a>
00479  
00480   qh_NOtrace
00481     no tracing if defined 
00482   
00483   notes:
00484     This saves about 5% space.
00485 
00486     #define qh_NOtrace
00487 */    
00488 
00489 /*-<a                             href="qh-user.htm#TOC"
00490   >--------------------------------</a><a name="QHpointer">-</a>
00491   
00492   qh_QHpointer
00493     access global data with pointer or static structure
00494 
00495   qh_QHpointer  = 1     access globals via a pointer to allocated memory
00496                         enables qh_saveqhull() and qh_restoreqhull()
00497                         costs about 8% in time and 2% in space
00498 
00499                 = 0     qh_qh and qh_qhstat are static data structures
00500                         only one instance of qhull() can be active at a time
00501                         default value
00502 
00503   notes:
00504     all global variables for qhull are in qh, qhmem, and qhstat
00505     qh is defined in qhull.h
00506     qhmem is defined in mem.h
00507     qhstat is defined in stat.h
00508 
00509   see:
00510     user_eg.c for an example
00511 */
00512 #define qh_QHpointer 0
00513 #if 0  /* sample code */
00514     qhT *oldqhA, *oldqhB;
00515 
00516     exitcode= qh_new_qhull (dim, numpoints, points, ismalloc,
00517                       flags, outfile, errfile); 
00518     /* use results from first call to qh_new_qhull */
00519     oldqhA= qh_save_qhull();
00520     exitcode= qh_new_qhull (dimB, numpointsB, pointsB, ismalloc,
00521                       flags, outfile, errfile); 
00522     /* use results from second call to qh_new_qhull */
00523     oldqhB= qh_save_qhull();
00524     qh_restore_qhull (&oldqhA);
00525     /* use results from first call to qh_new_qhull */
00526     qh_freeqhull (qh_ALL);  /* frees all memory used by first call */
00527     qh_restore_qhull (&oldqhB);
00528     /* use results from second call to qh_new_qhull */
00529     qh_freeqhull (!qh_ALL); /* frees long memory used by second call */
00530     qh_memfreeshort (&curlong, &totlong);  /* frees short memory and memory allocator */
00531 #endif
00532 
00533 /*-<a                             href="qh-user.htm#TOC"
00534   >--------------------------------</a><a name="QUICKhelp">-</a>
00535  
00536   qh_QUICKhelp        
00537     =1 to use abbreviated help messages, e.g., for degenerate inputs
00538 */
00539 #define qh_QUICKhelp    0  
00540 
00541 /* ============ -merge constants- ====================
00542 
00543    These constants effect facet merging.  You probably will not need
00544    to modify these.  They effect the performance of facet merging.
00545 */
00546 
00547 /*-<a                             href="qh-user.htm#TOC"
00548   >--------------------------------</a><a name="DIMmergeVertex">-</a>
00549   
00550   qh_DIMmergeVertex
00551     max dimension for vertex merging (it is not effective in high-d)
00552 */
00553 #define qh_DIMmergeVertex 6
00554 
00555 /*-<a                             href="qh-user.htm#TOC"
00556   >--------------------------------</a><a name="DIMreduceBuild">-</a>
00557   
00558   qh_DIMreduceBuild
00559      max dimension for vertex reduction during build (slow in high-d)
00560 */
00561 #define qh_DIMreduceBuild 5
00562 
00563 /*-<a                             href="qh-user.htm#TOC"
00564   >--------------------------------</a><a name="BESTcentrum">-</a>
00565      
00566   qh_BESTcentrum
00567      if > 2*dim+n vertices, qh_findbestneighbor() tests centrums (faster)
00568      else, qh_findbestneighbor() tests all vertices (much better merges)
00569 
00570   qh_BESTcentrum2
00571      if qh_BESTcentrum2 * DIM3 + BESTcentrum < #vertices tests centrums
00572 */
00573 #define qh_BESTcentrum 20
00574 #define qh_BESTcentrum2 2
00575 
00576 /*-<a                             href="qh-user.htm#TOC"
00577   >--------------------------------</a><a name="BESTnonconvex">-</a>
00578   
00579   qh_BESTnonconvex
00580     if > dim+n neighbors, qh_findbestneighbor() tests nonconvex ridges.
00581     
00582   notes:
00583     It is needed because qh_findbestneighbor is slow for large facets
00584 */
00585 #define qh_BESTnonconvex 15 
00586 
00587 /*-<a                             href="qh-user.htm#TOC"
00588   >--------------------------------</a><a name="MAXnewmerges">-</a>
00589   
00590   qh_MAXnewmerges
00591     if >n newmerges, qh_merge_nonconvex() calls qh_reducevertices_centrums.
00592      
00593   notes:
00594     It is needed because postmerge can merge many facets at once
00595 */
00596 #define qh_MAXnewmerges 2
00597 
00598 /*-<a                             href="qh-user.htm#TOC"
00599   >--------------------------------</a><a name="MAXnewcentrum">-</a>
00600   
00601   qh_MAXnewcentrum
00602     if <= dim+n vertices (n approximates the number of merges),
00603       reset the centrum in qh_updatetested() and qh_mergecycle_facets()
00604     
00605   notes:
00606     needed to reduce cost and because centrums may move too much if 
00607     many vertices in high-d
00608 */
00609 #define qh_MAXnewcentrum 5
00610 
00611 /*-<a                             href="qh-user.htm#TOC"
00612   >--------------------------------</a><a name="COPLANARratio">-</a>
00613   
00614   qh_COPLANARratio
00615     for 3-d+ merging, qh.MINvisible is n*premerge_centrum
00616 
00617   notes:
00618     for non-merging, it's DISTround
00619 */
00620 #define qh_COPLANARratio 3
00621 
00622 /*-<a                             href="qh-user.htm#TOC"
00623   >--------------------------------</a><a name="DISToutside">-</a>
00624   
00625   qh_DISToutside
00626     minimum distance when merging to stop search in qh_findbestnew 
00627     or qh_partitionall
00628    
00629   notes:
00630    if too big then O(n^2) behavior for partitioning in cone
00631    if very small then important points not processed
00632 */
00633 #define qh_DISToutside fmax_(4*qh MINoutside, 2*qh max_outside)
00634 
00635 /*-<a                             href="qh-user.htm#TOC"
00636   >--------------------------------</a><a name="RATIOnearinside">-</a>
00637   
00638   qh_RATIOnearinside
00639     ratio of qh.NEARinside to qh.ONEmerge for retaining inside points for
00640     qh_check_maxout().  
00641   
00642   notes:
00643     This is overkill since do not know the correct value.
00644     It effects whether 'Qc' reports all coplanar points
00645 */
00646 #define qh_RATIOnearinside 5
00647 
00648 /*-<a                             href="qh-user.htm#TOC"
00649   >--------------------------------</a><a name="USEfindbestnew">-</a>
00650   
00651   qh_USEfindbestnew
00652      cut-off between qh_findbest/qh_findbestnew in #merged facets.
00653 */
00654 #define qh_USEfindbestnew 50
00655 
00656 /*-<a                             href="qh-user.htm#TOC"
00657   >--------------------------------</a><a name="WIDEcoplanar">-</a>
00658   
00659   qh_WIDEcoplanar
00660     n*MAXcoplanar or n*MINvisible for a WIDEfacet 
00661     
00662     if vertex is further than qh.WIDEfacet from the hyperplane
00663     then its ridges are not counted in computing the area, and
00664     the facet's centrum is frozen. 
00665     
00666   notes:
00667    qh.WIDEfacet= max(qh.MAXoutside,qh_WIDEcoplanar*qh.MAXcoplanar,
00668       qh_WIDEcoplanar * qh.MINvisible);
00669 */
00670 #define qh_WIDEcoplanar 6
00671 
00672 /*-<a                             href="qh-user.htm#TOC"
00673   >--------------------------------</a><a name="MAXnarrow">-</a>
00674   
00675   qh_MAXnarrow
00676     max. cosine in initial hull that sets qh.NARROWhull
00677        
00678   notes:
00679     If qh.NARROWhull, the initial partition does not make 
00680     coplanar points.  If narrow, a coplanar point can be 
00681     coplanar to two facets of opposite orientations and
00682     distant from the exact convex hull.
00683     
00684     set to -cos( 0.2 ) for about 1:10 ratio between coplanar point and distance to exact hull
00685 */
00686 #define qh_MAXnarrow -0.98
00687 
00688 /*-<a                             href="qh-user.htm#TOC"
00689   >--------------------------------</a><a name="WARNnarrow">-</a>
00690   
00691   qh_WARNnarrow
00692     max. cosine in initial hull to warn about qh.NARROWhull
00693       
00694   notes:
00695     this is a conservative estimate.  
00696     Don't actually see problems until much narrower.  See qh-impre.htm
00697 */
00698 #define qh_WARNnarrow -0.9999
00699 
00700 /*-<a                             href="qh-user.htm#TOC"
00701   >--------------------------------</a><a name="ZEROdelaunay">-</a>
00702   
00703   qh_ZEROdelaunay
00704     a zero Delaunay facet occurs for input sites coplanar with their convex hull
00705     the last normal coefficient of a zero Delaunay facet is within
00706         qh_ZEROdelaunay * qh.ANGLEround of 0
00707       
00708   notes:
00709     qh_ZEROdelaunay does not allow for joggled input ('QJ').
00710 
00711     You can avoid zero Delaunay facets by surrounding the input with a box.
00712 
00713     Use option 'PDk:-n' to explicitly define zero Delaunay facets
00714       k= dimension of input sites (e.g., 3 for 3-d Delaunay triangulation)
00715       n= the cutoff for zero Delaunay facets (e.g., 'PD3:-1e-12')
00716 */
00717 #define qh_ZEROdelaunay 2
00718 
00719 #endif /* qh_DEFuser */
00720 
00721 
00722 
 

Powered by Plone

This site conforms to the following standards: