# NOT RUN {
xyz <- matrix(c(-1, -1, -1,
-1, 1, -1,
1, 1, -1,
1, -1, -1,
-1, 1, -1,
-1, 1, 1,
1, 1, 1,
1, 1, -1,
1, -1, -1,
1, 1, -1,
1, 1, 1,
1, -1, 1), byrow = TRUE, ncol = 3)
mesh <- as.mesh3d(xyz, triangles = FALSE, col = "red")
mesh$vb
mesh$ib
open3d()
shade3d(mesh)
# Stop vertices 2 and 5 from being merged
notEQ <- matrix(FALSE, 12, 12)
notEQ[2, 5] <- TRUE
mesh <- as.mesh3d(xyz, triangles = FALSE, notEqual = notEQ)
mesh$vb
mesh$ib
# }
Run the code above in your browser using DataLab