getMeshBox | R Documentation |
compute the bounding box of a triangular mesh
getMeshBox(mesh, tri = FALSE, extend = 0, pca = TRUE)
mesh |
triangular mesh of class "mesh3d" |
tri |
logical: if TRUE, triangular mesh representing the bounding box is returned |
extend |
numeric: offset extending the bbox (or shrinking if negative) |
pca |
if TRUE, the box will be aligned by the principal axes. |
returns a matrix with the corners of the box or a triangular mesh if tri=TRUE.
require(Rvcg)
data(humface)
bbox <- getMeshBox(humface)
## Not run:
require(rgl)
spheres3d(bbox)
## End(Not run)
bbmesh <- getMeshBox(humface,tri=TRUE)
## Not run:
shade3d(bbmesh,alpha=0.4)
wire3d(humface)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.