pervertexdata.smoothnn | R Documentation |
Smooth per-vertex data based on mesh.
pervertexdata.smoothnn(surface, pvdata, num_iter, k = 1L, method = "C++")
surface |
a mesh, represented as an |
pvdata |
numerical vector of per-vertex-data for the mesh, one value per vertex. Data values of |
num_iter |
positive integer, number of smoothing iterations. |
k |
scalar positive integer, the k value for the k-ring neighborhood. For k=1, this function computes the adjacency list representation of the graph (where the neighbors include the vertex itself). |
method |
character string, one of 'C++' or 'R'. The C++ version is much faster (about 30 times faster on our test machine), and there is little reason to ever use the R version in production code, so just ignore this. |
numerical vector, the smoothed data.
pervertexdata.smoothnn.adj
if you already have pre-computed adjacency data for the mesh. Using that data can increase performance considerably, especially if you need to smooth many data sets.
## Not run: mesh = rgl::tetrahedron3d(); pvd = rnorm(nrow(mes2$vb), mean = 5.0, sd = 1.0); pvd_smoothed = pervertexdata.smoothnn(mesh, pvd, num_iter = 30L); ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.