1
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
5
<title>qhull -- convex hull and related structures</title>
9
<!-- Navigation links -->
10
<p><b><a name="TOP">Up</a></b><b>:</b> <a href="http://www.geom.umn.edu/software/qhull">Home page</a> for Qhull<br>
11
<b>Up:</b> <a href="index.htm#TOC">Qhull manual</a>: Table of Contents<br>
12
<b>To:</b> <a href="qh-quick.htm#programs">Programs</a>
13
• <a href="qh-quick.htm#options">Options</a>
14
• <a href="qh-opto.htm#output">Output</a>
15
• <a href="qh-optf.htm#format">Formats</a>
16
• <a href="qh-optg.htm#geomview">Geomview</a>
17
• <a href="qh-optp.htm#print">Print</a>
18
• <a href="qh-optq.htm#qhull">Qhull</a>
19
• <a href="qh-optc.htm#prec">Precision</a>
20
• <a href="qh-optt.htm#trace">Trace</a><br>
21
<b>To:</b> <a href="#synopsis">sy</a>nopsis • <a href="#input">in</a>put
22
• <a href="#outputs">ou</a>tputs • <a href="#controls">co</a>ntrols
23
• <a href="#options">op</a>tions
25
<!-- Main text of document -->
27
href="http://www.geom.umn.edu/graphics/pix/Special_Topics/Computational_Geometry/cone.html"><img
28
src="qh--cone.gif" alt="[cone]" align="middle" width="100"
29
height="100"></a>qhull -- convex hull and related structures</h1>
31
<p>The convex hull of a set of points is the smallest convex set
32
containing the points. The Delaunay triangulation and furthest-site
33
Delaunay triangulation are equivalent to a convex hull in one
34
higher dimension. Halfspace intersection about a point is
35
equivalent to a convex hull by polar duality.
37
<p>The <tt>qhull</tt> program provides options to build these
38
structures and to experiment with the process. Use the
39
<a href=qconvex.htm>qconvex</a>,
40
<a href=qdelaun.htm>qdelaunay</a>, <a href=qhalf.htm>qhalf</a>,
41
and <a href=qvoronoi.htm>qvoronoi</a> programs
42
to build specific structures. You may use <tt>qhull</tt> instead.
43
It takes the same options and uses the same code.
46
<dt><b>Example:</b> rbox 1000 D3 | qhull
47
<a href="qh-optc.htm#Cn">C-1e-4</a>
48
<a href="qh-optf.htm#FO">FO</a>
49
<a href="qh-optt.htm#Ts">Ts</a>
51
<dd>Compute the 3-d convex hull of 1000 random
53
Centrums must be 10^-4 below neighboring
54
hyperplanes. Print the options and precision constants.
55
When done, print statistics. These options may be
56
used with any of the Qhull programs.</dd>
58
<dt><b>Example:</b> rbox 1000 D3 | qhull <a href=qhull.htm#outputs>d</a>
59
<a href="qh-optc.htm#Rn">R1e-4</a>
60
<a href="qh-optq.htm#Q0">Q0</a></dt>
61
<dd>Compute the 3-d Delaunay triangulation of 1000 random
62
points. Randomly perturb all calculations by
63
[0.9999,1.0001]. Do not correct precision problems.
64
This leads to serious precision errors.</dd>
67
<p>Use the following equivalences when calling <tt>qhull</tt> in 2-d to 4-d (a 3-d
68
Delaunay triangulation is a 4-d convex hull):
72
<a href="qconvex.htm">qconvex</a> == qhull
74
<a href=qdelaun.htm>qdelaunay</a> == qhull d <a href="qh-optq.htm#Qbb">Qbb</a>
76
<a href=qhalf.htm>qhalf</a> == qhull H
78
<a href=qvoronoi.htm>qvoronoi</a> == qhull v <a href="qh-optq.htm#Qbb">Qbb</a>
82
<p>Use the following equivalences when calling <tt>qhull</tt> in 5-d and higher (a 4-d
83
Delaunay triangulation is a 5-d convex hull):
87
<a href="qconvex.htm">qconvex</a> == qhull <a href="qh-optq.htm#Qx">Qx</a>
89
<a href=qdelaun.htm>qdelaunay</a> == qhull d <a href="qh-optq.htm#Qbb">Qbb</a> <a href="qh-optq.htm#Qx">Qx</a>
91
<a href=qhalf.htm>qhalf</a> == qhull H <a href="qh-optq.htm#Qx">Qx</a>
93
<a href=qvoronoi.htm>qvoronoi</a> == qhull v <a href="qh-optq.htm#Qbb">Qbb</a> <a href="qh-optq.htm#Qx">Qx</a>
98
<p>If you use '<a href="qh-optq.htm#Qt">Qt</a>' (triangulated output),
99
all furthest-site Delaunay regions
100
will be simplicial (e.g., triangles in 2-d). Some regions may be
101
degenerate and have zero area. Qhull can identify coincident
102
points. With facet merging, cocircular and cospherical extreme points will lead
103
to non-simplicial output (e.g., a square).
105
<p>If you use '<a href="qh-optq.htm#QJn">QJ</a>' (joggle), all furthest-site
106
Delaunay regions will be simplicial (e.g., triangles in 2-d). Duplicate points will
107
create small regions since the points are joggled apart. See <a
108
href="qh-impre.htm#joggle">Joggled input or merged facets</a>. </p>
110
<p>The output for 4-d convex hulls may be confusing if the convex
111
hull contains non-simplicial facets (e.g., a hypercube). See
112
<a href=qh-faq.htm#extra>Why
113
are there extra points in a 4-d or higher convex hull?</a><br>
116
<p><b>Copyright © 1995-2002 The Geometry Center, Minneapolis MN</b></p>
120
<h3><a href="#TOP">�</a><a name="synopsis">qhull synopsis</a></h3>
122
qhull- compute convex hulls and related structures.
123
input (stdin): dimension, n, point coordinates
124
comments start with a non-numeric character
125
halfspace: use dim+1 and put offsets after coefficients
127
options (qh-quick.htm):
128
d - Delaunay triangulation by lifting points to a paraboloid
129
d Qu - furthest-site Delaunay triangulation (upper convex hull)
130
v - Voronoi diagram as the dual of the Delaunay triangulation
131
v Qu - furthest-site Voronoi diagram
132
H1,1 - Halfspace intersection about [1,1,0,...] via polar duality
133
Qt - triangulated output
134
QJ - joggle input instead of merging facets
135
Tv - verify result: structure, convexity, and point inclusion
136
. - concise list of all options
137
- - one-line description of all options
139
Output options (subset):
140
s - summary of results (default)
141
i - vertices incident to each facet
142
n - normals with offsets
143
p - vertex coordinates (if 'Qc', includes coplanar points)
144
if 'v', Voronoi vertices
145
Fp - halfspace intersections
146
Fx - extreme points (convex hull vertices)
147
FA - compute total area and volume
148
o - OFF format (if 'v', outputs Voronoi regions)
149
G - Geomview output (2-d, 3-d and 4-d)
150
m - Mathematica output (2-d and 3-d)
151
QVn - print facets that include point n, -n if not
152
TO file- output results to file, may be enclosed in single quotes
155
rbox c d D2 | qhull Qc s f Fx | more rbox 1000 s | qhull Tv s FA
156
rbox 10 D2 | qhull d QJ s i TO result rbox 10 D2 | qhull v Qt p
157
rbox 10 D2 | qhull d Qu QJ m rbox 10 D2 | qhull v Qu QJ o
158
rbox c | qhull n rbox c | qhull FV n | qhull H Fp
159
rbox d D12 | qhull QR0 FA rbox c D7 | qhull FA TF1000
160
rbox y 1000 W0 | qhull rbox 10 | qhull v QJ o Fv
163
<h3><a href="#TOP">�</a><a name="input">qhull input</a></h3>
166
<p>The input data on <tt>stdin</tt> consists of:</p>
169
<li>number of points</li>
170
<li>point coordinates</li>
173
<p>Use I/O redirection (e.g., qhull < data.txt), a pipe (e.g., rbox 10 | qhull),
174
or the '<a href=qh-optt.htm#TI>TI</a>' option (e.g., qhull TI data.txt).
176
<p>Comments start with a non-numeric character. Error reporting is
177
simpler if there is one point per line. Dimension
178
and number of points may be reversed. For halfspace intersection,
179
an interior point may be prepended (see <a href=qhalf.htm#input>qhalf input</a>).
181
<p>Here is the input for computing the convex
182
hull of the unit cube. The output is the normals, one
186
<p>rbox c > data </p>
199
<p>qhull s n < data</p>
202
Convex hull of 8 points in 3-d:
204
Number of vertices: 8
206
Number of non-simplicial facets: 6
208
Statistics for: RBOX c | QHULL s n
210
Number of points processed: 8
211
Number of hyperplanes created: 11
212
Number of distance tests for qhull: 35
213
Number of merged facets: 6
214
Number of distance tests for merging: 84
215
CPU seconds to compute hull (after input): 0.081
229
<h3><a href="#TOP">�</a><a name="outputs">qhull outputs</a></h3>
232
<p>These options control the output of qhull. They may be used
233
individually or together.</p>
237
<dd><b>General</b></dd>
238
<dt><a name="d">qhull d</a></dt>
239
<dd>compute the Delaunay triangulation by lifting the points
240
to a paraboloid. See <a href=qdelaun.htm>qdelaunay</a>.</dd>
241
<dt><a name="v">qhull v</a></dt>
242
<dd>compute the Voronoi diagram by computing the Delaunay
243
triangulation. See <a href=qvoronoi.htm>qvoronoi</a>.</dd>
244
<dt><a name="H">qhull H</a></dt>
245
<dd>compute the halfspace intersection about a point via polar
246
duality. See <a href=qhalf.htm>qhalf</a>.</dd>
250
<p>For a full list of output options see
253
<li><a href="qh-opto.htm#output">Output</a> formats</li>
254
<li><a href="qh-optf.htm#format">Additional</a> I/O
256
<li><a href="qh-optg.htm#geomview">Geomview</a>
258
<li><a href="qh-optp.htm#print">Print</a> options</li>
263
<h3><a href="#TOP">�</a><a name="controls">qhull controls</a></h3>
266
<p>For a full list of control options see
269
<li><a href="qh-optq.htm#qhull">Qhull</a> control
271
<li><a href="qh-optc.htm#prec">Precision</a> options</li>
272
<li><a href="qh-optt.htm#trace">Trace</a> options</li>
277
<h3><a href="#TOP">�</a><a name="options">qhull options</a></h3>
280
qhull- compute convex hulls and related structures.
281
http://www.geom.umn.edu/software/qhull
284
first lines: dimension and number of points (or vice-versa).
285
other lines: point coordinates, best if one point per line
286
comments: start with a non-numeric character
287
halfspaces: use dim plus one and put offset after coefficients.
288
May be preceded by a single interior point ('H').
291
d - Delaunay triangulation by lifting points to a paraboloid
292
d Qu - furthest-site Delaunay triangulation (upper convex hull)
293
v - Voronoi diagram (dual of the Delaunay triangulation)
294
v Qu - furthest-site Voronoi diagram
295
Hn,n,... - halfspace intersection about point [n,n,0,...]
296
Qt - triangulated output
297
QJ - joggle input instead of merging facets
298
Qc - keep coplanar points with nearest facet
299
Qi - keep interior points with nearest facet
301
Qhull control options:
302
Qbk:n - scale coord k so that low bound is n
303
QBk:n - scale coord k so that upper bound is n (QBk is 0.5)
304
QbB - scale input to unit cube centered at the origin
305
Qbb - scale last coordinate to [0,m] for Delaunay triangulations
306
Qbk:0Bk:0 - remove k-th coordinate from input
307
QJn - randomly joggle input in range [-n,n]
308
QRn - random rotation (n=seed, n=0 time, n=-1 time/no rotate)
309
Qf - partition point to furthest outside facet
310
Qg - only build good facets (needs 'QGn', 'QVn', or 'PdD')
311
Qm - only process points that would increase max_outside
312
Qr - process random outside points instead of furthest ones
313
Qs - search all points for the initial simplex
314
Qu - for 'd' or 'v', compute upper hull without point at-infinity
315
returns furthest-site Delaunay triangulation
316
Qv - test vertex neighbors for convexity
317
Qx - exact pre-merges (skips coplanar and anglomaniacs facets)
318
Qz - add point-at-infinity to Delaunay triangulation
319
QGn - good facet if visible from point n, -n for not visible
320
QVn - good facet if it includes point n, -n if not
321
Q0 - turn off default p remerge with 'C-0'/'Qx'
322
Q1 - sort merges by type instead of angle
323
Q2 - merge all non-convex at once instead of independent sets
324
Q3 - do not merge redundant vertices
325
Q4 - avoid old>new merges
326
Q5 - do not correct outer planes at end of qhull
327
Q6 - do not pre-merge concave or coplanar facets
328
Q7 - depth-first processing instead of breadth-first
329
Q8 - do not process near-inside points
330
Q9 - process furthest of furthest points
331
Q10 - no special processing for narrow distributions
332
Q11 - copy normals and recompute centrums for tricoplanar facets
334
Towpaths Trace options:
335
T4 - trace at level n, 4=all, 5=mem/gauss, -1= events
336
Tc - check frequently during execution
337
Ts - print statistics
338
Tv - verify result: structure, convexity, and point inclusion
339
Tz - send all output to stdout
340
TFn - report summary when n or more facets created
341
TI file - input data from file, no spaces or single quotes
342
TO file - output results to file, may be enclosed in single quotes
343
TPn - turn on tracing when point n added to hull
344
TMn - turn on tracing at merge n
345
TWn - trace merge facets when width > n
346
TRn - rerun qhull n times. Use with 'QJn'
347
TVn - stop qhull after adding point n, -n for before (see TCn)
348
TCn - stop qhull after building cone for point n (see TVn)
351
Cn - radius of centrum (roundoff added). Merge facets if non-convex
352
An - cosine of maximum angle. Merge facets if cosine > n or non-convex
353
C-0 roundoff, A-0.99/C-0.01 pre-merge, A0.99/C0.01 post-merge
354
En - max roundoff error for distance computation
355
Rn - randomly perturb computations by a factor of [1-n,1+n]
356
Vn - min distance above plane for a visible facet (default 3C-n or En)
357
Un - max distance below plane for a new, coplanar point (default Vn)
358
Wn - min facet width for outside point (before roundoff, default 2Vn)
360
Output formats (may be combined; if none, produces a summary to stdout):
362
G - Geomview output (see below)
363
i - vertices incident to each facet
364
m - Mathematica output (2-d and 3-d)
365
o - OFF format (dim, points and facets; Voronoi regions)
366
n - normals with offsets
367
p - vertex coordinates or Voronoi vertices (coplanar points if 'Qc')
371
Fa - area for each facet
372
FA - compute total area and volume for option 's'
373
Fc - count plus coplanar points for each facet
374
use 'Qc' (default) for coplanar and 'Qi' for interior
375
FC - centrum or Voronoi center for each facet
376
Fd - use cdd format for input (homogeneous with offset first)
377
FD - use cdd format for numeric output (offset first)
378
FF - facet dump without ridges
379
Fi - inner plane for each facet
380
for 'v', separating hyperplanes for bounded Voronoi regions
381
FI - ID of each facet
382
Fm - merge count for each facet (511 max)
383
Fn - count plus neighboring facets for each facet
384
FN - count plus neighboring facets for each point
385
Fo - outer plane (or max_outside) for each facet
386
for 'v', separating hyperplanes for unbounded Voronoi regions
387
FO - options and precision constants
388
Fp - dim, count, and intersection coordinates (halfspace only)
389
FP - nearest vertex and distance for each coplanar point
390
FQ - command used for qhull
391
Fs - summary: #int (8), dimension, #points, tot vertices, tot facets,
392
output: #vertices, #facets, #coplanars, #nonsimplicial
393
#real (2), max outer plane, min vertex
395
#real(2) tot area, tot volume
396
Ft - triangulation with centrums for non-simplicial facets (OFF format)
397
Fv - count plus vertices for each facet
398
for 'v', Voronoi diagram as Voronoi vertices for pairs of sites
399
FV - average of vertices (a feasible point for 'H')
400
Fx - extreme points (in order for 2-d)
402
Geomview options (2-d, 3-d, and 4-d; 2-d Voronoi)
403
Ga - all points as dots
404
Gp - coplanar points and vertices as radii
405
Gv - vertices as spheres
406
Gi - inner planes only
408
Go - outer planes only
410
Gh - hyperplane intersections
412
GDn - drop dimension n in 3-d and 4-d output
413
Gt - for 3-d 'd', transparent outer ridges
416
PAn - keep n largest facets by area
417
Pdk:n - drop facet if normal[k] <= n (default 0.0)
418
PDk:n - drop facet if normal[k] >= n
419
Pg - print good facets (needs 'QGn' or 'QVn')
420
PFn - keep facets whose area is at least n
421
PG - print neighbors of good facets
422
PMn - keep n facets with most merges
423
Po - force output. If error, output neighborhood of facet
424
Pp - do not report precision problems
426
. - list of all options
427
- - one line descriptions of all options
430
<!-- Navigation links -->
433
<p><b>Up:</b> <a href="http://www.geom.umn.edu/software/qhull">Home page</a> for Qhull<br>
434
<b>Up:</b> <a href="index.htm#TOC">Qhull manual</a>: Table of Contents<br>
435
<b>To:</b> <a href="qh-quick.htm#programs">Programs</a>
436
• <a href="qh-quick.htm#options">Options</a>
437
• <a href="qh-opto.htm#output">Output</a>
438
• <a href="qh-optf.htm#format">Formats</a>
439
• <a href="qh-optg.htm#geomview">Geomview</a>
440
• <a href="qh-optp.htm#print">Print</a>
441
• <a href="qh-optq.htm#qhull">Qhull</a>
442
• <a href="qh-optc.htm#prec">Precision</a>
443
• <a href="qh-optt.htm#trace">Trace</a><br>
444
<b>To:</b> <a href="#synopsis">sy</a>nopsis • <a href="#input">in</a>put
445
• <a href="#outputs">ou</a>tputs • <a href="#controls">co</a>ntrols
446
• <a href="#options">op</a>tions
447
<!-- GC common information -->
450
<p><a href="http://www.geom.umn.edu/"><img src="qh--geom.gif"
451
align="middle" width="40" height="40"></a><i>The Geometry Center
454
<p>Comments to: <a href=mailto:qhull@geom.umn.edu>qhull@geom.umn.edu</a>
456
Created: Sept. 25, 1995 --- <!-- hhmts start --> Last modified: see top <!-- hhmts end --> </p>