PolyhedralSets[ExampleSets][NDimensions]
examples of n-dimensional polyhedral sets
Hyperoctant
create an n-dimensional polyhedral set from an octant
RandomSolid
create a random, bounded polyhedral set
RandomSet
create a random polyhedral set
Calling Sequence
Parameters
Description
Compatibility
Examples
SetName(n, varname)
SetName(coords)
Hyperoctant(n, varname)
Hyperoctant(oct)
Hyperoctant(oct, varname)
Hyperoctant(oct, optcoords)
RandomSolid(nv, n, varname)
RandomSolid(nv, optcoords)
RandomSet(nf, n, varname)
RandomSet(nf, optcoords)
SetName
-
procedure name; one of Simplex, Hypercube, UniversalSet, or EmptySet
n
integer; number of dimensions
coords
list of names; the set's coordinates
optcoords
(optional) list of names; the set's coordinates
varname
(optional) name; variable name to use in forming the coordinates, default is x
oct
list of integers; list of +1's and -1's defining the hyperoctant
nf
integer; number of faces
nv
integer; number of vertices
The calling sequence SetName(n) where SetName is one of Simplex, Hypercube, UniversalSet or EmptySet creates an n-dimensional polyhedral set with the default coordinate names. Alternatively, SetName(n, varname) can be used to create sets whose coordinates are [varname__1,varname__2⋯varname__n] or the coordinates can be specified explicitly using SetName(coords).
Simplex is the n-dimensional rectangular simplex that has n+1 facets. Its vertices are formed of the unit vectors and the origin.
Hypercube is the n-dimensional hypercube that spans −1..1 in each dimension.
The UniversalSet contains every point in n-dimensional space, while the EmptySet contains no points.
Hyperoctant, RandomSolid and RandomSet accept additional parameters. The hyperoctant can be specified using oct, a vector of n positive and/or negative ones. The ith entry in oct selects whether the positive or negative half-space of the ith coordinate is used to form the hyperoctant. The default is all positive ones, which corresponds to quadrant I in two dimensions and octant I in three dimensions.
RandomSolid generates a bounded polyhedral set with nv vertices by choosing random points near the surface of the n-sphere. If the set's coordinates are not specified using RandomSolid(nv, optcoords), then the dimension of the space must be given with the call sequence RandomSolid(nv, n). The number of vertices nv must be greater than the dimension of the space in order to generate a solid.
RandomSet generates a polyhedral set with nf faces. The resultant figure may be bounded or unbounded, whereas RandomSolid always returns a bounded set. As with RandomSolid, either the dimension of the space must be given using RandomSet(nf, n) or the coordinates must be given using RandomSet(nf, optcoords).
The Simplex, Hypercube, UniversalSet, and EmptySet commands were introduced in Maple 2015.
The Hyperoctant, RandomSolid, and RandomSet commands were introduced in Maple 2015.
For more information on Maple 2015 changes, see Updates in Maple 2015.
with⁡PolyhedralSets:
with⁡ExampleSets
Cube,Cuboctahedron,EmptySet,Hypercube,Hyperoctant,Octahedron,RandomSet,RandomSolid,Simplex,Tetrahedron,TruncatedOctahedron,TruncatedTetrahedron,UniversalSet
The hypercube in 2-D is a square and a cube in 3-D.
c2d≔Hypercube⁡2;Plot⁡c2d
c2d≔{Coordinates:x1,x2Relations:−x2≤1,x2≤1,−x1≤1,x1≤1
c3d≔Hypercube⁡x,y,z;Plot⁡c3d
c3d≔{Coordinates:x,y,zRelations:−z≤1,z≤1,−y≤1,y≤1,−x≤1,x≤1
Higher dimensional cubes can be created, but only those set in two or three dimensions can be plotted.
c9d≔Hypercube⁡9
c9d≔{Coordinates:x1,x2,x3,x4,x5,x6,x7,x8,x9Relations:−x9≤1,x9≤1,−x8≤1,x8≤1,−x7≤1,x7≤1,−x6≤1,x6≤1,−x5≤1,x5≤1, and 8 more constraints
The simplex in 2-D is a right angled triangle, while in 3-D it is a trirectangular tetrahedron.
Plot⁡Simplex⁡2
Plot⁡Simplex⁡3
The universal set is the whole of the ambient space, while the empty set contains no points.
Plot⁡UniversalSet⁡3
Plot⁡EmptySet⁡3
RandomSolid always generates a bounded set. Here is a set with 5 vertices in 3-D:
rs1≔RandomSolid⁡5,3;Plot⁡rs1
rs1≔{Coordinates:x1,x2,x3Relations:−x1+426509332⁢x2461037817+8386806574⁢x36915567255≤−28003359640307345778362750000,−x1+32936243⁢x212746351−125966986⁢x363731755≤50113071934891593293875000,−x1+224815423⁢x254353009−1232092194⁢x3271765045≤200732482093233397063062500,x1−128188828⁢x219317675+15716882⁢x37429875≤−82008203163711609806250000,x1−188443593⁢x262042999+7217249⁢x362042999≤−28730615430271551074975000,x1+113924267⁢x275029215−267572861⁢x3225087645≤566378402797281359556250
RandomSet can generate sets that are bounded or unbounded. If less than n+1 faces are requested, the set will be unbounded, like this set with 5 faces in 6 dimensions.
rs2≔RandomSet⁡5,6
rs2≔{Coordinates:x1,x2,x3,x4,x5,x6Relations:−x1−186001⁢x2195420+8783⁢x36514+110119⁢x432570−182461⁢x565140+348733⁢x6195420≤500009771,−x1+94447⁢x2369124+198525⁢x3738248−86981⁢x4105464−114269⁢x5922810−143431⁢x63691240≤12500092281,−x1+209207⁢x2645435+21607⁢x3717150−207986⁢x4215145+9772⁢x518441−181553⁢x6645435≤200000129087,−x1+225236⁢x2442655−28740⁢x388531−352372⁢x4442655−548553⁢x5442655+554618⁢x6442655≤20000088531,x1−230877⁢x2273407+699102⁢x3273407−455608⁢x4273407−412465⁢x5273407+741463⁢x62734070≤1000000273407
IsBounded⁡rs2
false
See Also
Example Three-Dimensional Polyhedral Sets
PolyhedralSets[PolyhedralSet]
PolyhedralSets
Download Help Document