vcg_subdivision | R Documentation |
Up-sample a triangular mesh by adding a vertex at each edge or face center.
vcg_subdivision(mesh, method = c("edge", "barycenter"))
mesh |
triangular mesh stored as object of class 'mesh3d'. |
method |
either |
An object of class "mesh3d"
mesh <- plane_geometry()
# default
mesh_edge <- vcg_subdivision(mesh, "edge")
# barycenter
mesh_face <- vcg_subdivision(mesh, "barycenter")
if(is_not_cran()) {
rgl_view({
rgl_call("wire3d", mesh, col = 1)
rgl_call("wire3d", mesh_edge, col = 2)
rgl_call("wire3d", mesh_face, col = 3)
})
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.