library(uniformly)
# a non-convex hexahedron
hexahedron <- makeHexahedron(
p0 = c(1.5, 1.5, 0),
p1 = c(2, 0, 0),
p2 = c(2, 2, 0),
p3 = c(0, 2, 0),
p4 = c(0, 2, 2),
p5 = c(0, 0, 2),
p6 = c(2, 0, 2),
p7 = c(2, 2, 2)
)
plotHexahedron(hexahedron)
Run the code above in your browser using DataLab