Macaulay2 » Documentation
Packages » Polyhedra :: Polyhedron + Polyhedron
next | previous | forward | backward | up | index | toc

Polyhedron + Polyhedron -- computes the Minkowski sum of two polyhedra

Synopsis

Description

Computes the Minkowski sum of P1 and P2.This is the polyhedron P1 + P2 = {x + y | x in P1, y in P2}. Note that P1 and P2 have to lie in the same ambient space.

See also minkowskiSum.
i1 : P1 = convexHull matrix {{1,0,0},{0,1,0}}

o1 = P1

o1 : Polyhedron
i2 : P2 = convexHull matrix {{-1,0,0},{0,-1,0}}

o2 = P2

o2 : Polyhedron
i3 : P = P1 + P2

o3 = P

o3 : Polyhedron
i4 : vertices P

o4 = | -1 1 0  1  0 -1 |
     | 0  0 -1 -1 1 1  |

              2        6
o4 : Matrix QQ  <--- QQ

Ways to use this method: