BBoxSlices | R Documentation |
get slices from the bouding box (as triangular meshes).
BBoxSlices(box, axis = c(1, 2, 3), percent = 0.5)
box |
matrix, containing the 8 corners of a 3D-bounding box (e.g. generated by |
axis |
integer: select the plane to place the slice. 1=y-z plane, 2 = x-z plane, 3 = x-y plane. |
percent |
offset from border. From lower to higher values of the orthogonal axis. |
mesh3d
require(Morpho);require(rgl)
data(boneData)
box <- getMeshBox(skull_0144_ch_fe.mesh,pca=FALSE)
shade3d(skull_0144_ch_fe.mesh,col="white")
for(i in 1:3) shade3d(BBoxSlices(box,axis = i,percent = 0.7),col=i+1)
## use BBoxSlices to cut a mesh
slice1 <- BBoxSlices(box,axis = 1,percent = 0.7)
sliceverts <- vert2points(slice1)
cutmesh <- cutMeshPlane(skull_0144_ch_fe.mesh,v1=sliceverts[1,],sliceverts[2,],sliceverts[3,])
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.