Although this post may be related previous ones (e.g., here), it also involves a larger dataset (i.e., numbers of points ~1e5), which describes the surface of a 3D object (think of a single particle in high definition), defined by regularly-spaced (x,y,z) value forming a closed volume. These points only describe the surface; the interior space is empty. I want to plot this surface using R. My first attempt used plot3d in rgl:
library(rgl)
d=read.table("./sample_particle.txt", col.names=c("x","y","z"))
x=d$x
y=d$y
z=d$z
p <- plot3d(x,y,z,colrvar=z,col=gray(seq(0.1,1,length=5)))
With this result
I now want to plot the surface of this object (and not simply the discrete points), but need some guidance as to how to accomplish this. The particle shape varies between a rough cube and sphere, and thus a given x, y coordinate will occur twice: does this make construction of Delaunay triangles impossible? If not, can anyone suggest a routine that can deal with larger datasets?