qhull(1)
π qhull π
okay bestie, meet qhull β the manual page for convex hull, Delaunay triangulation, Voronoi diagram, halfspace intersection about a point, hull volume, facet area. she does it all. no cap. π
β¨ NAME β¨
qhull β convex hull, Delaunay triangulation, Voronoi diagram, halfspace intersection about a point, hull volume, facet area π¦
πΈ SYNOPSIS πΈ
qhull β compute convex hulls and related structures π
- input (stdin): dimension, #points, point coordinates
- first comment (non-numeric) is listed in the summary
- halfspace: use dim plus one with offsets after coefficients
π options (qh-quick.htm)
dβ Delaunay triangulation by lifting points to a paraboloidd Quβ furthest-site Delaunay triangulation (upper convex hull)vβ Voronoi diagram as the dual of the Delaunay triangulationv Quβ furthest-site Voronoi diagramH1,1β Halfspace intersection about[1,1,0,...]via polar dualityQtβ triangulated outputQJβ joggled input instead of merged facetsTvβ verify result: structure, convexity, and point inclusion.β concise list of all options-β one-line description of each option-?β this message-Vβ version
π Output options (subset)
sβ summary of results (default)iβ vertices incident to each facetnβ normals with offsetspβ vertex coordinates (ifQc, includes coplanar points); ifv, Voronoi verticesFAβ report total area and volumeFpβ halfspace intersectionsFSβ total area and volumeFxβ extreme points (convex hull vertices)Gβ Geomview output (2-d, 3-d and 4-d)mβ Mathematica output (2-d and 3-d)oβ OFF format (ifv, outputs Voronoi regions)QVnβ print facets that include point n, -n if notTI fileβ input file, may be enclosed in single quotesTO fileβ output file, may be enclosed in single quotes
π« examples
fr fr, just copy these, they go hard:
rbox D4 | qhull Tv rbox 1000 s | qhull Tv s FA
rbox 10 D2 | qhull d QJ s i TO result rbox 10 D2 | qhull v Qbb Qt p
rbox 10 D2 | qhull d Qu QJ m rbox 10 D2 | qhull v Qu QJ o
rbox c d D2 | qhull Qc s f Fx | more rbox c | qhull FV n | qhull H Fp
rbox d D12 | qhull QR0 FA rbox c D7 | qhull FA TF1000
rbox y 1000 W0 | qhull Qc rbox c | qhull n
π§ where to find more (iykyk)
- html manual:
html/index.htm - installation:
README.txt - see also:
COPYING.txt,REGISTER.txt,Changes.txt - WWW:
<http://www.qhull.org> - GIT:
<git@github.com:qhull/qhull.git> - news:
<http://www.qhull.org/news> - Geomview:
<http://www.geomview.org> - news group:
<news:comp.graphics.algorithms> - FAQ:
<http://www.faqs.org/faqs/graphics/algorithms-faq/> - email:
qhull@qhull.org - bug reports:
qhull_bug@qhull.org
π The sections are:
- INTRODUCTION
- DESCRIPTION, a description of Qhull
- IMPRECISION, how Qhull handles imprecision
- OPTIONS
- Input and output options
- Additional input/output formats
- Precision options
- Geomview options
- Print options
- Qhull options
- Trace options
- BUGS
- SEE ALSO
- AUTHORS
- ACKNOWLEGEMENTS
This man page briefly describes all Qhull options. Please report any mismatches with Qhull's html manual (html/index.htm). π
π INTRODUCTION π
Qhull is a general dimension code for computing convex hulls, Delaunay triangulations, Voronoi diagram, furthest-site Voronoi diagram, furthest-site Delaunay triangulations, and halfspace intersections about a point. She implements the Quickhull algorithm for computing the convex hull. Qhull handles round-off errors from floating point arithmetic. She can approximate a convex hull. π
The program includes options for hull volume, facet area, partial hulls, input transformations, randomization, tracing, multiple output formats, and execution statistics. The program can be called from within your application. You can view the results in 2-d, 3-d and 4-d with Geomview. β¨
π₯ DESCRIPTION π₯
The format of input is the following: first line contains the dimension, second line contains the number of input points, and point coordinates follow. The dimension and number of points can be reversed. Comments and line breaks are ignored. A comment starts with a non-numeric character and continues to the end of line. The first comment is reported in summaries and statistics. Error reporting is better if there is one point per line. π
The default printout option is a short summary. There are many other output formats. (many. so many. obsessed.)
Qhull implements the Quickhull algorithm for convex hull. This algorithm combines the 2-d Quickhull algorithm with the n-d beneath-beyond algorithm [c.f., Preparata & Shamos '85]. It is similar to the randomized algorithms of Clarkson and others [Clarkson et al. '93]. The main advantages of Quickhull are output sensitive performance, reduced space requirements, and automatic handling of precision problems. π¦
The data structure produced by Qhull consists of vertices, ridges, and facets. A vertex is a point of the input set. A ridge is a set of d vertices and two neighboring facets. For example in 3-d, a ridge is an edge of the polyhedron. A facet is a set of ridges, a set of neighboring facets, a set of incident vertices, and a hyperplane equation. For simplicial facets, the ridges are defined by the vertices and neighboring facets. When Qhull merges two facets, it produces a non-simplicial facet. A non-simplicial facet has more than d neighbors and may share more than one ridge with a neighbor. π
π IMPRECISION π
Since Qhull uses floating point arithmetic, roundoff error may occur for each calculation. This causes problems for most geometric algorithms. (bestie. the math is mathing but the floats are not.) π
Qhull automatically sets option C-0 in 2-d, 3-d, and 4-d, or option Qx in 5-d and higher. These options handle precision problems by merging facets. Alternatively, use option QJ to joggle the input. β¨
With C-0, Qhull merges non-convex facets while constructing the hull. The remaining facets are clearly convex. With Qx, Qhull merges coplanar horizon facets, flipped facets, concave facets and duplicated ridges. It merges coplanar facets after constructing the hull. With Qx, coplanar points may be missed, but it appears to be unlikely.
To guarantee triangular output, joggle the input with option QJ. Facet merging will not occur. π
β¨ OPTIONS β¨
To get a list of the most important options, execute qhull -?. To get a complete list of options, execute qhull -. To get a complete, concise list of options, execute qhull .. π
Options can be in any order. Capitalized options take an argument (except PG and F options). Single letters are used for output formats and precision constants. The other options are grouped into menus: output formats (F), Geomview output (G), printing (P), Qhull control (Q), and tracing (T). πΈ
π Main options
defaultβ Compute the convex hull of the input points. Report a summary of the result. (the main character move, no cap)dβ Compute the Delaunay triangulation by lifting the input points to a paraboloid. Theooption prints the input points and facets. TheQJoption guarantees triangular output. TheFtoption prints a triangulation. It adds points (the centrums) to non-simplicial facets. π¦vβ Compute the Voronoi diagram from the Delaunay triangulation. Thepoption prints the Voronoi vertices. Theooption prints the Voronoi vertices and the vertices in each Voronoi region. It lists regions in site ID order. TheFvoption prints each ridge of the Voronoi diagram. The first or zero'th vertex indicates the infinity vertex. Its coordinates areqh_INFINITE(-10.101). It indicates unbounded Voronoi regions or degenerate Delaunay triangles. β¨Hn,n,...β Compute halfspace intersection about[n,n,0,...]. The input is a set of halfspaces defined in the same format asn,Fo, andFi. UseFpto print the intersection points. UseFvto list the intersection points for each halfspace. The other output formats display the dual convex hull.
The point [n,n,n,...] is a feasible point for the halfspaces, i.e., a point that is inside all of the halfspaces (Hx+b <= 0). The default coordinate value is 0.
The input may start with a feasible point. If so, use H by itself. The input starts with a feasible point when the first number is the dimension, the second number is "1", and the coordinates complete a line. The FV option produces a feasible point for a convex hull. π
d Quβ Compute the furthest-site Delaunay triangulation from the upper convex hull. Theooption prints the input points and facets. TheQJoption guarantees triangular output. You can also useFtto triangulate via the centrums of non-simplicial facets. π₯v Quβ Compute the furthest-site Voronoi diagram. Thepoption prints the Voronoi vertices. Theooption prints the Voronoi vertices and the vertices in each Voronoi region. TheFvoption prints each ridge of the Voronoi diagram. The first or zero'th vertex indicates the infinity vertex at infinity. Its coordinates areqh_INFINITE(-10.101). It indicates unbounded Voronoi regions and degenerate Delaunay triangles. π
π Input/Output options
fβ Print all facets and all fields of each facet. (all of them. she's not holding back.)Gβ Output the hull in Geomview format. For imprecise hulls, Geomview displays the inner and outer hull. Geomview can also display points, ridges, vertices, coplanar points, and facet intersections. See below for a list of options.
For Delaunay triangulations, G displays the corresponding paraboloid. For halfspace intersection, G displays the dual polytope. π«Ά
iβ Output the incident vertices for each facet. Qhull prints the number of facets followed by the vertices of each facet. One facet is printed per line. The numbers are the 0-relative indices of the corresponding input points. The facets are oriented. π
In 4d and higher, Qhull triangulates non-simplicial facets. Each apex (the first vertex) is a created point that corresponds to the facet's centrum. Its index is greater than the indices of the input points. Each base corresponds to a simplicial ridge between two facets. To print the vertices without triangulation, use option Fv. To print the centrum coordinates, use option Ft. The centrum indices for option i are one more than the centrum indices for option Ft. π
mβ output the hull in Mathematica format. Qhull writes a Mathematica file for 2-d and 3-d convex hulls and for 2-d Delaunay triangulations. Qhull produces a list of objects that you can assign to a variable in Mathematica, for example:"list= << <outputfilename> ". If the object is 2-d, it can be visualized by"Show[Graphics[list]] ". For 3-d objects the command is"Show[Graphics3D[list]]". β¨nβ output the normal equation for each facet. Qhull prints the dimension (plus one), the number of facets, and the normals for each facet. The facet's offset follows its normal coefficients.oβ output the facets in OFF file format. Qhull prints the dimension, number of points, number of facets, and number of ridges. Then it prints the coordinates of the input points and the vertices for each facet. Each facet is on a separate line. The first number is the number of vertices. The remainder are the indices of the corresponding points. The vertices are oriented in 2-d, 3-d, and in simplicial facets.
For 2-d Voronoi diagrams, the vertices are sorted by adjacency, but not oriented. In 3-d and higher, the Voronoi vertices are sorted by index. See the v option for more information. π¦
pβ output the coordinates of each vertex point. Qhull prints the dimension, the number of points, and the coordinates for each vertex. With theGcandGioptions, it also prints coplanar and interior points. For Voronoi diagrams, it prints the coordinates of each Voronoi vertex.sβ print a summary to stderr. If no output options are specified, a summary goes tostdout. The summary lists the number of input points, the dimension, the number of vertices in the convex hull, the number of facets in the convex hull, the number of good facets (ifPg), and statistics.
The last two statistics (if needed) measure the maximum distance from a point or vertex to a facet. The number in parenthesis (e.g., 2.1x) is the ratio between the maximum distance and the worst-case distance due to merging two simplicial facets. π
β¨ Precision options β¨
Anβ maximum angle given as a cosine. If the angle between a pair of facet normals is greater than n, Qhull merges one of the facets into a neighbor. Ifnis negative, Qhull tests angles after adding each point to the hull (pre-merging). Ifnis positive, Qhull tests angles after constructing the hull (post-merging). Both pre- and post-merging can be defined.
Option C0 or C-0 is set if the corresponding Cn or C-n is not set. If Qx is set, then A-n and C-n are checked after the hull is constructed and before An and Cn are checked. π€
Cnβ centrum radius. If a centrum is less than n below a neighboring facet, Qhull merges one of the facets. Ifnis negative or-0, Qhull tests and merges facets after adding each point to the hull. This is called "pre-merging". Ifnis positive, Qhull tests for convexity after constructing the hull ("post-merging"). Both pre- and post-merging can be defined.
For 5-d and higher,Qxshould be used instead ofC-n. Otherwise, most or all facets may be merged together. π
Enβ maximum roundoff error for distance computations.Rnβ randomly perturb distance computations up to+/- n * max_coord. This option perturbs every distance, hyperplane, and angle computation. To use time as the random number seed, use optionQR-1. π²Vnβ minimum distance for a facet to be visible. A facet is visible if the distance from the point to the facet is greater thanVn.
Without merging, the default value for Vn is the round-off error (En). With merging, the default value is the pre-merge centrum (C-n) in 2-d or 3-d, or three times that in other dimensions. If the outside width is specified (Wn), the maximum, default value for Vn is Wn.
Unβ maximum distance below a facet for a point to be coplanar to the facet. The default value isVn.Wnβ minimum outside width of the hull. Points are added to the convex hull only if they are clearly outside of a facet. A point is outside of a facet if its distance to the facet is greater thanWn. The normal value forWnisEn. If the user specifies pre-merging and does not setWn, thanWnis set to the premergeCnandmaxcoord*(1-An). πΈ
π Additional input/output formats π
Faβ print area for each facet. For Delaunay triangulations, the area is the area of the triangle. For Voronoi diagrams, the area is the area of the dual facet. UsePAnfor printing the n largest facets, and optionPFnfor printing facets larger thann.
The area for non-simplicial facets is the sum of the areas for each ridge to the centrum. Vertices far below the facet's hyperplane are ignored. The reported area may be significantly less than the actual area. π
FAβ compute the total area and volume for options. It is an approximation for non-simplicial facets (seeFa).Fcβ print coplanar points for each facet. The output starts with the number of facets. Then each facet is printed one per line. Each line is the number of coplanar points followed by the point ids. OptionQiincludes the interior points. Each coplanar point (interior point) is assigned to the facet it is furthest above (resp., least below).FCβ print centrums for each facet. The output starts with the dimension followed by the number of facets. Then each facet centrum is printed, one per line.Fdβ read input in cdd format with homogeneous points. The input starts with comments. The first comment is reported in the summary. Data starts after a"begin"line. The next line is the number of points followed by the dimension+1 and"real"or"integer". Then the points are listed with a leading"1"or"1.0". The data ends with an"end"line.
For halfspaces (Fd Hn,n,...), the input format is the same. Each halfspace starts with its offset. The sign of the offset is the opposite of Qhull's convention. π
FDβ print normals (n,Fo,Fi) or points (p) in cdd format. The first line is the command line that invoked Qhull. Data starts with a"begin"line. The next line is the number of normals or points followed by the dimension+1 and"real". Then the normals or points are listed with the offset before the coefficients. The offset for points is1.0. The offset for normals has the opposite sign. The data ends with an"end"line.FFβ print facets (as inf) without printing the ridges.Fiβ print inner planes for each facet. The inner plane is below all vertices.Fiβ print separating hyperplanes for bounded, inner regions of the Voronoi diagram. The first line is the number of ridges. Then each hyperplane is printed, one per line. A line starts with the number of indices and floats. The first pair lists adjacent input sites, the next d floats are the normalized coefficients for the hyperplane, and the last float is the offset. The hyperplane is oriented towardQVn(if defined), or the first input site of the pair. UseTvto verify that the hyperplanes are perpendicular bisectors. UseFofor unbounded regions, andFvfor the corresponding Voronoi vertices. πFIβ print facet identifiers.Fmβ print number of merges for each facet. At most 511 merges are reported for a facet. SeePMnfor printing the facets with the most merges.FMβ output the hull in Maple format. Qhull writes a Maple file for 2-d and 3-d convex hulls and for 2-d Delaunay triangulations. Qhull produces a.mplfile for displaying withdisplay3d().Fnβ print neighbors for each facet. The output starts with the number of facets. Then each facet is printed one per line. Each line is the number of neighbors followed by an index for each neighbor. The indices match the other facet output formats.
A negative index indicates an unprinted facet due to printing only good facets (Pg). It is the negation of the facet's ID (option FI). For example, negative indices are used for facets "at infinity" in the Delaunay triangulation.
FNβ print vertex neighbors or coplanar facet for each point. The first line is the number of points. Then each point is printed, one per line. If the point is coplanar, the line is"1"followed by the facet's ID. If the point is not a selected vertex, the line is"0". Otherwise, each line is the number of neighbors followed by the corresponding facet indices (seeFn).Foβ print outer planes for each facet in the same format asn. The outer plane is above all points.Foβ print separating hyperplanes for unbounded, outer regions of the Voronoi diagram. The first line is the number of ridges. Then each hyperplane is printed, one per line. A line starts with the number of indices and floats. The first pair lists adjacent input sites, the next d floats are the normalized coefficients for the hyperplane, and the last float is the offset. The hyperplane is oriented towardQVn(if defined), or the first input site of the pair. UseTvto verify that the hyperplanes are perpendicular bisectors. UseFifor bounded regions, andFvfor the corresponding Voronoi vertices. π«ΆFOβ list all options tostderr, including the default values. AdditionalFOs are printed tostdout. πFpβ prints points for halfspace intersections (that's theHn,n,...option btw). Every intersection maps to a facet of the dual polytope, and the "infinity" point[-10.101,-10.101,...]is how it tells you the intersection is unbounded. π«FPβ for each coplanar point (Qc), it prints the point ID of the nearest vertex, the point ID, the facet ID, and the distance. four lil facts, one line, we love to see it.FQβ prints the command used for qhull plus the input. receipts π§Ύ.Fsβ prints a summary. The first line is the number of integers (8), followed by the dimension, the number of points, the number of vertices, the number of facets, the number of vertices selected for output, the number of facets selected for output, the number of coplanar points selected for output, and the number of simplicial, unmerged facets in output.
The second line is the number of reals (2), followed by the maximum offset to an outer plane and the minimum offset to an inner plane. Roundoff is included. Later versions of Qhull may produce additional integers or reals, so don't get too attached to the layout, bestie.
FSβ prints the size of the hull. The first line is the number of integers (0). The second line is the number of reals (2), followed by the total facet area and the total volume. Later versions of Qhull may produce additional integers or reals.
The total volume measures the volume of the intersection of the halfspaces defined by each facet. Heads up though: both area and volume are approximations for non-simplicial facets. See option Fa. π
Ftβ prints a triangulation with added points for non-simplicial facets. The first line is the dimension, and the second line is the number of points and the number of facets. Then the points follow, one per line, and then the facets follow as a list of point indices. With optionQz, the points include the point-at-infinity.Fvβ prints vertices for each facet. The first line is the number of facets. Then each facet is printed, one per line. Each line is the number of vertices followed by the corresponding point ids. Vertices are listed in the order they were added to the hull β so the last one is first. π€―Fvβ (yes bestie,Fvshows up twice, that's literally what the page says, i don't make the rules) prints all ridges of a Voronoi diagram. The first line is the number of ridges. Then each ridge is printed, one per line. A line starts with the number of indices. The first pair lists adjacent input sites, and the remaining indices list Voronoi vertices. Vertex0indicates the vertex-at-infinity (i.e., an unbounded ray). In 3-d, the vertices are listed in order. SeeFiandFofor separating hyperplanes.FVβ prints the average vertex. That average vertex is a feasible point for halfspace intersection. β¨Fxβ lists the extreme points (vertices) of the convex hull. The first line is the number of points. The other lines give the indices of the corresponding points. The first point is0. In 2-d, the points occur in counter-clockwise order; otherwise they occur in input order. For Delaunay triangulations,Fxlists the extreme points of the input sites. The points are unordered.
β¨ Geomview options β¨
Gβ produces a file for viewing with Geomview. Without other options, Qhull displays edges in 2-d, outer planes in 3-d, and ridges in 4-d. A ridge can be explicit or implicit. An explicit ridge is a dim-1 dimensional simplex between two facets. In 4-d, the explicit ridges are triangles. When displaying a ridge in 4-d, Qhull projects the ridge's vertices to one of its facets' hyperplanes. UseGhto project ridges to the intersection of both hyperplanes.Gaβ displays all input points as dots. π«§Gcβ displays the centrum for each facet in 3-d. The centrum is defined by a green radius sitting on a blue plane. The plane corresponds to the facet's hyperplane. The radius is defined byC-norCn.GDnβ drops dimension n in 3-d or 4-d. The result is a 2-d or 3-d object.Ghβ displays hyperplane intersections in 3-d and 4-d. In 3-d, the intersection is a black line. It lies on two neighboring hyperplanes (c.f., the blue squares associated with centrums (Gc)). In 4-d, the ridges are projected to the intersection of both hyperplanes.Giβ displays inner planes in 2-d and 3-d. The inner plane of a facet is below all of its vertices. It is parallel to the facet's hyperplane. The inner plane's color is the opposite(1-r,1-g,1-b)of the outer plane. Its edges are determined by the vertices.Gnβ do not display inner or outer planes. By default, Geomview displays the precise plane (no merging) or both inner and output planes (merging). Under merging, Geomview does not display the inner plane if the difference between inner and outer is too small.Goβ displays outer planes in 2-d and 3-d. The outer plane of a facet is above all input points. It is parallel to the facet's hyperplane. Its color is determined by the facet's normal, and its edges are determined by the vertices.Gpβ displays coplanar points and vertices as radii. A radius defines a ball which corresponds to the imprecision of the point. The imprecision is the maximum of the roundoff error, the centrum radius, andmaxcoord * (1-An). It is at least 1/20'th of the maximum coordinate, and it ignores post-merging if pre-merging is done.Grβ displays ridges in 3-d. A ridge connects the two vertices that are shared by neighboring facets. Ridges are always displayed in 4-d.Gtβ a 3-d Delaunay triangulation looks like a convex hull with interior facets. OptionGtremoves the outside ridges to reveal the outermost facets. It automatically sets optionsGrandGDn.Gvβ displays vertices as spheres. The radius of the sphere corresponds to the imprecision of the data. SeeGpfor determining the radius.
β¨ Print options β¨
PAnβ only the n largest facets are marked good for printing. UnlessPGis set,Pgis automatically set.Pdk:nβ drops a facet from the output ifnormal[k] <= n. The optionPdkuses the default value of0for n.PDk:nβ drops a facet from the output ifnormal[k] >= n. The optionPDkuses the default value of0for n.PFnβ only facets with area at leastnare marked good for printing. UnlessPGis set,Pgis automatically set.Pgβ prints only good facets. A good facet is either visible from a point (theQGnoption) or includes a point (theQVnoption). It also meets the requirements ofPdkandPDkoptions. OptionPgis automatically set for optionsd,PAn,PFn, andPMn.PGβ prints neighbors of good facets.PMnβ only the n facets with the most merges are marked good for printing. UnlessPGis set,Pgis automatically set.Poβ forces output despite precision problems. Verify (Tv) does not check coplanar points. Flipped facets are reported and concave facets are counted. IfPois used, points are not partitioned into flipped facets and a flipped facet is always visible to a point. Also, if an error occurs before the completion of Qhull and tracing is not active,Pooutputs a neighborhood of the erroneous facets (if any).Ppβ do not report precision problems.
β¨ Qhull control options β¨
Qaβ allow input with fewer or more points than coordinates.Qbk:0Bk:0β drop dimension k from the input points. This lets you take convex hulls of sub-dimensional objects. It happens before the Delaunay and Voronoi transformation.QbBβ scale the input points to fit the unit cube. After scaling, the lower bound will be-0.5and the upper bound+0.5in all dimensions. For Delaunay and Voronoi diagrams, scaling happens after projection to the paraboloid. Under precise arithmetic, scaling does not change the topology of the convex hull.Qbbβ scale the last coordinate to[0, m]wheremis the maximum absolute value of the other coordinates. For Delaunay and Voronoi diagrams, scaling happens after projection to the paraboloid. It reduces roundoff error for inputs with integer coordinates. Under precise arithmetic, scaling does not change the topology of the convex hull.Qbk:nβ scale the k'th coordinate of the input points. After scaling, the lower bound of the input points will ben.Qbkscales to-0.5.QBk:nβ scale the k'th coordinate of the input points. After scaling, the upper bound will ben.QBkscales to+0.5.Qcβ keep coplanar points with the nearest facet. Output formatsp,f,Gp,Fc,FN, andFPwill print the points.Qfβ partition points to the furthest outside facet.Qgβ only build good facets. With theQgoption, Qhull will only build those facets that it needs to determine the good facets in the output. SeeQGn,QVn, andPdDfor defining good facets, andPgandPGfor printing good facets and their neighbors.QGnβ a facet is good (seeQgandPg) if it is visible from point n. Ifn < 0, a facet is good if it is not visible from point n. Point n is not added to the hull (unlessTCnorTPn). With rbox, use thePn,m,roption to define your point; it will be point 0 (QG0).Qiβ keep interior points with the nearest facet. Output formatsp,f,Gp,FN,FP, andFcwill print the points.QJnβ joggle each input coordinate by adding a random number in[-n,n]. If a precision error occurs, then qhull increases n and tries again. It does not increase n beyond a certain value, and it stops after a certain number of attempts [seeuser.h]. OptionQJselects a default value for n. The output will be simplicial. For Delaunay triangulations,QJnsetsQbbto scale the last coordinate (not ifQbk:norQBk:nis set).QJnis deprecated for Voronoi diagrams. See alsoQt.
Deprecated for Voronoi diagrams means exactly that, bestie β don't come crying to me when it acts up. π
Qmβ only process points that would otherwise increasemax_outside. Other points are treated as coplanar or interior points.Qrβ process random outside points instead of the furthest ones π² this makes Qhull equivalent to the randomized incremental algorithms. Lowkey important: CPU time is not reported, because the randomization is inefficient. So don't come for the clock, bestie.QRnβ randomly rotate the input points β¨ here's the tea onn:- if
n=0, use time as the random number seed β° - if
n>0, usenas the random number seed - if
n=-1, don't rotate, but still use time as the random number seed - for Delaunay triangulations (
dandv), rotate about the last axis
- if
Qsβ search all points for the initial simplex π no skipping, we're being thorough.Qtβ triangulated output. Triangulate all non-simplicial facets π¦ heads up though:Qtis deprecated for Voronoi diagrams. See alsoQt.Qvβ test vertex neighbors for convexity after post-merging π§ to useQvyou also need a merge option set (likeQxorC-0), it doesn't fly solo.QVnβ a good facet (peepQgandPg) includes pointn. Ifn<0, then a good facet does not include pointnπ the point is either in the initial simplex or it's the first point added to the hull. Warning bestie:QVnmay not be used with merging.Qwβ allow option warnings π«Ά otherwise Qhull returns an error after most option warnings. It's giving "let me live."Qxβ perform exact merges while building the hull π the "exact" merges are: merging a point into a coplanar facet (defined byVn,Un, andC-n), merging concave facets, merging duplicate ridges, and merging flipped facets. Coplanar merges and angle coplanar merges (A-n) are not performed. Concavity testing is delayed until a merge occurs.
After the hull is built, all coplanar merges are performed (defined by C-n and A-n), then post-merges are performed (defined by Cn and An).
Qzβ add a point "at infinity" that is above the paraboloid for Delaunay triangulations and Voronoi diagrams π this reduces precision problems and allows the triangulation of cospherical points. Iconic behavior honestly.
β¨ Qhull experiments and speedups β¨
Q0β turn off pre-merging as a default option. WithQ0/Qxand without explicit pre-merge options, Qhull ignores precision issues while constructing the convex hull π this may lead to precision errors. If so, a descriptive warning is generated. At least she tells you.Q1β withQ1, Qhull merges by mergetype/angle instead of mergetype/distance.Q2β withQ2, Qhull merges all facets at once instead of using independent sets of merges and then retesting.Q3β withQ3, Qhull does not remove redundant vertices.Q4β withQ4, Qhull avoids merges of an old facet into a new facet.Q5β withQ5, Qhull does not correct outer planes at the end. The maximum outer plane is used instead.Q6β withQ6, Qhull does not pre-merge concave or coplanar facets.Q7β withQ7, Qhull processes facets in depth-first order instead of breadth-first order πQ8β withQ8and merging, Qhull does not retain near-interior points for adjusting outer planes.Qcwill probably retain all points that adjust outer planes.Q9β withQ9, Qhull processes the furthest of all outside sets at each iteration.Q10β withQ10, Qhull does not use special processing for narrow distributions.Q11β withQ11, Qhull copies normals and recompute centrums for tricoplanar facets.Q12β withQ12, Qhull allows wide facets and wide dupridge.Q14β withQ14, Qhull merges pinched vertices that create a dupridge.Q15β withQ15, Qhull checks for duplicate ridges with the same vertices.
π Trace options π
Tnβ trace at levelnπ Qhull includes full execution tracing:T-1traces eventsT1traces the overall execution of the programT2andT3trace overall execution and geometric and topological eventsT4traces the algorithmT5includes information about memory allocation and Gaussian elimination
Taβ annotate output with codes that identify the correspondingqh_fprintf()statement π·οΈTAnβ stop Qhull after addingnvertices.Tcβ check frequently during execution β this will catch most inconsistency errors.TCnβ stop Qhull after building the cone of new facets for pointn. The output forfincludes the cone and the old hull. See alsoTVn.Tfβ flush output after eachqh_fprintf. UseTffor debugging segfaults π seeTzfor redirecting stderr.TFnβ report progress whenever more thannfacets are created. During post-merging,TFnreports progress after more thann/2merges.TI fileβ input data fromfile. The filename may not include spaces or quotes π«TMnβ turn on tracing atn'th merge.TO fileβ output results tofile. The name may be enclosed in single quotes.TPnβ turn on tracing when pointnis added to the hull. Trace partitions of pointn. If used withTWn, turn off tracing after adding pointnto the hull.TP-1β turn on tracing afterqh_buildhullandqh_postmerge.TRnβ rerun qhullntimes. Usually used withQJnto determine the probability that a given joggle will fail π²Tsβ collect statistics and print to stderr at the end of execution πTvβ verify the convex hull π΅οΈ this checks the topological structure, facet convexity, and point inclusion. If precision problems occurred, facet convexity is tested whether or notTvis selected. OptionTvdoes not check point inclusion if forcing output withPo, or ifQ5is set.
For point inclusion testing, Qhull verifies that all points are below all outer planes (facet->maxoutside). Point inclusion is exhaustive if merging or if the facet-point product is small enough; otherwise Qhull verifies each point with a directed search (qh_findbest).
Point inclusion testing occurs after producing output. It prints a message to stderr unless option Pp is used. This allows the user to interrupt Qhull without changing the output π«Ά
TVnβ stop Qhull after adding pointn. Ifn < 0, stop Qhull before adding pointn. Output shows the hull at this time. See alsoTCn.TWnβ trace merge facets when the width is greater thann.Tzβ redirect stderr to stdout. SeeTffor flushing writes.
π BUGS π
Please report bugs to Brad Barber at qhull_bug@qhull.org π§
If Qhull does not compile, it is due to an incompatibility between your system and ours π the first thing to check is that your compiler is ANSI standard. If it is, check the man page for the best options, or find someone to help you. If you locate the cause of your problem, please send email since it might help others π
If Qhull compiles but crashes on the test case (rbox D4), there's still incompatibility between your system and ours. Typically it's been due to mem.c and memory alignment. You can use qh_NOmem in mem.h to turn off memory management. Please let us know if you figure out how to fix these problems π
If you do find a problem, try to simplify it before reporting the error. Try different size inputs to locate the smallest one that causes an error. You're welcome to hunt through the code using the execution trace as a guide. This is especially true if you're incorporating Qhull into your own program π
When you do report an error, please attach a data set to the end of your message. This allows us to see the error for ourselves. Qhull is maintained part-time β³ (so be nice, bestie).
π E-MAIL π
Please send correspondence to qhull@qhull.org and report bugs to qhull_bug@qhull.org. Let us know how you use Qhull π«Ά if you mention it in a paper, please send the reference and an abstract.
If you would like to get Qhull announcements (e.g., a new version) and news (any bugs that get fixed, etc.), let us know and we will add you to our mailing list β¨ if you would like to communicate with other Qhull users, we will add you to the qhull_users alias. For Internet news about geometric algorithms and convex hulls, look at comp.graphics.algorithms and sci.math.num-analysis.
π SEE ALSO π
Barber, C. B., D.P. Dobkin, and H.T. Huhdanpaa, "The Quickhull Algorithm for Convex Hulls," ACM Trans. on Mathematical Software, 22(4):469β483, Dec. 1996. http://portal.acm.org/citation.cfm?doid=235815.235821 http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.117.405
Clarkson, K.L., K. Mehlhorn, and R. Seidel, "Four results on randomized incremental construction," Computational Geometry: Theory and Applications, vol. 3, p. 185β211, 1993.
Preparata, F. and M. Shamos, Computational Geometry, Springer-Verlag, New York, 1985.
π AUTHORS π
C. Bradford Barber Hannu Huhdanpaa
bradb@shore.net hannu@qhull.org
.fi
π ACKNOWLEDGEMENTS π
A special thanks to Albert Marden, Victor Milenkovic, the Geometry Center, Harvard University, and Endocardial Solutions, Inc. for supporting this work πΈ
Qhull 1.0 and 2.0 were developed under National Science Foundation grants NSF/DMS-8920161 and NSF-CCR-91-15793 750-7504. David Dobkin guided the original work at Princeton University. If you find it useful, please let us know π₯Ή
The Geometry Center is supported by grant DMS-8920161 from the National Science Foundation, by grant DOE/DE-FG02-92ER25137 from the Department of Energy, by the University of Minnesota, and by Minnesota Technology, Inc.
Qhull is available from http://www.qhull.org π
And that's the whole page, bestie β slay. This one was brought to you by the Geometry Center, dated2003/12/30, living in sectionqhull(1)of your friendly neighborhood manual. Go build a hull π β¨π¦
π¦ where this page comes from
- alpine 3.24: qhull-doc 2020.2-r3 Β· custom
- arch rolling: qhull 2020.2-6 Β· LicenseRef-qhull
- debian bookworm: qhull-bin 2020.2-5 Β· Qhull
- debian trixie: qhull-bin 2020.2-6+b2 Β· Qhull
- epel 10: qhull 1:8.0.2-2.el10_0 Β· Qhull
- fedora 43: qhull 1:8.0.2-7.fc43 Β· Qhull
- fedora 43: qhull 1:8.0.2-7.fc43 Β· Qhull
- fedora 44: qhull 1:8.0.2-8.fc44 Β· Qhull
- fedora 44: qhull 1:8.0.2-8.fc44 Β· Qhull
- nixos 26.05: qhull 2020.2
- nixpkgs unstable: qhull 2020.2
- opensuse-leap 16.0: qhull 2020.2-160000.2.2 Β· Qhull
- opensuse-leap 16.0: qhull 2020.2-160000.2.2 Β· Qhull
- opensuse-leap 16.0: qhull 2020.2-160000.2.2 Β· Qhull
- opensuse-leap 16.0: qhull 2020.2-160000.2.2 Β· Qhull
- ubuntu jammy: qhull-bin 2020.2-4 Β· Qhull
- ubuntu noble: qhull-bin 2020.2-6build1 Β· Qhull
- ubuntu questing: qhull-bin 2020.2-6build1
- ubuntu resolute: qhull-bin 2020.2-8 Β· Qhull
- ubuntu stonking: qhull-bin 2020.2-9 Β· Qhull
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms