cloud and
wireframe displays.panel.cloud(x, y, subscripts, z,
groups = NULL,
perspective = TRUE,
distance = if (perspective) 0.2 else 0,
xlim, ylim, zlim,
panel.3d.cloud = "panel.3dscatter",
panel.3d.wireframe = "panel.3dwire",
screen = list(z = 40, x = -60),
R.mat = diag(4), aspect = c(1, 1),
par.box = NULL,
xlab, ylab, zlab,
xlab.default, ylab.default, zlab.default,
scales.3d,
proportion = 0.6,
wireframe = FALSE,
scpos,
...,
at)
panel.wireframe(...)
panel.3dscatter(x, y, z, rot.mat, distance,
groups, type = 'p',
xlim.scaled, ylim.scaled, zlim.scaled,
zero.scaled,
col, col.point, col.line,
lty, lwd, cex, pch,
cross, ..., subscripts)
panel.3dwire(x, y, z, rot.mat = diag(4), distance,
shade = FALSE,
shade.colors.palette = trellis.par.get("shade.colors")$palette,
light.source = c(0, 0, 1000),
xlim.scaled,
ylim.scaled,
zlim.scaled,
col = if (shade) "transparent" else "black",
lty = 1, lwd = 1,
alpha,
col.groups = superpose.fill$col,
polynum = 100,
...,
drape = FALSE,
at,
col.regions = regions$col,
alpha.regions = regions$alpha)cloud and wireframe.
panel.wireframe is a wrapper to panel.cloud, which does
the actual work. panel.cloud is responsible for drawing the content that does
not depend on the data, namely, the bounding box, the arrows/scales,
etc. At some point, depending on whether wireframe is TRUE, it
calls either panel.3d.wireframe or panel.3d.cloud, which
draws the data-driven part of the plot.
The arguments accepted by these two functions are different, since
they have essentially different purposes. For cloud, the data is
unstructured, and x, y and z are all passed to
the panel.3d.cloud function. For wireframe, on the other hand,
x and y are increasing vectors with unique values,
defining a rectangular grid. z must be a matrix with
length(x) * length(y) rows, and as many columns as the number
of groups.
panel.3dscatter is the default panel.3d.cloud function.
It has a type argument similar to panel.xyplot,
and supports grouped displays. It tries to honour depth ordering,
i.e., points and lines closer to the camera are drawn later,
overplotting more distant ones. (Of course there is no absolute
ordering for line segments, so an ad hoc ordering is used. There is no
hidden point removal.)
panel.3dwire is the default panel.3d.wireframe
function. It calculates polygons corresponding to the facets one by
one, but waits till it has collected information about polynum
facets, and draws them all at once. This avoids the overhead of
drawing grid.polygon repeatedly, speeding up the rendering
considerably. If shade = TRUE, these attempt to color the
surface as being illuminated from a light source at
light.source. palette.shade is a simple function that
provides the deafult shading colors
Multiple surfaces are drawn if groups is non-null in the call
to wireframe, however, the algorithm is not sophisticated
enough to render intersecting surfaces correctly.
cloud, utilities.3d