Learn R Programming

tessellation (version 2.3.0)

cellVolume: Volume of a bounded Voronoï cell

Description

For a bounded 2D Voronoï cell, returns the area of the cell, and for a bounded 3D Voronoï cell, returns the volume of the cell and its surface area.

Usage

cellVolume(cell)

Value

A number, the area/volume of the cell, and in the 3D case, the surface area of the cell is attached to this number as an attribute.

Arguments

cell

a bounded 2D or 3D Voronoï cell

Examples

Run this code
library(tessellation)
d <- delaunay(centricCuboctahedron())
v <- voronoi(d)
cell13 <- v[[13]]
isBoundedCell(cell13) # TRUE
cellVolume(cell13)

Run the code above in your browser using DataLab