Polyhedral Sets - Maple Programming Help

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : System : Information : Updates : Maple 2015 : updates/Maple2015/PolyhedralSets

Polyhedral Sets

The new PolyhedralSets package brings new functionality to Maple 2015 for working with sets defined either by a set of equalities and inequalities (H-Representation), or by a set of vertices and rays (V-Representation). The added functionality lets you explore the geometric and topological properties of a set, perform standard set operations, and apply linear transformations.

 

withPolyhedralSets

AffineHull,Area,CharacteristicCone,ConvexHull,Coordinates,Dimension,Display,DualSet,Edges,Equal,ExampleSets,Faces,Facets,Graph,ID,InteriorPoint,IsBounded,IsEmpty,IsFace,IsInInterior,IsUniversalSet,Length,LinearTransformation,LinearitySpace,LocatePoint,Plot,PolyhedralSet,PrintLevel,Project,Relations,SplitIntoSimplices,Translate,Vertices,VerticesAndRays,Volume,in,intersect,subset

(1)

 

Creating Sets

Visualization

The Structure of a Set

Working with and Transforming Sets

Support for n-Dimensional Sets

See Also

Creating Sets

Polyhedral Sets can be created from a list of equalities and non-strict inequalities. Redundant relations are removed and the remaining relations are put into a canonical form that speeds up later operations.

relationsx+y2,x+2 y3,x+y+z=1:

polyset PolyhedralSetrelations;

{Coordinates:x,y,zRelations:−1z,yz+2,x=yz+1

(1.1)

Sets can also be created from a list of vertices and rays. The package automatically prunes the list of vertices and rays to capture only the extreme vertices and rays of the set.

vertices, rays1,2,12,12,0,1, 2,2:

polysetPolyhedralSetvertices, rays;

{Coordinates:x1,x2Relations:1+x2x1,x1x2+1,x1x23+13

(1.2)

The set is displayed as its H-Representation, but the conversion back to its V-Representation is simple.

VerticesAndRayspolyset;

1,2,0,1,1,1

(1.3)

The ExampleSets  subpackage streamlines the creation of common sets. See ExampleSets- NDimensions and ExampleSets- ThreeDimensions.

ExampleSets:-Tetrahedron;

{Coordinates:x1,x2,x3Relations:x2x31x1,x2+x31x1,x1x3+x2+1,x1x3x2+1

(1.4)

Visualization

The sets can be rendered in 2-D or 3-D, whether they are bounded or unbounded. The style of the visualization is fully customizable for seamless integration into any webpage, document, or presentation.

c  ExampleSets:-Cube:

Plotc  

 

 

Plotc, faceoptions=transparency = 0.5,  color=Fill Niagara Green,edgeoptions=color=Line Niagara Burgundy, thickness=5,vertexoptions=color=Point Niagara 9, symbolsize=40, axes=none

 

 

 

 

The Structure of a Set

Finding the faces of a set allows you to explore its structure. Faces of any dimension can be obtained, from the (n - 1) faces of a set in n dimensions right down to its vertices.

tExampleSets:-Tetrahedron:

t_faces Facest

{Coordinates:x1,x2,x3Relations:−1x3,x3x2,x21,x1=x3x2+1,{Coordinates:x1,x2,x3Relations:x31,−1x2,x2x3,x1=x3+x2+1,{Coordinates:x1,x2,x3Relations:x31,x3x2,x21,x1=x2+x31,{Coordinates:x1,x2,x3Relations:−1x3,−1x2,x2x3,x1=x2x31

(3.1)

t_vertices Facest,dimension=0

{Coordinates:x1,x2,x3Relations:x3=1,x2=−1,x1=−1,{Coordinates:x1,x2,x3Relations:x3=−1,x2=1,x1=−1,{Coordinates:x1,x2,x3Relations:x3=−1,x2=−1,x1=1,{Coordinates:x1,x2,x3Relations:x3=1,x2=1,x1=1

(3.2)

The graph of the faces is easily generated, illuminating which faces share points with which other faces. The structure of the set can then be further explored by leveraging the functionality of the GraphTheory package.

cExampleSets:-Cube:

c_graph,c_plotGraphc, output=graph,plot:

plots:-displayc_plot

GraphTheoryNeighborsc_graph,323

728,278,260,318,316

(3.3)

 

 

Working with and Transforming Sets

The dual of a polyhedral set can be computed, whether it is bounded or not, and whether it includes the origin or not. The bounded sets that include the origin show how vertices map to faces in the dual and vice versa.

octaprismPolyhedralSet−1z,z1,−1y,y1,y6692247321x,−1x,y6692247321x,xy+6692247321,x1,xy+6692247321:

Plotoctaprism, orientation=43,80,0

octaprism_dualDualSetoctaprism

octaprism_dual:={Coordinates:x,y,zRelations:47321z1960147321y196014732119601x,47321z1960147321y196014732119601x,z19601y473211x,z19601y473211x,z+19601y473211x,z+19601y473211x,47321y1960147321z196014732119601x,47321y19601+47321z196014732119601x,x47321z19601+47321y19601+4732119601,x47321z19601+47321y19601+4732119601,,(6 more constraints)

(4.1)

Plotoctaprism_dual, orientation=43,80,0

 

c  TranslateExampleSets:-Cube, 2,2,2

c:={Coordinates:x1,x2,x3Relations:1x3,x33,−3x2,x2−1,1x1,x13

(4.2)

Plotc

c_dualDualSetc

c_dual:={Coordinates:x1,x2,x3Relations:x13x2x3+1,x13x23x3+1,x1x2x33+13,x1x2x3+13,x1x23x3+1,x1x23x33+13,x1x23x3+13

(4.3)

Plotc_dual

Support for linear matrix transformations, translations, and projections is included.

Linear transformations and translations (blue and green) applied to the semiregular cuboctahedron ...

The elementary set functionality, such as the intersection, convex hull, inclusion tests, and equality test provide user-friendly means of working with polyhedral sets.

Form the convex hull (green) of a cube (red) and a tetrahedron (blue)

 

Support for n-Dimensional Sets

Sets of higher dimensions are supported by the algorithms in the package, so that properties like the volume of a set can be calculated for any set.

s5  ExampleSets:-Simplex5

{Coordinates:x1,x2,x3,x4,x5Relations:0x5,0x4,0x3,0x2,0x1,x1x2x3x4x5+1

(5.1)

Volumes5

1120

(5.2)

Likewise, the set operators can work in any dimension,

ExampleSets:-Simplex5 subset ExampleSets:-Hypercube5

true

(5.3)

and the topological properties of sets can be explored similarly.

GraphExampleSets:-Simplex4

See Also

PolyhedralSets Package (Overview), ExampleSets- NDimensions, ExampleSets- ThreeDimensions, GraphTheory Package (Overview)