Learn R Programming

ETRep (version 1.2.1)

tube_Surface_Mesh: Create surface mesh of a tube

Description

Create surface mesh of a tube

Usage

tube_Surface_Mesh(
  tube,
  meshType = "quadrilateral",
  plotMesh = TRUE,
  color = "blue",
  decorate = TRUE
)

Value

An object from rgl::mesh3d class

Arguments

tube

List containing ETRep details.

meshType

String, either "quadrilateral" or "triangular" definig the type of mesh.

plotMesh

Logical, enables plotting of the mesh (default is TRUE).

color

String, defining the color of the mesh (default is 'blue').

decorate

Logical, enables decorating the plot (default is TRUE).

Examples

Run this code
if (FALSE) {
quad_mesh<-tube_Surface_Mesh(tube = ETRep::tube_B, 
                             meshType = "quadrilateral", 
                             plotMesh = TRUE, 
                             decorate = TRUE, 
                             color = "orange")
# draw wireframe of the mesh
rgl::wire3d(quad_mesh, color = "black", lwd = 1)   # add wireframe
# Display in browser
ETRep:::.etrep_show3d(width = 800, height = 600)

tri_mesh<-tube_Surface_Mesh(tube = ETRep::tube_B, 
                            meshType = "triangular", 
                            plotMesh = TRUE, 
                            decorate = TRUE, 
                            color = "green")
# draw wireframe of the mesh
rgl::wire3d(tri_mesh, color = "black", lwd = 1)   # add wireframe
# Display in browser
ETRep:::.etrep_show3d(width = 800, height = 600)
 }

Run the code above in your browser using DataLab