convexHull

Purpose

Computes the convex hull for union of polyhedra

Syntax

H = U.convexHull
H = convexHull(U)

Description

The convex hull of the union of polyhedra is defined as the minimal convex set that contains all polyhedra. Note that computation of convex hull is an expensive operation, therefore the result is stored internally under Internal.convexHull which can be accessed.

Input Arguments

U

Union of polyhedra in the same dimension.

Class: PolyUnion

Output Arguments

H

Convex hull of the polyhedra contained in the union

Class: Polyhedron

Example(s)

Example 1

Create 2 random V-polyhedra.
P(1) = 5*ExamplePoly.randVrep;

P(2) = 5*ExamplePoly.randVrep;
 Create the union of polyhedra without specifying any properties.
 U = PolyUnion('Set',P) 
PolyUnion in the dimension 2 with 2 polyhedra.
Functions : none
Compute the convex hull
 H = U.convexHull 
Polyhedron in R^2 with representations:
    H-rep (irredundant) : Inequalities   6 | Equalities   0
    V-rep (irredundant) : Vertices   6 | Rays   0
Functions : none
Plot the union and the convex hull
 U.plot; hold on; H.plot('wire',true,'linewidth',3,'linestyle','--') 

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

See Also

isconvex, merge, reduce


© 2010-2013 Colin Neil Jones: EPF Lausanne, colin.jones@epfl.ch

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