plotGyroMesh {gyro}R Documentation

Plot hyperbolic mesh

Description

Plot the hyperbolic version of a triangle 3D mesh.

Usage

plotGyroMesh(
  mesh,
  s = 1,
  model = "U",
  iterations = 5,
  n = 100,
  edges = TRUE,
  edgesAsTubes = TRUE,
  edgesColor = "yellow",
  tubesRadius = 0.03,
  verticesAsSpheres = edgesAsTubes,
  spheresColor = edgesColor,
  spheresRadius = 0.05,
  facesColor = "navy",
  bias = 1,
  interpolate = "linear",
  g = identity
)

Arguments

mesh

there are two possibilities for this argument; it can be a triangle rgl mesh (class mesh3d) or a list with (at least) two fields: vertices, a numeric matrix with three columns, and faces, an integer matrix with three columns

s

positive number, the radius of the Poincaré ball if model="M", otherwise, if model="U", this number defines the hyperbolic curvature (the smaller, the more curved)

model

the hyperbolic model, either "M" (Möbius model, i.e. Poincaré model) or "U" (Ungar model, i.e. hyperboloid model)

iterations

argument passed to gyrotriangle

n

argument passed to gyrotube or gyrosegment, the number of points for each edge

edges

Boolean, whether to plot the edges (as tubes or as lines)

edgesAsTubes

Boolean, whether to plot tubular edges; if FALSE, the edges are plotted as lines

edgesColor

a color for the edges

tubesRadius

radius of the tubes, if edgesAsTubes = TRUE

verticesAsSpheres

Boolean, whether to plot the vertices as spheres; if FALSE, the vertices are not plotted

spheresColor

a color for the spheres, if verticesAsSpheres = TRUE

spheresRadius

radius of the spheres, if verticesAsSpheres = TRUE

facesColor

this argument sets the color of the faces; it can be either a single color or a color palette, i.e. a vector of colors; if it is a color palette, it will be passed to the argument palette of gyrotriangle

bias, interpolate, g

these arguments are passed to gyrotriangle in the case when facesColor is a color palette

Value

No value, called for plotting.

Examples

# hyperbolic great stellated dodecahedron
library(gyro)
library(rgl)
GSD <- system.file(
  "extdata", "greatStellatedDodecahedron.ply", package = "gyro"
)
mesh <- Rvcg::vcgPlyRead(GSD, updateNormals = FALSE, clean = FALSE)
open3d(windowRect = c(50, 50, 562, 562), zoom = 0.7)
plotGyroMesh(
  mesh,
  edgesAsTubes = FALSE, edgesColor = "black",
  facesColor = "firebrick1"
)

[Package gyro version 1.4.0 Index]