<?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>affineImage(Matrix,Polyhedron,Matrix) -- computes the affine image of a polyhedron</title> <link rel="stylesheet" type="text/css" href="../../../../Macaulay2/Style/doc.css"/> </head> <body> <table class="buttons"> <tr> <td><div><a href="_affine__Preimage.html">next</a> | <a href="_affine__Image_lp__Matrix_cm__Cone_cm__Matrix_rp.html">previous</a> | <a href="_affine__Preimage.html">forward</a> | <a href="_affine__Image_lp__Matrix_cm__Cone_cm__Matrix_rp.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>affineImage(Matrix,Polyhedron,Matrix) -- computes the affine image of a polyhedron</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> P1 = affineImage(A,P,v) </tt><br/><tt>P1 = affineImage(A,P) </tt><br/><tt>P1 = affineImage(P,v)</tt></div> </dd></dl> </div> </li> <li><span>Function: <a href="_affine__Image.html" title="computes the affine image of a cone or polyhedron">affineImage</a></span></li> <li><div class="single">Inputs:<ul><li><span><tt>A</tt>, <span>a <a href="../../Macaulay2Doc/html/___Matrix.html">matrix</a></span>, with entries in <a href="../../Macaulay2Doc/html/___Z__Z.html" title="the class of all integers">ZZ</a> or <a href="../../Macaulay2Doc/html/___Q__Q.html" title="the class of all rational numbers">QQ</a></span></li> <li><span><tt>P</tt>, <span>a <a href="___Polyhedron.html">convex polyhedron</a></span></span></li> <li><span><tt>v</tt>, <span>a <a href="../../Macaulay2Doc/html/___Matrix.html">matrix</a></span>, with entries in <a href="../../Macaulay2Doc/html/___Z__Z.html" title="the class of all integers">ZZ</a> or <a href="../../Macaulay2Doc/html/___Q__Q.html" title="the class of all rational numbers">QQ</a> and only one column representing a vector</span></li> </ul> </div> </li> <li><div class="single">Outputs:<ul><li><span><tt>P1</tt>, <span>a <a href="___Polyhedron.html">convex polyhedron</a></span></span></li> </ul> </div> </li> </ul> </div> <div class="single"><h2>Description</h2> <div><p/> <tt>A</tt> must be a matrix from the ambient space of the polyhedron <tt>P</tt> to some other target space and <tt>v</tt> must be a vector in that target space, i.e. the number of columns of <tt>A</tt> must equal the ambient dimension of <tt>P</tt> and <tt>A</tt> and <tt>v</tt> must have the same number of rows. Then <tt>affineImage</tt> computes the polyhedron <tt>{(A*p)+v | p in P}</tt> where <tt>v</tt> is set to 0 if omitted and <tt>A</tt> is the identity if omitted.<p/> For example, consider the following two dimensional polytope:<table class="examples"><tr><td><pre>i1 : P = convexHull matrix {{-2,0,2,4},{-8,-2,2,8}} o1 = {ambient dimension => 2 } dimension of lineality space => 0 dimension of polyhedron => 2 number of facets => 4 number of rays => 0 number of vertices => 4 o1 : Polyhedron</pre> </td></tr> </table> <p/> This polytope is the affine image of the square:<table class="examples"><tr><td><pre>i2 : A = matrix {{-5,2},{3,-1}} o2 = | -5 2 | | 3 -1 | 2 2 o2 : Matrix ZZ <--- ZZ</pre> </td></tr> <tr><td><pre>i3 : v = matrix {{5},{-3}} o3 = | 5 | | -3 | 2 1 o3 : Matrix ZZ <--- ZZ</pre> </td></tr> <tr><td><pre>i4 : Q = affineImage(A,P,v) o4 = {ambient dimension => 2 } dimension of lineality space => 0 dimension of polyhedron => 2 number of facets => 4 number of rays => 0 number of vertices => 4 o4 : Polyhedron</pre> </td></tr> <tr><td><pre>i5 : vertices Q o5 = | -1 1 -1 1 | | -1 -1 1 1 | 2 4 o5 : Matrix QQ <--- QQ</pre> </td></tr> </table> </div> </div> </div> </body> </html>