copy

Purpose

Create a new copy of the PolyUnion object.

Syntax

Un = U.copy
Un = copy(U)

Description

Create a new copy of the PolyUnion object. Any change of data in the new object Un will not affect the data contained in U object.

Input Arguments

U

Union of polyhedra in the same dimension.

Class: PolyUnion

Example(s)

Example 1

Create union of two polyhedra ../../../../../../fig/mpt/modules/geometry/unions/@PolyUnion/copy1.png.
P(1) = 5*ExamplePoly.randVrep;

P(2) = -P(1);
Create the union of polyhedra by specifying some properties.
 U = PolyUnion('Set',P,'convex',false,'overlaps',true); 
 Create the copy of the union U 
      
 Un = U.copy; 
 We can do some operations on the new object Un, without affecting the data stored in the old objectU.
            For instance, querying for full-dimensionality:
        
 Un.isFullDim 
ans =

     1

The old object was not affected by this query
 U 
PolyUnion in the dimension 2 with 2 polyhedra.
Properties of the union: 
  Convex: 0
  Overlaps: 1
Functions : none
Whereas in the new object was the property "FullDim" has been changed.
 Un 
PolyUnion in the dimension 2 with 2 polyhedra.
Properties of the union: 
  Convex: 0
  Overlaps: 1
  FullDim: 1
Functions : none

See Also

polyunion


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