in - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Mozilla Firefox.

Online Help

All Products    Maple    MapleSim


PolyhedralSets

  

`intersect`

  

polyhedral intersection operator

  

`subset`

  

polyhedral subset operator

  

`in`

  

polyhedral membership operator

 

Calling Sequence

Parameters

Description

Examples

Compatibility

Calling Sequence

s1 intersect s2

s1∩s2

`intersect`(s1, s2, s3, ...)

s1 subset s2

s1⊆s2

`subset`(s1,s2)

s1 in s2

s1∈s2

`in`(s1,s2)

pnt in s1

pnt∈s1

`in`(pnt,s1)

Parameters

s1, s2, s3, ...

-

polyhedral sets

pnt

-

point specified as list of rationals, or list or set of equations of the form coordinate = rational

Description

• 

The PolyhedralSets package provides definitions for the intersect, subset and in set operators.  The intersection operators returns a new polyhedral set, while the subset and in operators return either true or false.

• 

The definition of the set operators can be loaded using with(PolyhedralSets).

Examples

> 

with⁡PolyhedralSets:

Intersection

• 

Four of the corners of a cube can be cut off by taking its intersection with a tetrahedron

> 

tetra≔PolyhedralSet⁡2⁢1,1,1,1,−1,−1,−1,1,−1,−1,−1,1,x,y,z:cube≔ExampleSets:-Cube⁡x,y,z:t_c_intersect≔tetraintersectcube

t_c_intersect≔{Coordinates:x,y,zRelations:−z≤1,z≤1,−y≤1,y≤1,−y−z−x≤2,−x≤1,y+z−x≤2,x−y+z≤2,x≤1,x+y−z≤2

(1)
> 

Plot⁡t_c_intersect

Subset

• 

Construct a tetrahedron and a cube

> 

tetra≔ExampleSets:-Tetrahedron⁡

tetra≔{Coordinates:x1,x2,x3Relations:−x1−x2−x3≤1,−x1+x2+x3≤1,x1−x2+x3≤1,x1+x2−x3≤1

(2)
> 

cube≔ExampleSets:-Cube⁡

cube≔{Coordinates:x1,x2,x3Relations:−x3≤1,x3≤1,−x2≤1,x2≤1,−x1≤1,x1≤1

(3)
• 

The tetrahedron tetra is a subset of the cube cube

> 

tetrasubsetcube

true

(4)
• 

But cube isn't a subset of tetra

> 

cubesubsettetra

false

(5)

In

• 

Any point in a set will return true when tested with in

> 

c≔ExampleSets:-Cube⁡

c≔{Coordinates:x1,x2,x3Relations:−x3≤1,x3≤1,−x2≤1,x2≤1,−x1≤1,x1≤1

(6)
> 

0,0,0inc

true

(7)
• 

To find the face on which the point resides, see PolyhedralSets[LocatePoint]

Compatibility

• 

The PolyhedralSets[`intersect`], PolyhedralSets[`subset`] and PolyhedralSets[`in`] commands were introduced in Maple 2015.

• 

For more information on Maple 2015 changes, see Updates in Maple 2015.

See Also

PolyhedralSets[LocatePoint]

PolyhedralSets[IsInInterior]

PolyhedralSets[ConvexHull]

PolyhedralSets[Equal]

PolyhedralSets[IsFace]

PolyhedralSets[PolyhedralSet]

PolyhedralSets