projection

Purpose

Compute the projection of the Polyhedron.

Syntax

p = P.projection(dims, method)
p = projection(P, dims, method)
p = projection(P, dims, method, solver)

Description

Computes the polyhedron ../../../../../../fig/mpt/modules/geometry/sets/@Polyhedron/projection1.png

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

Input Arguments

P

Polyhedron in any format

Class: Polyhedron

dims

Dimensions upon which to project

Class: double

method

Sets the method used to compute the projection. If omitted, then the method is chosen based on the properties of ../../../../../../fig/mpt/modules/geometry/sets/@Polyhedron/projection2.png and ../../../../../../fig/mpt/modules/geometry/sets/@Polyhedron/projection3.png.

Class: char

Allowed values:

  • fourier

    : Use fourier elimination. Good if projecting off a small number of dimensions. Projection will be highly redundant (use q.minHRep() to get irredundant form).
  • ifourier

    : Fourier elimination with intermediate redundancy elimination. Dimensions are projected off one by one, followed by removal of redundant constraints. The result is still redundant, though.
  • mplp

    : Use mplp algorithm to compute projection. Good if the projection is not very degenerate (dimensions of projected facets are equal to the faces that they were projected from)
  • vrep

    : Compute vertex representation and then project

solver

If "mplp" method is selected, then this argument determines which solver to use for solving MPLP problem. By default the first parametric solver is selected from the list of available solvers.

Class: char

Output Arguments

p

Projection of ../../../../../../fig/mpt/modules/geometry/sets/@Polyhedron/projection4.png onto the dimensions ../../../../../../fig/mpt/modules/geometry/sets/@Polyhedron/projection5.png

Class: Polyhedron

Example(s)

Example 1

Create random polytope:
P = ExamplePoly.randVrep('d',3) + [0;0;5];
Compute projection:
p = P.projection(1:2)
Polyhedron in R^2 with representations:
    H-rep               : Unknown (call computeHRep() to compute)
    V-rep (redundant)   : Vertices  10 | Rays   0
Functions : none
Plot the result
plot([P,p-[0;1]])

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

Example 2

Create random polyhedron:
P = ExamplePoly.randHrep('ne',1,'d',3,'nr',1) + [0;0;5];
Compute projection:
p = P.projection(1:2)
Polyhedron in R^2 with representations:
    H-rep (redundant)   : Inequalities   4 | Equalities   0
    V-rep               : Unknown (call computeVRep() to compute)
Functions : none
Plot the result
plot([P,p]);

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

Example 3

Create zonotope:
Z = ExamplePoly.randZono('d',5,'n',8);
Project onto R3 and plot:
Z.projection(1:3).plot;

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

See Also

project


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