if (FALSE) {
# example delaunayn
d = c(-1,1)
pc = as.matrix(rbind(expand.grid(d,d,d),0))
tc = delaunayn(pc)
# example tetramesh
clr = rep(1,3) %o% (1:nrow(tc)+1)
rgl::view3d(60,fov=20)
rgl::light3d(270,60)
tetramesh(tc,pc,alpha=0.7,col=clr)
}
Run the code above in your browser using DataLab