PolyhedralSets[ExampleSets][NDimensions] - Maple Programming Help

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : Mathematics : Geometry : Polyhedral Sets : Creating Polyhedral Sets : Example Sets : PolyhedralSets/ExampleSets/NDimensions

PolyhedralSets[ExampleSets][NDimensions]

Example 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

Calling Sequence

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)

Parameters

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

Description

• 

The calling sequence SetName(n) where SetName is one of Simplex, Hypercube, UniversalSet or EmptySet create an n-dimensional polyhedral set with the default coordinate names.  Alternatively, SetName(n, varname) can be used to create sets whose coordinates are [varname1,varname2varnamen] or the coordinates can be specified explicitly using SetName(coords).

• 

Simplex is the n-dimensional rectangular simplex that will have 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 will always return 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).

Compatibility

• 

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.

Examples

withPolyhedralSets:

withExampleSets

Cube,Cuboctahedron,EmptySet,Hypercube,Hyperoctant,Octahedron,RandomSet,RandomSolid,Simplex,Tetrahedron,TruncatedOctahedron,TruncatedTetrahedron,UniversalSet

(1)

The hypercube in 2-D is a square and a cube in 3-D.

c2dHypercube2;Plotc2d

c2d{Coordinates:x1,x2Relations:x21,x21,x11,x11

c3dHypercubex,y,z;Plotc3d

c3d{Coordinates:x,y,zRelations:z1,z1,y1,y1,x1,x1

Higher dimensional cubes can be created, but only set in two or three dimensions can be plotted.

c9dHypercube9

c9d{Coordinates:x1,x2,x3,x4,x5,x6,x7,x8,x9Relations:x91,x91,x81,x81,x71,x71,x61,x61,x51,x51, and 8 more constraints

(2)

The simplex in 2-D is a right angled triangle, while in 3D it is a trirectangular tetrahedron.

PlotSimplex2

PlotSimplex3

The universal set is the whole of the ambient space, while the empty set contains no points

PlotUniversalSet3

PlotEmptySet3

RandomSolid will always generate a bounded set. Here is a set with 5 vertices in 3-D:

rs1RandomSolid5,3;Plotrs1

rs1{Coordinates:x1,x2,x3Relations:x1+426509332x2461037817+8386806574x3691556725528003359640307345778362750000,x1+32936243x212746351125966986x36373175550113071934891593293875000,x1+224815423x2543530091232092194x3271765045200732482093233397063062500,x1128188828x219317675+15716882x3742987582008203163711609806250000,x1188443593x262042999+7217249x36204299928730615430271551074975000,x1+113924267x275029215267572861x3225087645566378402797281359556250

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.

rs2RandomSet5,6

rs2{Coordinates:x1,x2,x3,x4,x5,x6Relations:x1186001x2195420+8783x36514+110119x432570182461x565140+348733x6195420500009771,x1+94447x2369124+198525x373824886981x4105464114269x5922810143431x6369124012500092281,x1+209207x2645435+21607x3717150207986x4215145+9772x518441181553x6645435200000129087,x1+225236x244265528740x388531352372x4442655548553x5442655+554618x644265520000088531,x1230877x2273407+699102x3273407455608x4273407412465x5273407+741463x627340701000000273407

(3)

IsBoundedrs2

false

(4)

See Also

Example Three Dimensional Polyhedral Sets

PolyhedralSets[PolyhedralSet]

PolyhedralSets

 


Download Help Document

Was this information helpful?



Please add your Comment (Optional)
E-mail Address (Optional)
What is ? This question helps us to combat spam