Play animation of rgl scene
play3d calls a function repeatedly, passing it the elapsed
time in seconds, and using the result of the function to
reset the viewpoint.
movie3d does the same, but
records each frame to a file to make a movie.
1 2 3 4 5
A function returning a list that may be passed to
The duration of the animation
Which rgl device to select
Additional parameters to pass to
Initial time at which to start the animation
Number of frames per second
The base of the output filename, not including .gif
The base of the name for each frame
A directory in which to create temporary files for each frame of the movie
Whether to try to convert the frames to a single GIF movie, or a command to do so
Whether to report the
Whether to call
What type of movie to create. See Details.
f will be called in a loop with the first argument
startTime plus the time in seconds since the start
(where the start is measured after all arguments have been evaluated).
play3d is likely to place a high load
on the CPU; if this is a problem, calls to
should be made within the function to release time to other processes.
play3d will run for the specified
duration (in seconds), but
can be interrupted by pressing
ESC while the rgl window has the focus.
movie3d saves each frame to disk in a filename of the form ‘framesXXX.png’, where
XXX is the frame number, starting from 0. If
uses ImageMagick to convert them to a single file, by default an animated GIF.
type argument will be passed to ImageMagick to use as a file extension
to choose the file type.
convert can be a template for a command to
execute in the standard shell (wildcards are allowed). The template is
converted to a command using
sprintf(convert, fps, frames, movie, type, dir, duration)
code = TRUE
uses the template
"convert -delay 1x%d %s*.png %s.%s". All work
is done in the directory
dir, so paths should not be needed in
the command. (Note that
sprintf does not require all
arguments to be used, and supports formats that use them in an
top = TRUE default is designed to work around an OpenGL limitation:
in some implementations,
rgl.snapshot will fail if the window
is not topmost.
As of rgl version 0.94, the
dev argument is not needed: the
f can specify its device, as
for example. However, if
dev is specified, it will be selected
as the current device as each update is played.
As of rgl version 0.95.1476,
include multiple values in a
par3d() will be called
for each of them.
This function is called for the side effect of its repeated calls to
Duncan Murdoch, based on code by Michael Friendly
par3dinterp return functions suitable
to use as
demo(flag) for an example that modifies the
1 2 3 4 5 6 7 8 9 10 11 12