Description Usage Arguments Value See Also Examples
A hexahedron is a three dimensional shape that is defined by 6 faces and 8 corner points.
spitcenter
determines a center point for an input hexahedron by calculating the mean
of the maximal extent on all three axis.
1 | spitcenter(hex)
|
hex |
dataframe with three columns and eight rows to define a hexahedron by its corner point coordinates x, y and z |
vector with the spatial coordinates of the center point of the input hexahedron
Other centerdetfuncs: spitcenternatlist
,
spitcenternat
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | hexatestdf <- data.frame(
x = c(0,1,0,4,5,5,5,5),
y = c(1,1,4,4,1,1,4,4),
z = c(4,8,4,9,4,8,4,6)
)
center <- spitcenter(hexatestdf)
#library(rgl)
#plot3d(
# hexatestdf$x, hexatestdf$y, hexatestdf$z,
# type = "p",
# xlab = "x", ylab = "y", zlab = "z"
#)
#plot3d(
# center[1], center[2], center[3],
# type = "p",
# col = "red",
# add = TRUE
#)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.