readMeshFile | R Documentation |
Read mesh vertices and faces from a file.
readMeshFile(filepath)
filepath |
path to the mesh file; supported formats are |
A list with two fields: vertices
, a numeric matrix with three
columns, and faces
, either a list of integer vectors or, in the
case if all faces have the same number of sides, an integer matrix.
library(MeshesOperations) library(rgl) vf <- readMeshFile( system.file("extdata", "beethoven.ply", package = "MeshesOperations") ) mesh <- Mesh( vf[["vertices"]], vf[["faces"]], normals = TRUE, clean = TRUE ) rglmesh <- toRGL(mesh) open3d(windowRect = c(50, 50, 562, 562)) view3d(0, 0, zoom = 0.8) shade3d(rglmesh, color = "palevioletred")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.