plotBoundedCell3D | R Documentation |
Plot a bounded Voronoï 3D cell with rgl.
plotBoundedCell3D(
cell,
edgesAsTubes = FALSE,
tubeRadius,
tubeColor,
facetsColor = NA,
alpha = 1,
check.bounded = TRUE
)
cell |
a bounded Voronoï 3D cell |
edgesAsTubes |
Boolean, whether to plot edges as tubes or as lines |
tubeRadius |
radius of the tubes if |
tubeColor |
color of the tubes if |
facetsColor |
color of the facets; |
alpha |
opacity of the facets, a number between 0 and 1 |
check.bounded |
Boolean, whether to check that the cell is bounded;
set to |
No value, this function just plots the cell.
library(tessellation)
d <- delaunay(centricCuboctahedron())
v <- voronoi(d)
cell13 <- v[[13]]
isBoundedCell(cell13) # TRUE
library(rgl)
open3d(windowRect = c(50, 50, 562, 562))
plotBoundedCell3D(
cell13, edgesAsTubes = TRUE, tubeRadius = 0.03, tubeColor = "yellow",
facetsColor = "navy", alpha = 0.7
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.