display_surfaces: display_surfaces

View source: R/display_surfaces.R

display_surfacesR Documentation

display_surfaces

Description

Plots multiple mesh surfaces.

Usage

display_surfaces(surfaces = surfaces, col = NULL, alpha = 1)

Arguments

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).

Details

Takes an object of the class "mesh_array" and plots all the meshes together in the same rgl window.

Author(s)

Marta Vidal-Garcia

References

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

Examples


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



marta-vidalgarcia/mesh_process documentation built on May 7, 2022, 12:08 a.m.