Edges - Maple Help

# Online Help

###### All Products    Maple    MapleSim

PolyhedralSets

 Faces
 get the faces of a polyhedral set
 ID
 get the identifier of a polyhedral set

 Calling Sequence Faces(polyset) Faces(polyset, dimension = d) Faces(polyset, faceid = id) ID(polyset)

Parameters

 polyset - polyhedral set dimension - (optional) integer greater than or equal to $-1$, dimension of faces to be returned, defaults to one less than the dimension of polyset to return its facets faceid - (optional) integer or a set or list of integers indexing faces of polyset

Description

 • The calling sequences Faces(polyset) and Faces(polyset, dimension = d) return a list of polyhedral sets that are $d$-faces of polyset.  Faces(polyset) uses a default value of dimension = Dimension(polyset) - 1, returning the facets of polyset.  If there are no faces of dimension d (e.g. asking for vertices of a half-space), an empty list is returned.
 • The PolyhedralSets[Vertices] (or, PolyhedralSets[Vertexes]) command is shorthand for Faces(polyset, dimension = 0).  Similarly, PolyhedralSets[Edges] is shorthand for Faces(polyset, dimension = 1), and PolyhedralSets[Facets] is shorthand for Faces(polyset).
 • A particular face can be retrieved via Faces(polyset, faceid = id).  The identification number id corresponds to those displayed on the graph returned by PolyhedralSets[Graph].
 • The ID number of a given set can alternatively by obtained with the ID command.  This returns an integer that identifies a set relative to its faces.  Two unrelated polyhedral sets can have the same ID number, but the faces of a given polyhedral set will always have unique ID numbers.

Examples

 > $\mathrm{with}\left(\mathrm{PolyhedralSets}\right):$

