Description Usage Arguments Details Value Author(s) See Also Examples

This function takes a description of a flat polygon in x, y and z coordinates, and draws it in three dimensions.

1 2 |

`x, y, z` |
Vertices of the polygon in a form accepted by |

`fill` |
logical; should the polygon be filled? |

`plot` |
logical; should the polygon be displayed? |

`coords` |
Which two coordinates ( |

`random` |
Should a random triangulation be used? |

`...` |
Other parameters to pass to |

The function triangulates the two dimensional polygon described by `coords`

, then
applies the triangulation to all three coordinates. No check is made that the polygon
is actually all in one plane, but the results may be somewhat unpredictable
(especially if `random = TRUE`

) if it is not.

Polygons need not be simple; use `NA`

to indicate separate closed pieces. For
`fill = FALSE`

there are no other restrictions on the pieces, but for
`fill = TRUE`

the resulting two-dimensional polygon needs to be one that
`triangulate`

can handle.

If `plot = TRUE`

, the id number of the lines (for `fill = FALSE`

) or triangles
(for `fill = TRUE`

) that have been plotted.

If `plot = FALSE`

, then for `fill = FALSE`

, a vector of indices into
the XYZ matrix that could be used to draw the polygon. For `fill = TRUE`

,
a triangular mesh object representing the triangulation.

Duncan Murdoch

`extrude3d`

for a solid extrusion of a polygon, `triangulate`

for
the triangulation.

1 2 3 4 5 6 7 8 9 |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.