A practical guide to ecological modelling – Chapter 3
## =============================================================================
## R-Code to make figure 3.10 D from the book:
## K. Soetaert and P.M.J. Herman, 2009.
## A practical guide to ecological modelling -
## using R as a simulation platform. Springer, 372 pp.
## http://www.springer.com/life+sciences/ecology/book/978-1-4020-8623-6 .
## implemented by Karline Soetaert
## =============================================================================
require(shape)
emptyplot(c(-1.4, 1.4),
frame.plot = TRUE, main = "spherical isosurfaces")
rseq <- seq(from = 0.4, to = 1, length.out = 100)
col <- grey(rev(rseq)) # gives the illusion of a surface
filledellipse (rx1 = 1, ry1 = 1.0, col = col)
ry <- 0.35
rss <- 1
plotellipse(rx = 1, ry = ry, angle =-90, from = pi, to = 2*pi,
col = grey(0.95), lwd = 1)
plotellipse(rx = 1, ry = rss, angle = 90, from = pi, to = 2*pi,
col = grey(0.95), lwd = 1)
plotellipse(rx = 1, ry = 0.0, angle = 90, from = pi, to = 2*pi,
lcol = "darkgrey", lwd = 1)
Arrows(0, 0, 1.2, 0, arr.type = "triangle",
lty = 2, arr.length = 0.2)
text(1.2, 0.2, "r", cex = 1.5)
segments(-0.6, -0.5, 0.5, -1.2)
segments(0, 0, 0.7, -1.1)
points(0, 0, pch = 18, col = "black")
text(0.55, -1.3, "boundaries", cex = 1.2, adj = 0)
Go back