tri2verts {RRmorph} | R Documentation |
Triangles to vertices
Description
The function transfers values associated to triangles of a
mesh3d
object to its vertices.
Usage
tri2verts(mesh,values)
Arguments
mesh |
a |
values |
a vector of continuous values associated to individual triangles
of the |
Value
A vector of continuous values associated to individual vertices of
the mesh
.
Author(s)
Marina Melchionna, Silvia Castiglione
Examples
da<-"https://github.com/pasraia/RRmorph_example_data/raw/refs/heads/main/RRmorphdata.rda"
download.file(url=da,destfile = paste0(tempdir(),"/RRmorphdata.rda"))
load(paste0(tempdir(),"/RRmorphdata.rda"))
require(Morpho)
require(Rvcg)
pca<-procSym(endo.set)
ldm<-endo.set[,,"Homo_sapiens"]
sur<-endo.sur[["Homo_sapiens"]]
rec<- vcgBallPivoting(pca$mshape, radius = 0)
rec$vb[1:3,]<-t(ldm)
val<-rnorm(ncol(rec$vb))
vertval<-tri2verts(rec,val)
[Package RRmorph version 0.0.1 Index]