| 1 |
Name |
| 2 |
|
| 3 |
qhull, rbox 2003.1 2003/12/30 |
| 4 |
|
| 5 |
Convex hull, Delaunay triangulation, Voronoi diagrams, Halfspace intersection |
| 6 |
|
| 7 |
Documentation: |
| 8 |
html/index.htm |
| 9 |
|
| 10 |
Available from: |
| 11 |
<http://www.qhull.org> |
| 12 |
<http://savannah.nongnu.org/projects/qhull> |
| 13 |
|
| 14 |
Version 1 (simplicial only): |
| 15 |
<http://www.qhull.org/download/qhull-1.0.tar.gz> |
| 16 |
<http://www.qhull.org/download/qhull.sit.hqx> |
| 17 |
|
| 18 |
News and a paper: |
| 19 |
<http://www.qhull.org/news> |
| 20 |
<http://citeseer.nj.nec.com/83502.html> |
| 21 |
|
| 22 |
Purpose |
| 23 |
|
| 24 |
Qhull is a general dimension convex hull program that reads a set |
| 25 |
of points from stdin, and outputs the smallest convex set that contains |
| 26 |
the points to stdout. It also generates Delaunay triangulations, Voronoi |
| 27 |
diagrams, furthest-site Voronoi diagrams, and halfspace intersections |
| 28 |
about a point. |
| 29 |
|
| 30 |
Rbox is a useful tool in generating input for Qhull; it generates |
| 31 |
hypercubes, diamonds, cones, circles, simplices, spirals, |
| 32 |
lattices, and random points. |
| 33 |
|
| 34 |
Qhull produces graphical output for Geomview. This helps with |
| 35 |
understanding the output. <http://www.geomview.org> |
| 36 |
|
| 37 |
|
| 38 |
Environment requirements |
| 39 |
|
| 40 |
Qhull and rbox should run on all 32-bit and 64-bit computers. Use |
| 41 |
an ANSI C or C++ compiler to compile the program. The software is |
| 42 |
self-contained. |
| 43 |
|
| 44 |
Qhull is copyrighted software. Please read COPYING.txt and REGISTER.txt |
| 45 |
before using or distributing Qhull. |
| 46 |
|
| 47 |
To cite Qhull, please use |
| 48 |
|
| 49 |
Barber, C.B., Dobkin, D.P., and Huhdanpaa, H.T., "The Quickhull |
| 50 |
algorithm for convex hulls," ACM Trans. on Mathematical Software, |
| 51 |
22(4):469-483, Dec 1996, http://www.qhull.org. |
| 52 |
|
| 53 |
To contribute to Qhull |
| 54 |
|
| 55 |
Qhull is on Savannah at http://savannah.nongnu.org/projects/qhull/ |
| 56 |
|
| 57 |
Qhull on Windows 95, 98, ME, NT, 2000, XP |
| 58 |
|
| 59 |
The zip file contains rbox.exe, qhull.exe, qconvex.exe, qdelaunay.exe, |
| 60 |
qhalf.exe, qvoronoi.exe, documentation files, and source files. |
| 61 |
|
| 62 |
To install Qhull: |
| 63 |
- Unzip the files into a directory. You may use WinZip32 <www.hotfiles.com> |
| 64 |
- Click on QHULL-GO |
| 65 |
|
| 66 |
- In Windows 95, the DOS window needs improvement. |
| 67 |
- Increase the size of the screen font to 8x12. |
| 68 |
- If the text is too dim, fix the screen colors with shareware (e.g., crt.exe) |
| 69 |
- If you use qhull a lot, consider using the Cygwin Unix shell (www.cygwin.com), |
| 70 |
|
| 71 |
To learn about Qhull: |
| 72 |
- Execute 'qconvex' for a synopsis and examples. |
| 73 |
- Execute 'rbox 10 | qconvex' to compute the convex hull of 10 random points. |
| 74 |
- Execute 'rbox 10 | qconvex i TO file' to write results to 'file'. |
| 75 |
- If an error occurs, Windows 95 sends the error to stdout instead of stderr |
| 76 |
- use 'TO xxx' to send normal output to xxx and error output to stdout |
| 77 |
- Browse the documentation: qhull\html\index.htm |
| 78 |
|
| 79 |
Compiling with cygwin on Windows NT, 2000, XP |
| 80 |
- install cygwin [www.cygwin.com] with gcc, make, ar, and ln |
| 81 |
- cd qhull/src |
| 82 |
- make -f Makefile.txt |
| 83 |
|
| 84 |
Qhull on Unix (Debian) |
| 85 |
|
| 86 |
The gzip file, qhull.tar.gz, contains documentation and source files for |
| 87 |
qhull and rbox. It should compile on all Unix systems, including Debian. |
| 88 |
You may also use the source instructions below. |
| 89 |
|
| 90 |
To unpack the gzip file |
| 91 |
- tar zxf qhull.tar.gz |
| 92 |
- cd qhull |
| 93 |
|
| 94 |
Compile with the configure Makefile [R. Laboissiere]: |
| 95 |
- ./configure |
| 96 |
- make |
| 97 |
|
| 98 |
Compiling the source distribution |
| 99 |
|
| 100 |
The gzip file, qhull-src.tgz, contains documentation and source files for |
| 101 |
qhull and rbox. |
| 102 |
|
| 103 |
To unpack the gzip file |
| 104 |
- tar zxf qhull-src.tgz |
| 105 |
- cd qhull |
| 106 |
|
| 107 |
Compiling with Makefile (i.e., Makefile.txt) |
| 108 |
- cd src |
| 109 |
- in Makefile, check the CC, CCOPTS1, PRINTMAN, and PRINTC defines |
| 110 |
- the defaults are gcc and enscript |
| 111 |
- CCOPTS1 should include the ANSI flag. It defines __STDC__ |
| 112 |
- in user.h, check the definitions of qh_SECticks and qh_CPUclock. |
| 113 |
- use '#define qh_CLOCKtype 2' for timing runs longer than 1 hour |
| 114 |
- type: make |
| 115 |
- this builds: qhull qconvex qdelaunay qhalf qvoronoi rbox libqhull.a |
| 116 |
- type: make doc |
| 117 |
- this prints the man page |
| 118 |
- See also qhull/html/index.htm |
| 119 |
- if your compiler reports many errors, it is probably not a ANSI C compiler |
| 120 |
- you will need to set the -ansi switch or find another compiler |
| 121 |
- if your compiler warns about missing prototypes for fprintf() etc. |
| 122 |
- this is ok, your compiler should have these in stdio.h |
| 123 |
- if your compiler warns about missing prototypes for memset() etc. |
| 124 |
- include memory.h in qhull_a.h |
| 125 |
- if your compiler is gcc-2.95.1, you need to set flag -fno-strict-aliasing. |
| 126 |
- This flag is set by default for other versions [Karas, Krishnaswami] |
| 127 |
- if your compiler reports "global.c: storage size of 'qh_qh' isn't known" |
| 128 |
- delete the initializer "={0}" in global.c, stat.c and mem.c |
| 129 |
- if your compiler warns about "stat.c: improper initializer" |
| 130 |
- this is ok, the initializer is not used |
| 131 |
- if you have trouble building libqhull.a with 'ar' |
| 132 |
- try 'make -f Makefile.txt qhullx' |
| 133 |
- if the code compiles, the qhull test case will automatically execute |
| 134 |
- if an error occurs, there's an incompatibility between machines |
| 135 |
- For gcc-2.95.1, you need to set flag -fno-strict-aliasing. |
| 136 |
It is set by default for other versions of gcc [Karas, Krishnaswami] |
| 137 |
- If you can, try a different compiler |
| 138 |
- You can turn off the Qhull memory manager with qh_NOmem in mem.h |
| 139 |
- You can turn off compiler optimization (-O2 in Makefile) |
| 140 |
- If you find the source of the problem, please let us know |
| 141 |
- if you have Geomview (www.geomview.org) |
| 142 |
- try 'rbox 100 | qconvex G >a' and load 'a' into Geomview |
| 143 |
- run 'q_eg' for Geomview examples of Qhull output (see qh-eg.htm) |
| 144 |
- to install the programs and their man pages: |
| 145 |
- define MANDIR and BINDIR |
| 146 |
- type 'make install' |
| 147 |
|
| 148 |
Compiling on Windows 95, 98, NT, 2000, XP |
| 149 |
|
| 150 |
Qhull compiles as a console application in Visual C++ 5.0 at warning |
| 151 |
level 3. |
| 152 |
|
| 153 |
Visual C++ quickstart for qhull.exe only: |
| 154 |
- create a "Win32 console application" called "qhull" |
| 155 |
- add the following files: |
| 156 |
geom.c geom2.c global.c io.c mem.c merge.c poly.c poly2.c qhull.c |
| 157 |
qset.c stat.c unix.c user.c |
| 158 |
- create a "Win32 console application" called "rbox" |
| 159 |
- add rbox.c |
| 160 |
|
| 161 |
Visual C++ quickstart for qhull library, qhull.exe, qconvex.exe, etc. |
| 162 |
- To simplify setting up lots of projects, |
| 163 |
- create a temporary "Win32 console application" called "source" |
| 164 |
- add all .c files from .../src/... |
| 165 |
- In Tools::Options::Tab |
| 166 |
Set tab size to 8 and indent size to 2 |
| 167 |
|
| 168 |
- create a "Win32 console application" called "rbox" |
| 169 |
- move rbox.c from "qhull source" |
| 170 |
- for Project:Settings..., Link |
| 171 |
you only need the default libraries |
| 172 |
- build the project |
| 173 |
|
| 174 |
- create a "Win32 static library" called "library" |
| 175 |
- move these files from "qhull source" |
| 176 |
geom.c geom2.c global.c io.c mem.c merge.c poly.c poly2.c qhull.c |
| 177 |
qset.c stat.c user.c |
| 178 |
- set the library file (use the same for debug and release) |
| 179 |
- build the project |
| 180 |
|
| 181 |
- create a "Win32 console application" called "qhull" |
| 182 |
- Move unix.c from "qhull source" |
| 183 |
- Add the library file created by "library" |
| 184 |
- Qhull does not use other libraries |
| 185 |
|
| 186 |
- create a "Win32 console application" called "qconvex" |
| 187 |
- Move qconvex.c from "qhull source" |
| 188 |
- Copy the library file from "qhull" |
| 189 |
|
| 190 |
- do the same for qdelaun.c, qhalf, qvoronoi.c, user_eg.c, user_eg2.c |
| 191 |
- delete "qhull sources" since it is no longer needed |
| 192 |
- use Project:Settings to make any changes |
| 193 |
- use batch build to rebuild everything |
| 194 |
|
| 195 |
Qhull compiles with Borland C++ 5.0 bcc32. A Makefile is included. |
| 196 |
Execute 'make -f Mborland'. If you use the Borland IDE, set the ANSI |
| 197 |
option in Options:Project:Compiler:Source:Language-compliance. |
| 198 |
|
| 199 |
Qhull compiles with Borland C++ 4.02 for Win32 and DOS Power Pack. |
| 200 |
Use 'make -f Mborland -D_DPMI'. Qhull 1.0 compiles with Borland |
| 201 |
C++ 4.02. For rbox 1.0, use "bcc32 -WX -w- -O2-e -erbox -lc rbox.c". |
| 202 |
Use the same options for Qhull 1.0. [D. Zwick] |
| 203 |
|
| 204 |
Qhull compiles with Metrowerks C++ 1.7 with the ANSI option. |
| 205 |
|
| 206 |
If you turn on full warnings, the compiler will report a number of |
| 207 |
unused variables, variables set but not used, and dead code. These are |
| 208 |
intentional. For example, variables may be initialized (unnecessarily) |
| 209 |
to prevent warnings about possible use of uninitialized variables. |
| 210 |
|
| 211 |
Compiling on the Power Macintosh |
| 212 |
|
| 213 |
Qhull compiles on the Power Macintosh with Metrowerk's C compiler. |
| 214 |
It uses the SIOUX interface to read point coordinates and return output. |
| 215 |
There is no graphical output. For project files, see 'Compiling for |
| 216 |
Windows 95'. Instead of using SIOUX, Qhull may be embedded within an |
| 217 |
application. |
| 218 |
|
| 219 |
Version 1 is available for Macintosh computers by download of qhull.sit.hqx |
| 220 |
It reads point coordinates from a standard file and returns output |
| 221 |
to a standard file. There is no graphical output. |
| 222 |
|
| 223 |
|
| 224 |
Compiling on other machines |
| 225 |
|
| 226 |
Some users have reported problems with compiling Qhull under Irix 5.1. It |
| 227 |
compiles under other versions of Irix. |
| 228 |
|
| 229 |
If you have troubles with the memory manager, you can turn it off by |
| 230 |
defining qh_NOmem in mem.h. |
| 231 |
|
| 232 |
You may compile Qhull with a C++ compiler. |
| 233 |
|
| 234 |
|
| 235 |
Distributed files |
| 236 |
|
| 237 |
README.txt // instructions for installing Qhull |
| 238 |
REGISTER.txt // Qhull registration |
| 239 |
COPYING.txt // copyright notice |
| 240 |
QHULL-GO.pif // Windows icon for qhull-go.bat |
| 241 |
Announce.txt // announcement |
| 242 |
Changes.txt // change history for Qhull and rbox |
| 243 |
File_id.diz // package descriptor |
| 244 |
index.htm // Home page |
| 245 |
html/qh-faq.htm // Frequently asked questions |
| 246 |
html/qh-get.htm // Download page |
| 247 |
html/index.htm // Manual |
| 248 |
src/Makefile.txt // Makefile for Unix or cygwin 'make' |
| 249 |
src/Mborland // Makefile for Borland C++/Win32 |
| 250 |
src/Make-config.sh // Create Debian configure and automake |
| 251 |
|
| 252 |
src/ |
| 253 |
rbox consists of: |
| 254 |
rbox.exe // Win32 executable (.zip only) |
| 255 |
rbox.htm // html manual |
| 256 |
rbox.man // Unix man page |
| 257 |
rbox.txt |
| 258 |
rbox.c // source program |
| 259 |
|
| 260 |
qhull consists of: |
| 261 |
qhull.exe // Win32 executables (.zip only) |
| 262 |
qconvex.exe |
| 263 |
qdelaunay.exe |
| 264 |
qhalf.exe |
| 265 |
qvoronoi.exe |
| 266 |
qhull-go.bat // DOS window |
| 267 |
qconvex.htm // html manuals |
| 268 |
qdelaun.htm |
| 269 |
qdelau_f.htm |
| 270 |
qhalf.htm |
| 271 |
qvoronoi.htm |
| 272 |
qvoron_f.htm |
| 273 |
qh-eg.htm |
| 274 |
qh-impre.htm |
| 275 |
qh-in.htm |
| 276 |
index.htm |
| 277 |
qh-opt*.htm |
| 278 |
qh-quick.htm |
| 279 |
qh--4d.gif,etc. // images for manual |
| 280 |
qhull.man // Unix man page |
| 281 |
qhull.txt |
| 282 |
q_eg // shell script for Geomview examples |
| 283 |
q_egtest // shell script for Geomview test examples |
| 284 |
q_test // shell script to test qhull |
| 285 |
|
| 286 |
top-level source files: |
| 287 |
src/index.htm // index to source files |
| 288 |
qh-...htm // specific files |
| 289 |
user.h // header file of user definable constants |
| 290 |
qhull.h // header file for qhull |
| 291 |
unix.c // Unix front end to qhull |
| 292 |
qhull.c // Quickhull algorithm with partitioning |
| 293 |
user.c // user re-definable functions |
| 294 |
user_eg.c // example of incorporating qhull into a user program |
| 295 |
user_eg2.c // more complex example |
| 296 |
qhull_interface.cpp // call Qhull from C++ |
| 297 |
|
| 298 |
other source files: |
| 299 |
qhull_a.h // include file for *.c |
| 300 |
geom.c // geometric routines |
| 301 |
geom2.c |
| 302 |
geom.h |
| 303 |
global.c // global variables |
| 304 |
io.c // input-output routines |
| 305 |
io.h |
| 306 |
mem.c // memory routines, this is stand-alone code |
| 307 |
mem.h |
| 308 |
merge.c // merging of non-convex facets |
| 309 |
merge.h |
| 310 |
poly.c // polyhedron routines |
| 311 |
poly2.c |
| 312 |
poly.h |
| 313 |
qset.c // set routines, this only depends on mem.c |
| 314 |
qset.h |
| 315 |
stat.c // statistics |
| 316 |
stat.h |
| 317 |
|
| 318 |
Authors: |
| 319 |
|
| 320 |
C. Bradford Barber Hannu Huhdanpaa |
| 321 |
bradb@qhull.org hannu@qhull.org |
| 322 |
|
| 323 |
The Geometry Center |
| 324 |
University of Minnesota |
| 325 |
|
| 326 |
Qhull 1.0 and 2.0 were developed under NSF grants NSF/DMS-8920161 |
| 327 |
and NSF-CCR-91-15793 750-7504 at the Geometry Center and Harvard |
| 328 |
University. If you find Qhull useful, please let us know. |