<?xml version="1.0" encoding="utf-8" ?> <!-- for emacs: -*- coding: utf-8 -*- --> <!-- Apache may like this line in the file .htaccess: AddCharset utf-8 .html --> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1 plus MathML 2.0 plus SVG 1.1//EN" "http://www.w3.org/2002/04/xhtml-math-svg/xhtml-math-svg-flat.dtd" > <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> <head><title>convHull -- The convex hull complex.</title> <link rel="stylesheet" type="text/css" href="../../../../Macaulay2/Style/doc.css"/> </head> <body> <table class="buttons"> <tr> <td><div><a href="_coordinates.html">next</a> | <a href="_compute__Faces.html">previous</a> | <a href="_coordinates.html">forward</a> | <a href="_compute__Faces.html">backward</a> | up | <a href="index.html">top</a> | <a href="master.html">index</a> | <a href="toc.html">toc</a> | <a href="http://www.math.uiuc.edu/Macaulay2/">Macaulay2 web site</a></div> </td> </tr> </table> <hr/> <div><h1>convHull -- The convex hull complex.</h1> <div class="single"><h2>Synopsis</h2> <ul><li><div class="list"><dl class="element"><dt class="heading">Usage: </dt><dd class="value"><div><tt>convHull(L)</tt><br/><tt>convHull(fn)</tt></div> </dd></dl> </div> </li> <li><div class="single">Inputs:<ul><li><span><tt>L</tt>, <span>a <a href="../../Macaulay2Doc/html/___List.html">list</a></span>, of <a href="../../Macaulay2Doc/html/___Vector.html" title="the class of all elements of free modules that are handled by the engine">Vector</a>s</span></li> <li><span><tt>fn</tt>, <span>a <a href="../../Macaulay2Doc/html/___String.html">string</a></span></span></li> </ul> </div> </li> <li><div class="single">Outputs:<ul><li><span><tt>C</tt>, <span>an <a href="___Complex.html">embedded complex</a></span></span></li> </ul> </div> </li> <li><div class="single"><a href="../../Macaulay2Doc/html/_using_spfunctions_spwith_spoptional_spinputs.html">Optional inputs</a>:<ul><li><span><a href="_file.html">file => ...</a>, -- Store result of a computation in a file.</span></li> </ul> </div> </li> </ul> </div> <div class="single"><h2>Description</h2> <div><p>Returns the convex hull of lattice vectors lying all in the same space. The output has C.isPolytope==true.</p> <p>If applied to the string fn the result of a previous computation stored via the option <a href="_file.html" title="Store result of a computation in a file.">file</a> is read from the file fn.</p> <p>The 0-point has to lie in the convex hull.</p> <div/> <table class="examples"><tr><td><pre>i1 : L={vector {1,0,0},vector {-1,0,0},vector {0,1,0},vector {0,-1,0},vector {0,0,1},vector {0,0,-1}} o1 = {| 1 |, | -1 |, | 0 |, | 0 |, | 0 |, | 0 |} | 0 | | 0 | | 1 | | -1 | | 0 | | 0 | | 0 | | 0 | | 0 | | 0 | | 1 | | -1 | o1 : List</pre> </td></tr> <tr><td><pre>i2 : P=convHull(L) o2 = 3: y y y y y y 0 1 2 3 4 5 o2 : complex of dim 3 embedded in dim 3 (printing facets) equidimensional, non-simplicial, F-vector {1, 6, 12, 8, 1}, Euler = 0</pre> </td></tr> <tr><td><pre>i3 : dP=boundaryOfPolytope P o3 = 2: y y y y y y y y y y y y y y y y y y y y y y y y 0 2 4 1 2 4 0 3 4 1 3 4 0 2 5 1 2 5 0 3 5 1 3 5 o3 : complex of dim 2 embedded in dim 3 (printing facets) equidimensional, simplicial, F-vector {1, 6, 12, 8, 0}, Euler = 1</pre> </td></tr> </table> </div> </div> <div class="single"><h2>Caveat</h2> <div><p>This uses the package Polyhedra.m2 to compute the facets. Too slow compared to Maple/convex.</p> <div>If the package <i>ConvexInterface</i> is loaded, then this command calls Maple/Convex. See the corresponding option explained at <a href="index.html" title="Deformations of Stanley-Reisner rings and related computations.">SRdeformations</a>.</div> </div> </div> <div class="single"><h2>See also</h2> <ul><li><span><a href="___Complex.html" title="The class of all embedded complexes.">Complex</a> -- The class of all embedded complexes.</span></li> </ul> </div> <div class="waystouse"><h2>Ways to use <tt>convHull</tt> :</h2> <ul><li>convHull(List)</li> <li>convHull(String)</li> </ul> </div> </div> </body> </html>