isOverlapping

Purpose

Test if the union of polyhedra contains overlaps.

Syntax

ts = U.isConnected
ts = isConnected(U)

Description

Return true if the union U of polyhedra contains overlaps and false otherwise. Once this method has been called, the information about the overlaps can be retrieved from U.Internal.Overlaps property. This function considers following two cases to detect overlaps:
  1. If two full-dimensional polyhedra overlap, then the intersection of these polyhedra must be full-dimensional.
  2. If low-dimensional and full-dimensional polyhedra overlap, then the intersection of these polyhedra must not be empty.
Note that this function is computationally demanding and is suitable for unions with small number of polyhedra.

Input Arguments

U

Union of polyhedra in the same dimension.

Class: PolyUnion

Output Arguments

ts

True if union of polyhedra has overlaps and false otherwise.

Class: logical

Allowed values:

  • true
  • false

Example(s)

Example 1

Create three full-dimensional polyhedra that overlap.
P(1) = ExamplePoly.randHrep;

P(2) = ExamplePoly.randHrep;

P(3) = ExamplePoly.randHrep;
 Create union out of these polyhedra without specifying the properties
 U = PolyUnion(P) 
PolyUnion in the dimension 2 with 3 polyhedra.
Functions : none
Plot the polyhedra to see that they overlap.
 P.plot; 

../../../../../../fig/mpt/modules/geometry/unions/@PolyUnion/isoverlapping_img_1.png

Check if the union is overlapping
 U.isOverlapping
ans =

     1

The information about the overlaps can be accessed in
 U.Internal.Overlaps 
ans =

     1

Example 2

Full-dimensional and low-dimensional polyhedra that overlap. Generate affine set in dimension 3.
 A = Polyhedron('Ae',[1 -0.5 2; -1 -4 0],'be',[-1;0.8]); 
 Generate box in 3D 
 B = Polyhedron('lb',[-1;-1;-1],'ub',[1;1;1]); 
 Create union out of these polyhedra 
 U = PolyUnion([A,B]); 
 Plot to see the sets if they overlap 
 U.plot('LineWidth',2,'alpha',0.1) 

../../../../../../fig/mpt/modules/geometry/unions/@PolyUnion/isoverlapping_img_2.png

Check if the union is overlapping
 U.isOverlapping 
ans =

     1

The result of the operation is stored under
 U.Internal.Overlaps 
ans =

     1

See Also

isconvex, isconnected, isfulldim, isbounded


© 2010-2013 Martin Herceg: ETH Zurich, herceg@control.ee.ethz.ch