makeHexahedron | R Documentation |
Make a hexahedron for usage in
runif_in_hexahedron
and other functions.
makeHexahedron(p0, p1, p2, p3, p4, p5, p6, p7)
p0, p1, p2, p3, p4, p5, p6, p7 |
the eight vertices of the hexahedron, as in the figure shown below |
A hexahedron is a polyhedron having six quad faces. Its eight vertices must be placed as in the figure below.
A matrix with eight columns, the vertices.
The function plotHexahedron
is useful to check the
hexahedron.
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.