<!---
N.B.  The definitive Markdown source of this file is located in the
doc/wiki_source subdirectory of the PLplot source tree.  So only use
the ctrl-v and delete capabilities of the GUI file editor at
SourceForge to make changes to the SourceForge version of this file,
where ctrl-v is used to complete a cut and paste from the definitive
version of this file in the PLplot source tree that is being edited
with your favorite file editor, and delete used to remove extraneous
unmodified text whose changed form has been copied with the cut and
paste.
-->

Description
-----------

[qhull](http://www.qhull.org/) computes the convex hull, Delaunay triangulation, Voronoi diagram, halfspace intersection about a point, furthest-site Delaunay triangulation, and furthest-site Voronoi diagram. The software runs in 2-d, 3-d, 4-d, and higher dimensions. Qhull implements the Quickhull algorithm for computing the convex hull. It handles roundoff errors from floating point arithmetic. Qhull also computes volumes, surface areas, and approximations to the convex hull.

Instructions for Mac OS X
-------------------------

N/A

Instructions for Linux
----------------------

N/A

Instructions for Windows
------------------------

-   Download [qhull 2003.1 source](http://www.qhull.org/download/qhull-2003.1-src.tgz)
-   Untar qhull-2003.1-src.tgz
-   Copy <tt>plplot\\cmake\\external\\libqhull\\CMakeLists.txt</tt> to the qhull source dir
-   Cd into the qhull source dir

### MinGW compiler

-   create a build directory and cd into it

`mkdir build`
`cd build`

-   configure the build with cmake

`cmake -G "MinGW Makefiles" -DBUILD_SHARED_LIBS=OFF -DCMAKE_INSTALL_PREFIX=../local ..`

-   make and install the library

`mingw32-make`
`mingw32-make install`

### Visual C++ compiler

-   create a build directory and cd into it

`mkdir build`
`cd build`

-   configure the build with cmake

`cmake -G "NMake Makefiles" -DBUILD_SHARED_LIBS=OFF -DCMAKE_INSTALL_PREFIX=../local ..`

-   make and install the library

`nmake`
`nmake install`

### Set CMake paths

-   set environment variables (for MinGW and Visual C++)

`set QHULLDIR=c:\libraries\qhull-2003.1\local`
`set CMAKE_INCLUDE_PATH=%QHULLDIR%\include;%CMAKE_INCLUDE_PATH%`
`set CMAKE_LIBRARY_PATH=%QHULLDIR%\lib;%CMAKE_LIBRARY_PATH%`

CMake is now able to find the qhull library and headers.


The content of this page is available under the [GNU Free Documentation License 1.2](http://www.gnu.org/copyleft/fdl.html).