colorTrans | R Documentation |
colorTrans transfers the vertex color of mesh2 onto mesh1 by interpolating vertex colors of closest face.
colorTrans(mesh1, mesh2, tol = 1)
mesh1 |
triangular mesh of class "mesh3d". |
mesh2 |
triangular mesh of class "mesh3d". |
tol |
maximal distance of closest point included in color transfer. |
returns the mesh1 with transfered vertex colors.
Stefan Schlager
require(Morpho)
data(nose)
redmesh <- shortnose.mesh
#color mesh red
redmesh$material$color <- matrix("#FF0000",dim(shortnose.mesh$it))
# mesh without colors
nocolmesh <- shortnose.mesh
mixmesh <- colorTrans(nocolmesh, redmesh)
## Not run:
require(rgl)
shade3d(mixmesh)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.