spitcenter: Center determination for hexahedrons

Description Usage Arguments Value See Also Examples

Description

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.

Usage

1

Arguments

hex

dataframe with three columns and eight rows to define a hexahedron by its corner point coordinates x, y and z

Value

vector with the spatial coordinates of the center point of the input hexahedron

See Also

Other centerdetfuncs: spitcenternatlist, spitcenternat

Examples

 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
#)

recexcavAAR documentation built on May 1, 2019, 6:48 p.m.