movieslice3D
plots 3D volumetric data as slices moving in one direction
in open-GL graphics.
It is based on the plot3Drgl
function slice3Drgl.movieslice3D (x, y, z, colvar = NULL, xs = NULL,
ys = NULL, zs = NULL, along = NULL,
col = jet.col(100), NAcol = "white", clim = NULL,
wait = NULL, ask = FALSE, add = FALSE,
basename = NULL, ...)
colvar
respectively.c(length(x), length(y), length(z))
.
It must be present.colvar
variable.
If col
is NULL
then a red-yellow-blue colorscheme (jet.col) will be used.colvar
values that are NA
.colvar
is specified, the range of the color variable values.
Values of colvar
that extend the range will be put to NA
and colored
as specified with NAcol
.colvar
on them.
If all xs, ys, zs
are NU
NULL
, then the dimension will be the one corresponding to the longest vector xs, ys, zs
.TRUE
, then the slices will be added to the current plot.
If FALSE
a new plot is started.TRUE
, then the new slice will only be drawn after a key has been struck. If FALSE
, redrawing will depend on wait
NULL
, the drawing will not be suspended.png
file to be produced for each movieframe.plot3D
or to plotrgl
from package plot3Drgl
.movieslice3D
moviepoints3D for plotting moving points in 3Dx <- y <- z <- seq(-1, 1, by = 0.1)
grid <- mesh(x, y, z)
colvar <- with(grid, x*exp(-x^2 - y^2 - z^2))
movieslice3D (x, y, z, colvar = colvar, ticktype = "detailed")
Run the code above in your browser using DataLab