rotmesh.onto | R Documentation |
rotates and reflects a mesh onto by calculating the transformation from two sets of referenced landmarks.
rotmesh.onto(
mesh,
refmat,
tarmat,
adnormals = FALSE,
scale = FALSE,
reflection = FALSE,
...
)
mesh |
object of class mesh3d. |
refmat |
k x m matrix with landmarks on the mesh |
tarmat |
k x m matrix as target configuration |
adnormals |
logical - if TRUE, vertex normals will be recomputed after
rotation. If |
scale |
logical: if TRUE the mesh will be scaled according to the size of the target. |
reflection |
logical: allow reflection. |
... |
additional parameters passed on to |
mesh |
rotated mesh |
yrot |
rotated refmat |
trafo |
4x4 transformation matrix |
Stefan Schlager
file2mesh
,tps3d
,rotonto
,mesh2ply
require(rgl)
data(boneData)
## rotate, translate and scale the mesh belonging to the first specimen
## onto the landmark configuration of the 10th specimen
rotmesh <- rotmesh.onto(skull_0144_ch_fe.mesh,boneLM[,,1],
boneLM[,,10], scale=TRUE)
## Not run:
## render rotated mesh and landmarks
shade3d(rotmesh$mesh, col=2, specular=1)
spheres3d(boneLM[,,1])
## render original mesh
shade3d(skull_0144_ch_fe.mesh, col=3, specular=1)
spheres3d(boneLM[,,10])
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.