par3d parameter values,
suitable for use in animations.par3dinterp(times = NULL, userMatrix, scale, zoom, FOV,
method = c("spline", "linear"),
extrapolate = c("oscillate", "cycle", "constant", "natural"))par3d("userMatrix")par3d("scale")par3d("zoom")par3d("FOV")par3d settings interpolated to that time.par3d, to set
the viewpoint at a given point in time.
All of the parameters are optional. Only those par3d parameters that are
specified will be returned.
The input values other than times may each be specified as
lists, giving the parameter value settings at a fixed time, or as
matrices or arrays. If not lists, the following formats should be
used: userMatrix can be a 4 x 4 x n array, or a 4
x 4n matrix; scale should be an n x 3 matrix;
zoom and FOV should be length n vectors.
An alternative form of input is to put all of the above arguments into
a list (i.e. a list of lists, or a list of arrays/matrices/vectors),
and pass it as the first argument. This is the most convenient way to
use this function with the tkrgl function
par3dsave.
Interpolation is by cubic spline or linear interpolation in an appropriate
coordinate-wise fashion. Extrapolation may oscillate
(repeat the sequence forward, backward, forward, etc.), cycle (repeat
it forward), be constant (no repetition outside the specified time
range), or be natural (linear on an appropriate scale).
In the case of cycling, the first and last specified values
should be equal, or the last one will be dropped. Natural extrapolation
is only supported with spline interpolation.play3d to play the animation.f <- par3dinterp( zoom = c(1,2,3,1) )
f(0)
f(1)
f(0.5)
play3d(f)Run the code above in your browser using DataLab