toRGL | R Documentation |
Converts a CGAL mesh (e.g. an output of the Mesh
function) to a rgl mesh.
toRGL(mesh, ...)
mesh |
a CGAL mesh, that is to say a list of class |
... |
arguments passed to |
A rgl mesh, that is to say a list of class "mesh3d"
.
library(MeshesOperations) library(rgl) mesh <- Mesh( truncatedIcosahedron[["vertices"]], truncatedIcosahedron[["faces"]], triangulate = TRUE, numbersType = "lazyExact" ) rglmesh <- toRGL(mesh, segments = t(mesh[["edges"]])) open3d(windowRect = c(50, 50, 562, 562), zoom = 0.9) shade3d(rglmesh, color = "darkred")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.