merge

Purpose

Greedy merging of polyhedra

Syntax

U.merge
merge(U)

Description

Simplifies the union of polyhedra by merging the neighboring polyhedra if their union is convex. The algorithm cycles through the regions and checks if any two regions form a convex union. If so, the algorithm combines them in one region, and continues checking the remaining regions. To improve the solution, multiple merging loops can be enabled in options.

Input Arguments

U

Union of polyhedra in the same dimension.

Class: PolyUnion

Example(s)

Example 1

Create a random V-polyhedron that contains the origin.
P = 5*ExamplePoly.randVrep;
 Triangulate the polyhedron 
 T = P.triangulate; 
 Plot the triangular regions 
 T.plot 

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

Create the union of polyhedra by specifying some properties.
 U = PolyUnion('Set',T,'convex',true,'overlaps',false,'fulldim',true,'bounded',true) 
PolyUnion in the dimension 2 with 3 polyhedra.
Properties of the union: 
  Convex: 1
  Overlaps: 0
  Connected: 1
  Bounded: 1
  FullDim: 1
Functions : none
Merge the polyhedra back.
 U.merge 
PolyUnion in the dimension 2 with 1 polyhedra.
Properties of the union: 
  Convex: 1
  Overlaps: 0
  Connected: 1
  Bounded: 1
  FullDim: 1
Functions : none
Plot the merged union
 U.plot 

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

See Also

reduce


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

© 2003-2013 Michal Kvasnica: STU Bratislava, michal.kvasnica@stuba.sk

© 2005 Frank J. Christophersen: ETH Zurich , fjc@control.ee.ethz.ch

© 2005 Tobias Geyer: ETH Zurich , geyer@control.ee.ethz.ch