View source: R/cusp3d.surface.R
cusp3d.surface | R Documentation |
This function generates a 3D display of the cusp equilibrium surface.
cusp3d.surface(alpha = c(-5, 5), beta = c(-3, 3), y = 41,
xlim = range(alpha), ylim = range(beta), zlim = c(-5, 4),
xlab = expression(alpha), ylab = expression(beta), zlab = "equilibrium states",
main = NULL, sub = NULL, phi = 20, theta = 160,
r = sqrt(3), d = 1, scale = TRUE, expand = 1, hue = 240,
chroma = 35, surf.alpha = 0.75, gamma = 1.5, bcol = NA,
lcol = "gray", ltheta = 90, lphi = 70, box = TRUE,
axes = FALSE, nticks = 5, ticktype = "simple", floor.lines = TRUE, ...)
alpha |
numeric 2-vector specifying the normal/symmetry factor axis range |
beta |
numeric 2-vector specifying the bifurcation/splitting factor axis range |
y |
numeric specifying the iso contours used to render the surface (see details below) |
xlim , ylim , zlim |
numeric 2-vectors (see |
xlab , ylab , zlab , main , sub |
strings (see |
phi , theta |
numeric, determine viewing direction (see |
r |
numeric, distance to center of the plotting box (see |
d |
numeric, strength of perspective transformation (see |
scale , expand |
logical, see |
hue , chroma , surf.alpha |
hue, chroma and alpha (transparency) of the surface segments (see |
gamma |
gamma for shading of surface (see |
bcol |
color, |
lcol |
color of the lines on the floor of the plotting cube |
ltheta , lphi |
numeric, direction of illumination of the surface (similar to |
box , axes , nticks , ticktype |
(see |
floor.lines |
logical, if |
... |
extra arguments that are passed to |
If y
has length 1, it is interpreted as the number of contours. Otherwise it is interpreted as a vector of contour levels from which the surface must be determined. If y
is a number, the exact range of y
is determined by the ranges of alpha
and beta
through the cusp equilibrium equation below.
The surface is constructed from the iso-contours of the cusp equilibrium surface that makes up the solutions to
\alpha + \beta*y - y^3 = 0
as a (multi-)function of the asymmetry variable \alpha
and bifurcation variable \beta
. For each possible solution y
the iso-contours are given by the equation
\alpha = (\beta*y - y^3)/y,
which are linear in \beta
. For each value of y
the values of alpha
are determined for the end points of the beta
range specified by beta
. The two 3D coordinates (\alpha
, \beta
, y
) are projected onto the 2D canvas using the persp
transformation matrix and used for drawing the lines and polygons.
cusp3d.surface
returns the viewing transformation matrix, say VT
, a 4 x 4 matrix suitable for projecting 3D coordinates (x,y,z) into the 2D plane using homogeneous 4D coordinates (x,y,z,t). It can be used to superimpose additional graphical elements on the 3D plot, by lines() or points(), using the simple function trans3d().
This function is an alternative to cusp3d
which uses a different method of rendering and also plots fitted points on the surface.
Raoul Grasman
See cusp-package
, cusp3d
persp
, plot.cusp
## Not run:
p = cusp3d.surface(chroma=40,lcol=1,surf.alpha=.95,phi=30,theta=150,
bcol="surface",axes=TRUE,main="Cusp Equilibrium Surface")
lines(trans3d(c(5,5), c(3,3), c(-5,4), p), lty=3) # replot some of the box outlines
lines(trans3d(c(-5,5), c(3,3), c(4,4), p), lty=3)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.