I have 3D vertex coordinates (vb.xlsx) and face information (it.xlsx) for human face available here. I managed to plot 3D surface mesh with rgl package by providing both vertex and face information (see here). What surprised me is that with plotly package in R, I can get solid 3D surface mesh of human face only by providing vertex data, where face information is unnecessary. Below is my R code to generate the surface mesh:
library(plotly)
library(xlsx)
vb <- read.xlsx("E:\\Research\\GM\\3D started\\Spatially dense\\Point cloud to mesh\\vb.xlsx", sheetIndex = 1, header = F)
Sys.setenv("plotly_username"="<MY USER NAME>")
Sys.setenv("plotly_api_key"="<MY KEY>")
face <- plot_ly(
x = vb[,1], y = vb[,2], z = vb[,3], # Note only vertex provided
type = "mesh3d"
)
face
The resultant surface mesh is as follows:
My question is how does plotly managed to generate 3D surface mesh without face information? Can anyone show me the magic code under the hood so that I could do the same thing outside plotly with some self-written code?
Thank you.