R/trasf.mesh.R

Defines functions trasf.mesh

Documented in trasf.mesh

#' trasf.mesh
#'
#' This function centers a mesh on the barycenter coordinates
#' @param mesh a 3D mesh of class "mesh3d"
#' @param barycenter numeric: coordinates of the center
#' @return mesh a 3D mesh of class "mesh3d"
#' @author Antonio Profico, Costantino Buzi, Marina Melchionna, Paolo Piras, Pasquale Raia, Alessio Veneziano
#' @export

trasf.mesh=function(mesh,barycenter){
mesh$vb[1,]=mesh$vb[1,]+(barycenter[1])
mesh$vb[2,]=mesh$vb[2,]+(barycenter[2])
mesh$vb[3,]=mesh$vb[3,]+(barycenter[3])  
return(mesh)  
}

Try the Arothron package in your browser

Any scripts or data that you put into this service are public.

Arothron documentation built on Feb. 16, 2023, 5:17 p.m.