Get the facets of a tetrahedron

 > $t≔\mathrm{ExampleSets}:-\mathrm{Tetrahedron}\left(\right):$$\mathrm{t_faces}≔\mathrm{Faces}\left(t\right)$
 ${\mathrm{t_faces}}{≔}\left[{{}\begin{array}{lll}{\mathrm{Coordinates}}& {:}& \left[{{x}}_{{1}}{,}{{x}}_{{2}}{,}{{x}}_{{3}}\right]\\ {\mathrm{Relations}}& {:}& \left[{-}{{x}}_{{3}}{\le }{1}{,}{-}{{x}}_{{2}}{+}{{x}}_{{3}}{\le }{0}{,}{{x}}_{{2}}{\le }{1}{,}{{x}}_{{1}}{+}{{x}}_{{2}}{-}{{x}}_{{3}}{=}{1}\right]\end{array}{,}{{}\begin{array}{lll}{\mathrm{Coordinates}}& {:}& \left[{{x}}_{{1}}{,}{{x}}_{{2}}{,}{{x}}_{{3}}\right]\\ {\mathrm{Relations}}& {:}& \left[{{x}}_{{3}}{\le }{1}{,}{-}{{x}}_{{2}}{\le }{1}{,}{{x}}_{{2}}{-}{{x}}_{{3}}{\le }{0}{,}{{x}}_{{1}}{-}{{x}}_{{2}}{+}{{x}}_{{3}}{=}{1}\right]\end{array}{,}{{}\begin{array}{lll}{\mathrm{Coordinates}}& {:}& \left[{{x}}_{{1}}{,}{{x}}_{{2}}{,}{{x}}_{{3}}\right]\\ {\mathrm{Relations}}& {:}& \left[{{x}}_{{3}}{\le }{1}{,}{-}{{x}}_{{2}}{-}{{x}}_{{3}}{\le }{0}{,}{{x}}_{{2}}{\le }{1}{,}{-}{{x}}_{{2}}{-}{{x}}_{{3}}{+}{{x}}_{{1}}{=}{-1}\right]\end{array}{,}{{}\begin{array}{lll}{\mathrm{Coordinates}}& {:}& \left[{{x}}_{{1}}{,}{{x}}_{{2}}{,}{{x}}_{{3}}\right]\\ {\mathrm{Relations}}& {:}& \left[{-}{{x}}_{{3}}{\le }{1}{,}{-}{{x}}_{{2}}{\le }{1}{,}{{x}}_{{2}}{+}{{x}}_{{3}}{\le }{0}{,}{{x}}_{{2}}{+}{{x}}_{{3}}{+}{{x}}_{{1}}{=}{-1}\right]\end{array}\right]$ (1)

Plot the faces individually (which will give them each a different colour).

 > $\mathrm{Plot}\left(\mathrm{t_faces}\right)$

The edges of the 5 dimensional simplex are:

 > $\mathrm{s5}≔\mathrm{ExampleSets}:-\mathrm{Simplex}\left(5\right)$
 ${\mathrm{s5}}{≔}{{}\begin{array}{lll}{\mathrm{Coordinates}}& {:}& \left[{{x}}_{{1}}{,}{{x}}_{{2}}{,}{{x}}_{{3}}{,}{{x}}_{{4}}{,}{{x}}_{{5}}\right]\\ {\mathrm{Relations}}& {:}& \left[{-}{{x}}_{{5}}{\le }{0}{,}{-}{{x}}_{{4}}{\le }{0}{,}{-}{{x}}_{{3}}{\le }{0}{,}{-}{{x}}_{{2}}{\le }{0}{,}{-}{{x}}_{{1}}{\le }{0}{,}{{x}}_{{1}}{+}{{x}}_{{2}}{+}{{x}}_{{3}}{+}{{x}}_{{4}}{+}{{x}}_{{5}}{\le }{1}\right]\end{array}$ (2)
 > $\mathrm{s5_edges}≔\mathrm{Faces}\left(\mathrm{s5},\mathrm{dimension}=1\right)$
 ${\mathrm{s5_edges}}{≔}\left[{{}\begin{array}{lll}{\mathrm{Coordinates}}& {:}& \left[{{x}}_{{1}}{,}{{x}}_{{2}}{,}{{x}}_{{3}}{,}{{x}}_{{4}}{,}{{x}}_{{5}}\right]\\ {\mathrm{Relations}}& {:}& \left[{-}{{x}}_{{5}}{\le }{0}{,}{{x}}_{{5}}{\le }{1}{,}{{x}}_{{4}}{+}{{x}}_{{5}}{=}{1}{,}{{x}}_{{3}}{=}{0}{,}{{x}}_{{2}}{=}{0}{,}{{x}}_{{1}}{=}{0}\right]\end{array}{,}{{}\begin{array}{lll}{\mathrm{Coordinates}}& {:}& \left[{{x}}_{{1}}{,}{{x}}_{{2}}{,}{{x}}_{{3}}{,}{{x}}_{{4}}{,}{{x}}_{{5}}\right]\\ {\mathrm{Relations}}& {:}& \left[{-}{{x}}_{{5}}{\le }{0}{,}{{x}}_{{5}}{\le }{1}{,}{{x}}_{{4}}{=}{0}{,}{{x}}_{{3}}{+}{{x}}_{{5}}{=}{1}{,}{{x}}_{{2}}{=}{0}{,}{{x}}_{{1}}{=}{0}\right]\end{array}{,}{{}\begin{array}{lll}{\mathrm{Coordinates}}& {:}& \left[{{x}}_{{1}}{,}{{x}}_{{2}}{,}{{x}}_{{3}}{,}{{x}}_{{4}}{,}{{x}}_{{5}}\right]\\ {\mathrm{Relations}}& {:}& \left[{{x}}_{{5}}{=}{0}{,}{-}{{x}}_{{4}}{\le }{0}{,}{{x}}_{{4}}{\le }{1}{,}{{x}}_{{3}}{+}{{x}}_{{4}}{=}{1}{,}{{x}}_{{2}}{=}{0}{,}{{x}}_{{1}}{=}{0}\right]\end{array}{,}{{}\begin{array}{lll}{\mathrm{Coordinates}}& {:}& \left[{{x}}_{{1}}{,}{{x}}_{{2}}{,}{{x}}_{{3}}{,}{{x}}_{{4}}{,}{{x}}_{{5}}\right]\\ {\mathrm{Relations}}& {:}& \left[{-}{{x}}_{{5}}{\le }{0}{,}{{x}}_{{5}}{\le }{1}{,}{{x}}_{{4}}{=}{0}{,}{{x}}_{{3}}{=}{0}{,}{{x}}_{{2}}{+}{{x}}_{{5}}{=}{1}{,}{{x}}_{{1}}{=}{0}\right]\end{array}{,}{{}\begin{array}{lll}{\mathrm{Coordinates}}& {:}& \left[{{x}}_{{1}}{,}{{x}}_{{2}}{,}{{x}}_{{3}}{,}{{x}}_{{4}}{,}{{x}}_{{5}}\right]\\ {\mathrm{Relations}}& {:}& \left[{{x}}_{{5}}{=}{0}{,}{-}{{x}}_{{4}}{\le }{0}{,}{{x}}_{{4}}{\le }{1}{,}{{x}}_{{3}}{=}{0}{,}{{x}}_{{2}}{+}{{x}}_{{4}}{=}{1}{,}{{x}}_{{1}}{=}{0}\right]\end{array}{,}{{}\begin{array}{lll}{\mathrm{Coordinates}}& {:}& \left[{{x}}_{{1}}{,}{{x}}_{{2}}{,}{{x}}_{{3}}{,}{{x}}_{{4}}{,}{{x}}_{{5}}\right]\\ {\mathrm{Relations}}& {:}& \left[{{x}}_{{5}}{=}{0}{,}{{x}}_{{4}}{=}{0}{,}{-}{{x}}_{{3}}{\le }{0}{,}{{x}}_{{3}}{\le }{1}{,}{{x}}_{{2}}{+}{{x}}_{{3}}{=}{1}{,}{{x}}_{{1}}{=}{0}\right]\end{array}{,}{{}\begin{array}{lll}{\mathrm{Coordinates}}& {:}& \left[{{x}}_{{1}}{,}{{x}}_{{2}}{,}{{x}}_{{3}}{,}{{x}}_{{4}}{,}{{x}}_{{5}}\right]\\ {\mathrm{Relations}}& {:}& \left[{-}{{x}}_{{5}}{\le }{0}{,}{{x}}_{{5}}{\le }{1}{,}{{x}}_{{4}}{=}{0}{,}{{x}}_{{3}}{=}{0}{,}{{x}}_{{2}}{=}{0}{,}{{x}}_{{1}}{+}{{x}}_{{5}}{=}{1}\right]\end{array}{,}{{}\begin{array}{lll}{\mathrm{Coordinates}}& {:}& \left[{{x}}_{{1}}{,}{{x}}_{{2}}{,}{{x}}_{{3}}{,}{{x}}_{{4}}{,}{{x}}_{{5}}\right]\\ {\mathrm{Relations}}& {:}& \left[{{x}}_{{5}}{=}{0}{,}{-}{{x}}_{{4}}{\le }{0}{,}{{x}}_{{4}}{\le }{1}{,}{{x}}_{{3}}{=}{0}{,}{{x}}_{{2}}{=}{0}{,}{{x}}_{{1}}{+}{{x}}_{{4}}{=}{1}\right]\end{array}{,}{{}\begin{array}{lll}{\mathrm{Coordinates}}& {:}& \left[{{x}}_{{1}}{,}{{x}}_{{2}}{,}{{x}}_{{3}}{,}{{x}}_{{4}}{,}{{x}}_{{5}}\right]\\ {\mathrm{Relations}}& {:}& \left[{{x}}_{{5}}{=}{0}{,}{{x}}_{{4}}{=}{0}{,}{-}{{x}}_{{3}}{\le }{0}{,}{{x}}_{{3}}{\le }{1}{,}{{x}}_{{2}}{=}{0}{,}{{x}}_{{1}}{+}{{x}}_{{3}}{=}{1}\right]\end{array}{,}{{}\begin{array}{lll}{\mathrm{Coordinates}}& {:}& \left[{{x}}_{{1}}{,}{{x}}_{{2}}{,}{{x}}_{{3}}{,}{{x}}_{{4}}{,}{{x}}_{{5}}\right]\\ {\mathrm{Relations}}& {:}& \left[{{x}}_{{5}}{=}{0}{,}{{x}}_{{4}}{=}{0}{,}{{x}}_{{3}}{=}{0}{,}{-}{{x}}_{{2}}{\le }{0}{,}{{x}}_{{2}}{\le }{1}{,}{{x}}_{{1}}{+}{{x}}_{{2}}{=}{1}\right]\end{array}{,}{{}\begin{array}{lll}{\mathrm{Coordinates}}& {:}& \left[{{x}}_{{1}}{,}{{x}}_{{2}}{,}{{x}}_{{3}}{,}{{x}}_{{4}}{,}{{x}}_{{5}}\right]\\ {\mathrm{Relations}}& {:}& \left[{-}{{x}}_{{5}}{\le }{0}{,}{{x}}_{{5}}{\le }{1}{,}{{x}}_{{4}}{=}{0}{,}{{x}}_{{3}}{=}{0}{,}{{x}}_{{2}}{=}{0}{,}{{x}}_{{1}}{=}{0}\right]\end{array}{,}{{}\begin{array}{lll}{\mathrm{Coordinates}}& {:}& \left[{{x}}_{{1}}{,}{{x}}_{{2}}{,}{{x}}_{{3}}{,}{{x}}_{{4}}{,}{{x}}_{{5}}\right]\\ {\mathrm{Relations}}& {:}& \left[{{x}}_{{5}}{=}{0}{,}{-}{{x}}_{{4}}{\le }{0}{,}{{x}}_{{4}}{\le }{1}{,}{{x}}_{{3}}{=}{0}{,}{{x}}_{{2}}{=}{0}{,}{{x}}_{{1}}{=}{0}\right]\end{array}{,}{{}\begin{array}{lll}{\mathrm{Coordinates}}& {:}& \left[{{x}}_{{1}}{,}{{x}}_{{2}}{,}{{x}}_{{3}}{,}{{x}}_{{4}}{,}{{x}}_{{5}}\right]\\ {\mathrm{Relations}}& {:}& \left[{{x}}_{{5}}{=}{0}{,}{{x}}_{{4}}{=}{0}{,}{-}{{x}}_{{3}}{\le }{0}{,}{{x}}_{{3}}{\le }{1}{,}{{x}}_{{2}}{=}{0}{,}{{x}}_{{1}}{=}{0}\right]\end{array}{,}{{}\begin{array}{lll}{\mathrm{Coordinates}}& {:}& \left[{{x}}_{{1}}{,}{{x}}_{{2}}{,}{{x}}_{{3}}{,}{{x}}_{{4}}{,}{{x}}_{{5}}\right]\\ {\mathrm{Relations}}& {:}& \left[{{x}}_{{5}}{=}{0}{,}{{x}}_{{4}}{=}{0}{,}{{x}}_{{3}}{=}{0}{,}{-}{{x}}_{{2}}{\le }{0}{,}{{x}}_{{2}}{\le }{1}{,}{{x}}_{{1}}{=}{0}\right]\end{array}{,}{{}\begin{array}{lll}{\mathrm{Coordinates}}& {:}& \left[{{x}}_{{1}}{,}{{x}}_{{2}}{,}{{x}}_{{3}}{,}{{x}}_{{4}}{,}{{x}}_{{5}}\right]\\ {\mathrm{Relations}}& {:}& \left[{{x}}_{{5}}{=}{0}{,}{{x}}_{{4}}{=}{0}{,}{{x}}_{{3}}{=}{0}{,}{{x}}_{{2}}{=}{0}{,}{-}{{x}}_{{1}}{\le }{0}{,}{{x}}_{{1}}{\le }{1}\right]\end{array}\right]$ (3)

ID numbers are used to identify the faces of a given set, but different unrelated sets may have the same ID number.

 > $\mathrm{p1}≔\mathrm{PolyhedralSet}\left(\left[3\le x,10\le y+x,x\le 10\right],\left[x,y,z\right]\right);$$\mathrm{p2}≔\mathrm{PolyhedralSet}\left(\left[y\le 5,3\le y+x,x\le 7\right],\left[x,y,z\right]\right);$$\mathrm{ID}\left(\mathrm{p1}\right);$$\mathrm{ID}\left(\mathrm{p2}\right)$
 ${\mathrm{p1}}{≔}{{}\begin{array}{lll}{\mathrm{Coordinates}}& {:}& \left[{x}{,}{y}{,}{z}\right]\\ {\mathrm{Relations}}& {:}& \left[{-}{y}{-}{x}{\le }{-10}{,}{-}{x}{\le }{-3}{,}{x}{\le }{10}\right]\end{array}$
 ${\mathrm{p2}}{≔}{{}\begin{array}{lll}{\mathrm{Coordinates}}& {:}& \left[{x}{,}{y}{,}{z}\right]\\ {\mathrm{Relations}}& {:}& \left[{y}{\le }{5}{,}{-}{y}{-}{x}{\le }{-3}{,}{x}{\le }{7}\right]\end{array}$
 ${26}$
 ${26}$ (4)

The faces of a set form a universe, within which the ID numbers uniquely identify members of the graph of the set.

 > $\mathrm{map}\left(\mathrm{ID},\mathrm{Faces}\left(\mathrm{p1}\right)\right)$
 $\left[{5}{,}{11}{,}{25}\right]$ (5)
 > $\mathrm{map}\left(\mathrm{ID},\mathrm{Faces}\left(\mathrm{p2}\right)\right)$
 $\left[{17}{,}{23}{,}{25}\right]$ (6)

Compatibility

 • The PolyhedralSets[Faces] and PolyhedralSets[ID] commands were introduced in Maple 2015.
 • For more information on Maple 2015 changes, see Updates in Maple 2015.

 See Also