| mesh_from_rgl | R Documentation |
Extracts vertices and triangle indices from an rgl
tmesh3d object into the format expected by
render_mesh(). Does not require the rgl
package – any list with components vb (4xN
homogeneous coordinates) and it (3xM index matrix)
works.
mesh_from_rgl(tmesh)
tmesh |
A list with components |
A mesh descriptor list with vertices (Nx3)
and triangles (Mx3, 1-based indices).
fake <- list(vb = rbind(0:3, 0:3, 0:3, rep(1, 4)),
it = matrix(1:6, nrow = 3))
m <- mesh_from_rgl(fake)
m$vertices
m$triangles
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.