add_sphere: Add a 2D Shaded Sphere to a Plot

Description Usage Arguments Author(s) Examples

View source: R/add_sphere.R

Description

Add a Description

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
add_sphere(
  x0 = 0,
  y0 = 0,
  r0 = 1,
  x1 = -0.5,
  y1 = 0.5,
  r1 = 0.1,
  h = 0.01,
  n = 1000,
  col = c("black", "white")
)

Arguments

x0

coordinate on the x-axis of center of the sphere

y0

coordinate on the y-axis of center of the sphere

r0

radius of the sphere

x1

coordinate on the x-axis of center of the shade

y1

coordinate on the y-axis of center of the shade

r1

radius of the smallest shade

h

factor of shading

n

number of vertices of the circle

col

vector of two colors used to generate a continuous gradient

Author(s)

Nicolas Casajus, nicolas.casajus@gmail.com

Examples

1
2
3
4
5
## Not run: 
plot(0, 0, asp = 1, xlim = c(-1, 1), ylim = c(-1, 1))
add_sphere()

## End(Not run)

ahasverus/rsphere documentation built on Dec. 31, 2020, 6:47 p.m.