Note: This page has been translated by MathWorks. Click here to see

To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

Union of `polyshape`

objects

`polyout = union(poly1,poly2)`

`polyout = union(polyvec)`

`[polyout,shapeID,vertexID] = union(poly1,poly2)`

`[polyout,shapeID,vertexID] = union(polyvec)`

`___ = union(___,'KeepCollinearPoints',TF)`

`[`

also returns vertex mapping information from the vertices in
`polyout`

,`shapeID`

,`vertexID`

] = union(`poly1`

,`poly2`

)`polyout`

to the vertices in `poly1`

and
`poly2`

. The `union`

function only supports
this syntax when `poly1`

and `poly2`

are scalar
`polyshape`

objects.

The `shapeID`

elements identify whether the corresponding vertex
in `polyout`

originated in `poly1`

,
`poly2`

, or was created from the union.
`vertexID`

maps the vertices of `polyout`

to
the vertices of `poly1`

, `poly2`

, or the
union.

`___ = union(___,'KeepCollinearPoints',`

specifies whether to keep or remove collinear points in `TF`

)`polyout`

for any of the previous syntaxes.