<p>The first line is the number of facets. The remainder is the
number of merges for each facet, one per line. At most 511 merges
are reported for a facet. See '<ahref="qh-optp.htm#PMn">PMn</a>'
for printing the facets with the most merges. </p>
<h3><ahref="#format">»</a><aname="FM">FM - print Maple
output </a></h3>
<p>Qhull writes a Maple file for 2-d and 3-d convex hulls,
2-d and 3-d halfspace intersections,
and 2-d Delaunay triangulations. Qhull produces a 2-d
or 3-d plot.
<p><i>Warning</i>: This option has not been tested in Maple.
<p>[From T. K. Abraham with help from M. R. Feinberg and N. Platinova.]
The following steps apply while working within the
Maple worksheet environment :
<ol>
<li>Generate the data and store it as an array . For example, in 3-d, data generated
in Maple is of the form : x[i],y[i],z[i]
<p>
<li>Create a single variable and assign the entire array of data points to this variable.
Use the "seq" command within square brackets as shown in the following example.
(The square brackets are essential for the rest of the steps to work.)
<p>
>data:=[seq([x[i],y[i],z[i]],i=1..n)]:# here n is the number of data points
<li>Next we need to write the data to a file to be read by qhull. Before
writing the data to a file, make sure that the qhull executable files and
the data file lie in the same subdirectory. If the executable files are
stored in the "C:\qhull3.1\" subdirectory, then save the file in the same
subdirectory, say "C:\qhull3.1\datafile.txt". For the sake of integrity of
the data file , it is best to first ensure that the data file does not
exist before writing into the data file. This can be done by running a
delete command first . To write the data to the file, use the "writedata"
and the "writedata[APPEND]" commands as illustrated in the following example :
<p>
>system("del c:\\qhull3.1\\datafile.txt");#To erase any previous versions of the file
<br>>writedata("c:\\qhull3.1\\datafile.txt ",[3, nops(data)]);#writing in qhull format
<br>>writedata[APPEND]("c:\\ qhull3.1\\datafile.txt ", data);#writing the data points
<li>
Use the 'FM' option to produce Maple output. Store the output as a ".mpl" file.
For example, using the file we created above, we type the following (in DOS environment)
<p>
qconvex s FM <datafile.txt >dataplot.mpl
<li>
To read 3-d output in Maple, we use the 'read' command followed by
a 'display3d' command. For example (in Maple environment):
<p>
>with (plots):
<br>>read `c:\\qhull3.1\\dataplot.mpl`:#IMPORTANT - Note that the punctuation mark used is ' and NOT '. The correct punctuation mark is the one next to the key for "1" (not the punctuation mark near the enter key)
<br>> qhullplot:=%:
<br>> display3d(qhullplot);
</ol>
<p>For Delaunay triangulation orthogonal projection is better.
<p>For halfspace intersections, Qhull produces the dual
convex hull.
<p>See <ahref="qh-faq.htm#math">Is Qhull available for Maple?</a>