getFacet

Purpose

Extract facet of the polyhedron specified by the inequality index.

Syntax

Q = P.getFacet()
Q = P.getFacet(index)

Description

Extract the facet of the polyhedron ../../../../../../fig/mpt/modules/geometry/sets/@Polyhedron/getfacet1.png specified by the inequality index. The returned polyhedron ../../../../../../fig/mpt/modules/geometry/sets/@Polyhedron/getfacet2.png is formed by rewriting this ineqality as equality constraint. The polyhedron ../../../../../../fig/mpt/modules/geometry/sets/@Polyhedron/getfacet3.png is given as

../../../../../../fig/mpt/modules/geometry/sets/@Polyhedron/getfacet11.png

Given the index, the polyhedron ../../../../../../fig/mpt/modules/geometry/sets/@Polyhedron/getfacet4.png is built as

../../../../../../fig/mpt/modules/geometry/sets/@Polyhedron/getfacet12.png

The polyhedron ../../../../../../fig/mpt/modules/geometry/sets/@Polyhedron/getfacet5.png must be given in its minimal representation (irredundant) H-representation, otherwise an error is thrown.

Input Arguments

P

Polyhedron in H-representation

Class: Polyhedron

index

Index of a facet from polyhedron ../../../../../../fig/mpt/modules/geometry/sets/@Polyhedron/getfacet6.png which is less or equal than the number of hyperplanes defining ../../../../../../fig/mpt/modules/geometry/sets/@Polyhedron/getfacet7.png. If omited, all facets will be returned as a polyhedron array.

Class: double

Output Arguments

Q

Polyhedron ../../../../../../fig/mpt/modules/geometry/sets/@Polyhedron/getfacet8.png that represents lower-dimensional facet of the Polyhedron ../../../../../../fig/mpt/modules/geometry/sets/@Polyhedron/getfacet9.png.

Class: Polyhedron

Example(s)

Example 1

Create random polyhedron ../../../../../../fig/mpt/modules/geometry/sets/@Polyhedron/getfacet10.png and make it irredundant.
 P = ExamplePoly.randHrep; 

 P.minHRep(); 
 Extract the third facet of the polyhedron. 
 Q = P.getFacet(3); 
 Plot the polyhedra.
 P.plot; hold on; Q.plot('LineWidth',3,'LineStyle','-.'); 

../../../../../../fig/mpt/modules/geometry/sets/@Polyhedron/getfacet_img_1.png

See Also

isadjacent


© 2010-2013 Martin Herceg: ETH Zurich, herceg@control.ee.ethz.ch