Doxygen Source Code Documentation
unix.c File Reference
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include <math.h>
#include "qhull.h"
#include "mem.h"
#include "qset.h"
Go to the source code of this file.
Functions | |
int | isatty (int) |
int | main (int argc, char *argv[]) |
Variables | |
char | qh_version [] = "version 3.0 2001/02/11" |
char | qh_prompta [] |
char | qh_promptb [] |
char | qh_promptc [] |
char | qh_promptd [] |
char | qh_prompte [] |
char | qh_prompt2 [] |
char | qh_prompt3 [] |
Function Documentation
|
Referenced by compress(), f__canseek(), f__isdev(), main(), s_paus(), testf(), uncompress(), and write_stream(). |
|
\** File : SUMA.c
Input paramters :
Definition at line 328 of file unix.c. References argc, boolT, coordT, isatty(), qh, qh_check_output(), qh_check_points(), qh_DEFAULTbox, qh_ERRnone, qh_freeqhull(), qh_init_A(), qh_init_B(), qh_initflags(), qh_memfreeshort(), qh_produce_output(), qh_prompt2, qh_prompt3, qh_prompta, qh_promptb, qh_promptc, qh_promptd, qh_prompte, qh_qhull(), qh_readpoints(), and qh_version.
00328 { 00329 int curlong, totlong; /* used !qh_NOmem */ 00330 int exitcode, numpoints, dim; 00331 coordT *points; 00332 boolT ismalloc; 00333 00334 #if __MWERKS__ && __POWERPC__ 00335 char inBuf[BUFSIZ], outBuf[BUFSIZ], errBuf[BUFSIZ]; 00336 SIOUXSettings.showstatusline= false; 00337 SIOUXSettings.tabspaces= 1; 00338 SIOUXSettings.rows= 40; 00339 if (setvbuf (stdin, inBuf, _IOFBF, sizeof(inBuf)) < 0 /* w/o, SIOUX I/O is slow*/ 00340 || setvbuf (stdout, outBuf, _IOFBF, sizeof(outBuf)) < 0 00341 || (stdout != stderr && setvbuf (stderr, errBuf, _IOFBF, sizeof(errBuf)) < 0)) 00342 fprintf (stderr, "qhull internal warning (main): could not change stdio to fully buffered.\n"); 00343 argc= ccommand(&argv); 00344 #endif 00345 00346 if ((argc == 1) && isatty( 0 /*stdin*/)) { 00347 fprintf(stdout, qh_prompt2, qh_version); 00348 exit(qh_ERRnone); 00349 } 00350 if (argc > 1 && *argv[1] == '-' && !*(argv[1]+1)) { 00351 fprintf(stdout, qh_prompta, qh_version, qh_DEFAULTbox, 00352 qh_promptb, qh_promptc, qh_promptd, qh_prompte); 00353 exit(qh_ERRnone); 00354 } 00355 if (argc >1 && *argv[1] == '.' && !*(argv[1]+1)) { 00356 fprintf(stdout, qh_prompt3, qh_version); 00357 exit(qh_ERRnone); 00358 } 00359 qh_init_A (stdin, stdout, stderr, argc, argv); /* sets qh qhull_command */ 00360 exitcode= setjmp (qh errexit); /* simple statement for CRAY J916 */ 00361 if (!exitcode) { 00362 qh_initflags (qh qhull_command); 00363 points= qh_readpoints (&numpoints, &dim, &ismalloc); 00364 qh_init_B (points, numpoints, dim, ismalloc); 00365 qh_qhull(); 00366 qh_check_output(); 00367 qh_produce_output(); 00368 if (qh VERIFYoutput && !qh FORCEoutput && !qh STOPpoint && !qh STOPcone) 00369 qh_check_points(); 00370 exitcode= qh_ERRnone; 00371 } 00372 qh NOerrexit= True; /* no more setjmp */ 00373 #ifdef qh_NOmem 00374 qh_freeqhull( True); 00375 #else 00376 qh_freeqhull( False); 00377 qh_memfreeshort (&curlong, &totlong); 00378 if (curlong || totlong) 00379 fprintf (stderr, "qhull internal warning (main): did not free %d bytes of long memory (%d pieces)\n", 00380 totlong, curlong); 00381 #endif 00382 return exitcode; 00383 } /* main */ |
Variable Documentation
|
Definition at line 227 of file unix.c. Referenced by main(). |
|
Definition at line 276 of file unix.c. Referenced by main(). |
|
Initial value: "\n\ qhull- compute convex hulls and related structures.\n\ http://www.geom.umn.edu/locate/qhull %s\n\ \n\ input (stdin):\n\ first lines: dimension and number of points (or vice-versa).\n\ other lines: point coordinates, best if one point per line\n\ comments: start with a non-numeric character\n\ halfspaces: use dim plus one and put offset after coefficients.\n\ May be preceeded by a single interior point ('H').\n\ \n\ options:\n\ d - Delaunay triangulation by lifting points to a paraboloid\n\ d Qu - furthest-site Delaunay triangulation (upper convex hull)\n\ v - Voronoi diagram (dual of the Delaunay triangulation)\n\ v Qu - furthest-site Voronoi diagram\n\ Hn,n,... - halfspace intersection about point [n,n,0,...]\n\ QJ - joggle input instead of merging facets\n\ Qc - keep coplanar points with nearest facet\n\ Qi - keep interior points with nearest facet\n\ \n\ Qhull control options:\n\ Qbk:n - scale coord k so that low bound is n\n\ QBk:n - scale coord k so that upper bound is n (QBk is %2.2g)\n\ QbB - scale input to unit cube centered at the origin\n\ Qbb - scale last coordinate to [0,m] for Delaunay triangulations\n\ Qbk:0Bk:0 - remove k-th coordinate from input\n\ QJn - randomly joggle input in range [-n,n]\n\ QRn - random rotation (n=seed, n=0 time, n=-1 time/no rotate)\n\ %s%s%s%s" Definition at line 65 of file unix.c. Referenced by main(). |
|
Initial value: "\ Qf - partition point to furthest outside facet\n\ Qg - only build good facets (needs 'QGn', 'QVn', or 'PdD')\n\ Qm - only process points that would increase max_outside\n\ Qr - process random outside points instead of furthest ones\n\ Qs - search all points for the initial simplex\n\ Qu - for 'd' or 'v', compute upper hull without point at-infinity\n\ returns furthest-site Delaunay triangulation\n\ Qv - test vertex neighbors for convexity\n\ Qx - exact pre-merges (skips coplanar and angle-coplanar facets)\n\ Qz - add point-at-infinity to Delaunay triangulation\n\ QGn - good facet if visible from point n, -n for not visible\n\ QVn - good facet if it includes point n, -n if not\n\ Q0 - turn off default premerge with 'C-0'/'Qx'\n\ Q1 - sort merges by type instead of angle\n\ Q2 - merge all non-convex at once instead of independent sets\n\ Q3 - do not merge redundant vertices\n\ Q4 - avoid old->new merges\n\ Q5 - do not correct outer planes at end of qhull\n\ Q6 - do not pre-merge concave or coplanar facets\n\ Q7 - depth-first processing instead of breadth-first\n\ Q8 - do not process near-inside points\n\ Q9 - process furthest of furthest points\n\ \n\ " Definition at line 95 of file unix.c. Referenced by main(). |
|
Definition at line 120 of file unix.c. Referenced by main(). |
|
Definition at line 157 of file unix.c. Referenced by main(). |
|
Initial value: "\ Geomview options (2-d, 3-d, and 4-d; 2-d Voronoi)\n\ Ga - all points as dots\n\ Gp - coplanar points and vertices as radii\n\ Gv - vertices as spheres\n\ Gi - inner planes only\n\ Gn - no planes\n\ Go - outer planes only\n\ Gc - centrums\n\ Gh - hyperplane intersections\n\ Gr - ridges\n\ GDn - drop dimension n in 3-d and 4-d output\n\ Gt - for 3-d 'd', transparent outer ridges\n\ \n\ Print options:\n\ PAn - keep n largest facets by area\n\ Pdk:n - drop facet if normal[k] <= n (default 0.0)\n\ PDk:n - drop facet if normal[k] >= n\n\ Pg - print good facets (needs 'QGn' or 'QVn')\n\ PFn - keep facets whose area is at least n\n\ PG - print neighbors of good facets\n\ PMn - keep n facets with most merges\n\ Po - force output. If error, output neighborhood of facet\n\ Pp - do not report precision problems\n\ \n\ . - list of all options\n\ - - one line descriptions of all options\n\ " Definition at line 191 of file unix.c. Referenced by main(). |
|
Definition at line 54 of file unix.c. Referenced by main(). |