Learn R Programming

DGVM3D (version 1.0.0)

getHexagon: Calculate a 3D hexagon

Description

Calculate a 3D hexagon

Usage

getHexagon(area = NA, outer.radius = NA, inner.radius = NA, z = c(0, 1))

Arguments

area

the area of the hexagon

outer.radius

the outer radius of the hexagon

inner.radius

the inner radius of the hexagon

z

the height of the hexagon as 2 element vector

Value

a TriangBody-class

Examples

Run this code
# NOT RUN {
if (require(rgl)) {
  hexagon <- getHexagon(area=dgvm3d.options("patch.area"), z=c(0, -2))
  triangles3d(hexagon@vertices[hexagon@id, ], col="brown")
} else {
  message("the library 'rgl' is required for this example!")
}
# }

Run the code above in your browser using DataLab