affineHull

Purpose

Compute the affine hull of the Polyhedron.

Syntax

hull = P.affineHull
hull = affineHull(P)

Description

Computes a minimum-rank matrix hull such that

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

Notes:

Input Arguments

P

Polyhedron in any format.

Class: Polyhedron

Output Arguments

hull

Minimum-rank matrix representing the affine hull of P.

Class: double

Example(s)

Example 1

Create low-dimensional V-rep polyhedron:
P = ExamplePoly.randVrep('ne',1,'d',3);
Compute affine hull:
hull = P.affineHull
hull =

        0.0588136143873345        -0.495678199302738         0.866512597426427      2.22044604925031e-16

Plot the result
P.plot; hold on; Polyhedron('He', hull).plot('alpha',0.1); 

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

Example 2

Create H-rep polyhedron with implicit equality:
tmp = [randn(1,3) zeros(1,1)];

P = Polyhedron('H', [randn(20,3) ones(20,1);tmp;-tmp])
Polyhedron in R^3 with representations:
    H-rep (redundant)   : Inequalities  22 | Equalities   0
    V-rep               : Unknown (call computeVRep() to compute)
Functions : none
Compute affine hull:
hull = P.affineHull
hull =

         -1.68255489976003         0.841334198660793         -2.08184473266346                         0

Plot the result
P.plot; hold on; Polyhedron('He', hull).plot('alpha',0.1); 

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

See Also

minvrep, affinemap


© 2010-2013 Colin Neil Jones: EPF Lausanne, colin.jones@epfl.ch