1 | <!-- Do not edit with Front Page, it adds too many spaces -->
|
---|
2 | <html>
|
---|
3 | <head>
|
---|
4 | <meta http-equiv="Content-Type"
|
---|
5 | content="text/html; charset=iso-8859-1">
|
---|
6 | <title>libqhull.c -- top-level functions and basic data types</title>
|
---|
7 | </head>
|
---|
8 |
|
---|
9 | <body>
|
---|
10 | <!-- Navigation links -->
|
---|
11 | <p><a name="TOP"><b>Up:</b></a> <a
|
---|
12 | href="http://www.qhull.org">Home page</a> for Qhull<br>
|
---|
13 | <b>Up:</b> <a href="../../html/index.htm#TOC">Qhull manual</a>: Table of Contents <br>
|
---|
14 | <b>Up:</b> <a href="../../html/qh-quick.htm#programs">Programs</a>
|
---|
15 | • <a href="../../html/qh-quick.htm#options">Options</a>
|
---|
16 | • <a href="../../html/qh-opto.htm#output">Output</a>
|
---|
17 | • <a href="../../html/qh-optf.htm#format">Formats</a>
|
---|
18 | • <a href="../../html/qh-optg.htm#geomview">Geomview</a>
|
---|
19 | • <a href="../../html/qh-optp.htm#print">Print</a>
|
---|
20 | • <a href="../../html/qh-optq.htm#qhull">Qhull</a>
|
---|
21 | • <a href="../../html/qh-optc.htm#prec">Precision</a>
|
---|
22 | • <a href="../../html/qh-optt.htm#trace">Trace</a><br>
|
---|
23 | <b>Up:</b> <a href="../../html/qh-code.htm#TOC">Qhull code: Table of Contents</a><br>
|
---|
24 | <b>To:</b> <a href="index.htm">Qhull functions</a>, macros, and data structures<br>
|
---|
25 | <b>To:</b> <a href="qh-geom.htm">Geom</a> • <a href="qh-globa.htm">Global</a>
|
---|
26 | • <a href="qh-io.htm">Io</a> • <a href="qh-mem.htm">Mem</a>
|
---|
27 | • <a href="qh-merge.htm">Merge</a> • <a href="qh-poly.htm">Poly</a>
|
---|
28 | • <a href="qh-qhull.htm#TOC">Qhull</a> • <a href="qh-set.htm">Set</a>
|
---|
29 | • <a href="qh-stat.htm">Stat</a> • <a href="qh-user.htm">User</a>
|
---|
30 | </p>
|
---|
31 | <hr>
|
---|
32 |
|
---|
33 | <h2>libqhull.c -- top-level functions and basic data types</h2>
|
---|
34 | <blockquote>
|
---|
35 | <p>Qhull implements the Quickhull algorithm for computing
|
---|
36 | the convex hull. The Quickhull algorithm combines two
|
---|
37 | well-known algorithms: the 2-d quickhull algorithm and
|
---|
38 | the n-d beneath-beyond algorithm. See
|
---|
39 | <a href="../../html/index.htm#description">Description of Qhull</a>. </p>
|
---|
40 | <p>This section provides an index to the top-level
|
---|
41 | functions and base data types. The top-level header file, <tt>libqhull.h</tt>,
|
---|
42 | contains prototypes for these functions.</p>
|
---|
43 | </blockquote>
|
---|
44 | <p><b>Copyright © 1995-2012 C.B. Barber</b></p>
|
---|
45 | <hr>
|
---|
46 | <p><a href="#TOP">»</a> <a href="qh-geom.htm#TOC">Geom</a>
|
---|
47 | <a name="TOC">•</a> <a href="qh-globa.htm#TOC">Global</a>
|
---|
48 | • <a href="qh-io.htm#TOC">Io</a> • <a href="qh-mem.htm#TOC">Mem</a>
|
---|
49 | • <a href="qh-merge.htm#TOC">Merge</a> • <a href="qh-poly.htm#TOC">Poly</a>
|
---|
50 | • <b>Qhull</b> • <a href="qh-set.htm#TOC">Set</a>
|
---|
51 | • <a href="qh-stat.htm#TOC">Stat</a> • <a href="qh-user.htm#TOC">User</a>
|
---|
52 | </p>
|
---|
53 | <h3>Index to <a href="libqhull.c">libqhull.c</a>,
|
---|
54 | <a href="libqhull.h">libqhull.h</a>, and
|
---|
55 | <a href="../qhull/unix.c">unix.c</a></h3>
|
---|
56 | <ul>
|
---|
57 | <li><a href="#qtype">libqhull.h and unix.c data types and
|
---|
58 | constants</a> </li>
|
---|
59 | <li><a href="#qmacro">libqhull.h other macros</a> </li>
|
---|
60 | <li><a href="#qfunc">Quickhull routines in call order</a> </li>
|
---|
61 | <li><a href="#qinit">Top-level routines for initializing and terminating Qhull</a></li>
|
---|
62 | <li><a href="#qin">Top-level routines for reading and modifying the input</a></li>
|
---|
63 | <li><a href="#qcall">Top-level routines for calling Qhull</a></li>
|
---|
64 | <li><a href="#qout">Top-level routines for returning results</a></li>
|
---|
65 | <li><a href="#qtest">Top-level routines for testing and debugging</a></li>
|
---|
66 | </ul>
|
---|
67 |
|
---|
68 | <h3><a href="qh-qhull.htm#TOC">»</a><a name="qtype">libqhull.h and unix.c
|
---|
69 | data types and constants</a></h3>
|
---|
70 | <ul>
|
---|
71 | <li><a href="libqhull.h#flagT">flagT</a> Boolean flag as
|
---|
72 | a bit </li>
|
---|
73 | <li><a href="libqhull.h#boolT">boolT</a> boolean value,
|
---|
74 | either True or False </li>
|
---|
75 | <li><a href="libqhull.h#CENTERtype">CENTERtype</a> to
|
---|
76 | distinguish facet->center </li>
|
---|
77 | <li><a href="libqhull.h#qh_PRINT">qh_PRINT</a> output
|
---|
78 | formats for printing (qh.PRINTout) </li>
|
---|
79 | <li><a href="libqhull.h#qh_ALL">qh_ALL</a> argument flag
|
---|
80 | for selecting everything </li>
|
---|
81 | <li><a href="libqhull.h#qh_ERR">qh_ERR</a> Qhull exit
|
---|
82 | codes for indicating errors </li>
|
---|
83 | <li><a href="libqhull.h#qh_FILEstderr">qh_FILEstderr</a> Fake stderr
|
---|
84 | to distinguish error output from normal output [C++ only]</li>
|
---|
85 | <li><a href="../qhull/unix.c#prompt">qh_prompt</a> version and long prompt for Qhull</li>
|
---|
86 | <li><a href="../qhull/unix.c#prompt2">qh_prompt2</a> synopsis for Qhull</li>
|
---|
87 | <li><a href="../qhull/unix.c#prompt3">qh_prompt3</a> concise prompt for Qhull</li>
|
---|
88 | <li><a href="global.c#qh_version">qh_version</a> version stamp</li>
|
---|
89 | </ul>
|
---|
90 |
|
---|
91 | <h3><a href="qh-qhull.htm#TOC">»</a><a name="qmacro">libqhull.h other
|
---|
92 | macros</a></h3>
|
---|
93 | <ul>
|
---|
94 | <li><a href="qhull_a.h#traceN">traceN</a> print trace
|
---|
95 | message if <em>qh.IStracing >= N</em>. </li>
|
---|
96 | <li><a href="qhull_a.h#QHULL_UNUSED">QHULL_UNUSED</a> declare an
|
---|
97 | unused variable to avoid warnings. </li>
|
---|
98 | </ul>
|
---|
99 |
|
---|
100 | <h3><a href="qh-qhull.htm#TOC">»</a><a name="qfunc">Quickhull
|
---|
101 | routines in call order</a></h3>
|
---|
102 | <ul>
|
---|
103 | <li><a href="../qhull/unix.c#main">main</a> processes the
|
---|
104 | command line, calls qhull() to do the work, and
|
---|
105 | exits </li>
|
---|
106 | <li><a href="libqhull.c#qhull">qh_qhull</a> construct
|
---|
107 | the convex hull of a set of points </li>
|
---|
108 | <li><a href="libqhull.c#build_withrestart">qh_build_withrestart</a>
|
---|
109 | allow restarts while calling qh_buildhull</li>
|
---|
110 | <li><a href="poly2.c#initbuild">qh_initbuild</a>
|
---|
111 | initialize hull and outside sets with point array</li>
|
---|
112 | <li><a href="libqhull.c#partitionall">qh_partitionall</a>
|
---|
113 | partition all points into outside sets </li>
|
---|
114 | <li><a href="libqhull.c#buildhull">qh_buildhull</a>
|
---|
115 | construct a convex hull by adding points one at a
|
---|
116 | time </li>
|
---|
117 | <li><a href="libqhull.c#nextfurthest">qh_nextfurthest</a>
|
---|
118 | return next furthest point for processing </li>
|
---|
119 | <li><a href="libqhull.c#buildtracing">qh_buildtracing</a>
|
---|
120 | trace an iteration of buildhull </li>
|
---|
121 | <li><a href="libqhull.c#addpoint">qh_addpoint</a> add a
|
---|
122 | point to the convex hull </li>
|
---|
123 | <li><a href="libqhull.c#findhorizon">qh_findhorizon</a>
|
---|
124 | find the horizon and visible facets for a point </li>
|
---|
125 | <li><a href="libqhull.c#partitionvisible">qh_partitionvisible</a>
|
---|
126 | partition points from facets in qh.visible_list
|
---|
127 | to facets in qh.newfacet_list </li>
|
---|
128 | <li><a href="libqhull.c#partitionpoint">qh_partitionpoint</a>
|
---|
129 | partition a point as inside, coplanar with, or
|
---|
130 | outside a facet </li>
|
---|
131 | <li><a href="libqhull.c#partitioncoplanar">qh_partitioncoplanar</a>
|
---|
132 | partition coplanar point into a facet </li>
|
---|
133 | <li><a href="libqhull.c#precision">qh_precision</a> restart on precision errors if not merging and if 'QJn'</li>
|
---|
134 | </ul>
|
---|
135 |
|
---|
136 | <h3><a href="qh-qhull.htm#TOC">»</a><a name="qinit">Top-level routines for initializing and terminating Qhull (in other modules)</a></h3>
|
---|
137 | <ul>
|
---|
138 | <li><a href="global.c#freebuild">qh_freebuild</a>
|
---|
139 | free memory used by qh_initbuild and qh_buildhull
|
---|
140 | </li>
|
---|
141 | <li><a href="global.c#checkflags">qh_checkflags</a>
|
---|
142 | check flags for multiple frontends to qhull
|
---|
143 | <li><a href="global.c#freeqhull">qh_freeqhull</a>
|
---|
144 | free memory used by qhull </li>
|
---|
145 | <li><a href="global.c#init_A">qh_init_A</a> called
|
---|
146 | before error handling initialized </li>
|
---|
147 | <li><a href="global.c#init_B">qh_init_B</a> called
|
---|
148 | after points are defined </li>
|
---|
149 | <li><a href="global.c#initflags">qh_initflags</a> set
|
---|
150 | flags and constants from command line </li>
|
---|
151 | <li><a href="rboxlib.c#rboxpoints">qh_rboxpoints</a>
|
---|
152 | generate points for qhull </li>
|
---|
153 | <li><a href="global.c#restore_qhull">qh_restore_qhull</a>
|
---|
154 | restores a saved qhull </li>
|
---|
155 | <li><a href="global.c#save_qhull">qh_save_qhull</a>
|
---|
156 | saves qhull for later restoring </li>
|
---|
157 | <li><a href="user.c#user_memsizes">qh_user_memsizes</a>
|
---|
158 | define additional quick allocation sizes
|
---|
159 | </li>
|
---|
160 | </ul>
|
---|
161 |
|
---|
162 | <h3><a href="qh-qhull.htm#TOC">»</a><a name="qin">Top-level routines for reading and modifying the input (in other modules)</a></h3>
|
---|
163 | <ul>
|
---|
164 | <li><a href="geom2.c#gram_schmidt">qh_gram_schmidt</a>
|
---|
165 | implements Gram-Schmidt orthogonalization by rows </li>
|
---|
166 | <li><a href="geom2.c#projectinput">qh_projectinput</a>
|
---|
167 | project input along one or more dimensions +
|
---|
168 | Delaunay projection </li>
|
---|
169 | <li><a href="geom2.c#randommatrix">qh_randommatrix</a>
|
---|
170 | generate a random dimXdim matrix in range (-1,1) </li>
|
---|
171 | <li><a href="io.c#readpoints">qh_readpoints</a> read
|
---|
172 | points from input </li>
|
---|
173 | <li><a href="geom2.c#rotateinput">qh_rotateinput</a> rotate
|
---|
174 | input points using row matrix </li>
|
---|
175 | <li><a href="geom2.c#scaleinput">qh_scaleinput</a> scale
|
---|
176 | input points using qh low_bound/high_bound </li>
|
---|
177 | <li><a href="geom2.c#setdelaunay">qh_setdelaunay</a> project
|
---|
178 | points to paraboloid for Delaunay triangulation </li>
|
---|
179 | <li><a href="geom2.c#sethalfspace_all">qh_sethalfspace_all</a>
|
---|
180 | generate dual for halfspace intersection with interior
|
---|
181 | point </li>
|
---|
182 | </ul>
|
---|
183 |
|
---|
184 | <h3><a href="qh-qhull.htm#TOC">»</a><a name="qcall">Top-level routines for calling Qhull (in other modules)</a></h3>
|
---|
185 | <ul>
|
---|
186 | <li><a href="libqhull.c#addpoint">qh_addpoint</a> add
|
---|
187 | point to convex hull </li>
|
---|
188 | <li><a href="poly2.c#findbestfacet">qh_findbestfacet</a>
|
---|
189 | find facet that is furthest below a point </li>
|
---|
190 | <li><a href="poly2.c#findfacet_all">qh_findfacet_all</a>
|
---|
191 | exhaustive search for facet below a point </li>
|
---|
192 | <li><a href="libqhull.c#qhull">qh_qhull</a> construct
|
---|
193 | the convex hull of a set of points </li>
|
---|
194 | </ul>
|
---|
195 |
|
---|
196 | <h3><a href="qh-qhull.htm#TOC">»</a><a name="qout">Top-level routines for returning results (in other modules)</a></h3>
|
---|
197 | <ul>
|
---|
198 | <li><a href="stat.c#collectstatistics">qh_collectstatistics</a>
|
---|
199 | collect statistics for qh.facet_list </li>
|
---|
200 | <li><a href="poly2.c#nearvertex">qh_nearvertex</a>
|
---|
201 | return nearest vertex to point </li>
|
---|
202 | <li><a href="poly2.c#point">qh_point</a> return point
|
---|
203 | for a point ID </li>
|
---|
204 | <li><a href="poly2.c#pointfacet">qh_pointfacet</a>
|
---|
205 | return temporary set of facets indexed by point
|
---|
206 | ID </li>
|
---|
207 | <li><a href="poly.c#pointid">qh_pointid</a> return ID
|
---|
208 | for a point</li>
|
---|
209 | <li><a href="poly2.c#pointvertex">qh_pointvertex</a>
|
---|
210 | return vertices (if any) for all points</li>
|
---|
211 | <li><a href="stat.c#printallstatistics">qh_printallstatistics</a>
|
---|
212 | print all statistics </li>
|
---|
213 | <li><a href="io.c#printneighborhood">qh_printneighborhood</a>
|
---|
214 | print neighborhood of one or two facets </li>
|
---|
215 | <li><a href="libqhull.c#printsummary">qh_printsummary</a>
|
---|
216 | print summary </li>
|
---|
217 | <li><a href="io.c#produce_output">qh_produce_output</a>
|
---|
218 | print the results of qh_qhull() </li>
|
---|
219 | <li><a href="poly2.c#setvoronoi_all">qh_setvoronoi_all</a>
|
---|
220 | compute Voronoi centers for all facets </li>
|
---|
221 | </ul>
|
---|
222 |
|
---|
223 | <h3><a href="qh-qhull.htm#TOC">»</a><a name="qtest">Top-level routines for testing and debugging (in other modules)</a></h3>
|
---|
224 | <ul>
|
---|
225 | <li><a href="io.c#dfacet">dfacet</a> print facet by
|
---|
226 | ID from debugger </li>
|
---|
227 | <li><a href="io.c#dvertex">dvertex</a> print vertex
|
---|
228 | by ID from debugger </li>
|
---|
229 | <li><a href="poly2.c#check_output">qh_check_output</a>
|
---|
230 | check output </li>
|
---|
231 | <li><a href="poly2.c#check_points">qh_check_points</a>
|
---|
232 | verify that all points are inside the convex hull
|
---|
233 | </li>
|
---|
234 | <li><a href="user.c#errexit">qh_errexit</a> report
|
---|
235 | error with a facet and a ridge</li>
|
---|
236 | <li><a href="libqhull.c#errexit2">qh_errexit2</a> report
|
---|
237 | error with two facets </li>
|
---|
238 | <li><a href="user.c#errprint">qh_errprint</a> print
|
---|
239 | erroneous facets, ridge, and vertex </li>
|
---|
240 | <li><a href="user.c#printfacetlist">qh_printfacetlist</a>
|
---|
241 | print all fields for a list of facets </li>
|
---|
242 | </ul>
|
---|
243 |
|
---|
244 | <p><!-- Navigation links --> </p>
|
---|
245 | <hr>
|
---|
246 | <p><b>Up:</b>
|
---|
247 | <a href="http://www.qhull.org">Home page for
|
---|
248 | Qhull</a> <br>
|
---|
249 | <b>Up:</b> <a href="../../html/index.htm#TOC">Qhull manual: Table of Contents</a> <br>
|
---|
250 | <b>Up:</b> <a href="../../html/qh-quick.htm#programs">Programs</a>
|
---|
251 | • <a href="../../html/qh-quick.htm#options">Options</a>
|
---|
252 | • <a href="../../html/qh-opto.htm#output">Output</a>
|
---|
253 | • <a href="../../html/qh-optf.htm#format">Formats</a>
|
---|
254 | • <a href="../../html/qh-optg.htm#geomview">Geomview</a>
|
---|
255 | • <a href="../../html/qh-optp.htm#print">Print</a>
|
---|
256 | • <a href="../../html/qh-optq.htm#qhull">Qhull</a>
|
---|
257 | • <a href="../../html/qh-optc.htm#prec">Precision</a>
|
---|
258 | • <a href="../../html/qh-optt.htm#trace">Trace</a><br>
|
---|
259 | <b>Up:</b> <a href="../../html/qh-code.htm#TOC">Qhull code: Table of Contents</a> <br>
|
---|
260 | <b>To:</b> <a href="index.htm">Qhull functions</a>, macros, and data structures<br>
|
---|
261 | <b>To:</b> <a href="qh-geom.htm">Geom</a> •
|
---|
262 | <a href="qh-globa.htm">Global</a> • <a href="qh-io.htm">Io</a>
|
---|
263 | • <a href="qh-mem.htm">Mem</a> • <a href="qh-merge.htm">Merge</a>
|
---|
264 | • <a href="qh-poly.htm">Poly</a> • <a href="qh-qhull.htm#TOC">Qhull</a>
|
---|
265 | • <a href="qh-set.htm">Set</a> • <a href="qh-stat.htm">Stat</a>
|
---|
266 | • <a href="qh-user.htm">User</a><br>
|
---|
267 | </p>
|
---|
268 | <p><!-- GC common information --> </p>
|
---|
269 | <hr>
|
---|
270 | <p><a href="http://www.geom.uiuc.edu/"><img
|
---|
271 | src="../../html/qh--geom.gif" align="middle" width="40" height="40"></a><i>The
|
---|
272 | Geometry Center Home Page </i></p>
|
---|
273 | <p>Comments to: <a href=mailto:qhull@qhull.org>qhull@qhull.org</a>
|
---|
274 | </a><br>
|
---|
275 | Created: May 2, 1997 --- <!-- hhmts start --> Last modified: see top <!-- hhmts end --> </p>
|
---|
276 | </body>
|
---|
277 | </html>
|
---|