View source: R/display_surfaces.R
display_surfaces | R Documentation |
Plots multiple mesh surfaces.
display_surfaces(surfaces = surfaces, col = NULL, alpha = 1)
surfaces |
an object of the class "mesh_array" that contains two lists: a table with the meshes information (name, number of faces and vertices) and all the meshes that had previously been imported using the function import_surfaces. |
col |
an optional vector selecting the colour the meshes will be plotted with. If there is only one colour selected, all the meshes will be plotted with that colour, otherwise each mesh will be plotted with the corresponding colour from the colour vector. Default is grey. |
alpha |
an optional variable (from 0 to 1) indicating the level of 'transparency' to plot the meshes with. Default is no transparency (1). |
Takes an object of the class "mesh_array" and plots all the meshes together in the same rgl window.
Marta Vidal-Garcia
Daniel Adler, Duncan Murdoch and others (2020). rgl: 3D Visualization Using OpenGL. R package version 0.100.54. https://CRAN.R-project.org/package=rgl
data(meshes) # Example 1 display_surfaces(surfaces = meshes) rgl.close() # from rlg. Close current rgl window # Example 2 display_surfaces(surfaces = meshes, col = c("green", "blue", "yellow"), alpha = 0.6) rgl.close() # from rlg. Close current rgl window
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.