
Last chance! 50% off unlimited learning
Sale ends in
Get viewpoints on a sphere around a 3D mesh to be used with virtualMeshScan
getOuterViewpoints(
x,
n,
inflate = 1.5,
radius = NULL,
subdivision = 3,
PCA = FALSE
)
a list containing
n x 3 matrix containing viewpoints.
sphere from which the points are sampled
radius of the sphere
triangular mesh of class 'mesh3d'
number of viewpoint to generate
factor for the size of the sphere: inflate=1
means that the sphere around the object just touches the point farthest away from the mesh's centroid.
defines a fix radius for the sphere (overrides arg inflate
).
parameter passed to vcgSphere
logical: if TRUE, the sphere will be deformed to match the principle axes of the mesh. NOTE: this may result in the sphere not necessarily completely enclosing the mesh.
if (FALSE) {
data(boneData)
vp <- getOuterViewpoints(skull_0144_ch_fe.mesh,n=100)
require(rgl)
shade3d(skull_0144_ch_fe.mesh,col="white")
spheres3d(vp$viewpoints)
wire3d(vp$sphere)
### Fit to principal axes
vppca <- getOuterViewpoints(skull_0144_ch_fe.mesh,n=100,PCA=TRUE,inflate=1.5)
require(rgl)
shade3d(skull_0144_ch_fe.mesh,col="white")
spheres3d(vppca$viewpoints)
wire3d(vppca$sphere)
}
Run the code above in your browser using DataLab