Learn R Programming

TML (version 2.3.0)

Trop_ball: Visualize a Tropical ball in 2D or 3D

Description

This function constructs a visualization of a 2D or 3D tropical ball

Usage

Trop_ball(
  v,
  d,
  a = 1,
  cls = "black",
  cent.col = "black",
  fil = TRUE,
  plt = TRUE,
  bord = "black"
)

Value

2D or 3D visualization of tropical ball

Arguments

v

center of tropical ball; numeric vector of length 3 or 4

d

radius of tropical ball

a

shading level; 1 is opaque

cls

string indicating color of interior of ball

cent.col

string indicating color of center point

fil

logical for 3D plots; if TRUE 2D facets of 3D ball fill in color of cls parameter

plt

logical; indicates plot a new object; defaults to TRUE; if FALSE, overlays the ball on existing plot

bord

string indicating color of border of ball (only for 2D plots)

Author

David Barnhill david.barnhill@nps.edu

Examples

Run this code
v <-c(0,0,0)
d <- 2
Trop_ball(v,d,a=.1,cls='white',cent.col='black',fil=TRUE,plt=TRUE,bord='black')
v <-c(0,0,0,0)
d <- 2
Trop_ball(v,d,a=1,cls='red',cent.col='black',fil=FALSE,plt=TRUE)

Run the code above in your browser using DataLab