library (Rvcg)
# espadon mesh of two spheres of radius R1=10 and R2=11, separated by dR = 3
sph <- vcgSphere ()
mesh1 <- obj.create ("mesh")
mesh1$nb.faces <- ncol (sph$it)
mesh1$mesh <- sph
mesh2 <- mesh1
R1 <- 10
R2 <- 11
dR <- 3
mesh1$mesh$vb[1:3,] <- R1 * mesh1$mesh$normals[1:3,] + mesh1$mesh$vb[1:3,]
mesh2$mesh$vb[1:3,] <- R2 * mesh2$mesh$normals[1:3,] + mesh2$mesh$vb[1:3,] +
matrix (c (dR, 0, 0), ncol = ncol (mesh2$mesh$vb), nrow = 3)
sp.similarity.from.mesh (mesh1 , mesh2,
hausdorff.quantile = seq (0, 1, 0.05),
surface.tol = seq (0, dR + abs(R2-R1), 0.5))
Run the code above in your browser using DataLab