R/centroid_location.R

Defines functions centroid_location

Documented in centroid_location

#' Calculate centroid location
#'
#' @param fname String: Path to stl file
#'
#' @return Numeric vector of centroid location
#' @export
#'
centroid_location <- function(fname) {
  st <- read_stl(fname)
  centroid <- colMeans(st)
  return(centroid)
}
kmiddleton/MuscleTernary documentation built on April 23, 2024, 7:49 a.m.