| outsideBBox | R Documentation | 
get vertex indices of vertices outside a bounding box
outsideBBox(x, corners, outside = TRUE)
| x | a k x 3 matrix or a triangular mesh of class "mesh3d" | 
| corners | a 8 x 3 matrix defining the corners of a bounding box, or a triangular mesh of class "mesh3d" representing the meshBox | 
| outside | logical: if TRUE the indices outside the box are returned, those inside | 
returns the indices of coordinates inside/outside the bounding box.
require(Rvcg)
require(Morpho)
data(humface)
bbox <- getMeshBox(humface,extend=-0.2)
bboxmesh <-  getMeshBox(humface,extend=-0.2,tri=TRUE)
## Not run: 
require(rgl)
spheres3d(bbox)
## End(Not run)
outside <- outsideBBox(humface,bbox)
humshrink <- rmVertex(humface,outside)
## Not run: 
wire3d(humshrink,col=3)#inside
wire3d(humface,col=2)#outside
shade3d(bboxmesh,alpha=0.4)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.