Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

par3dinterpControl

Control RGL widget like par3dinterp()


Description

This control works with playwidget to change settings in a WebGL display in the same way as par3dinterp does within R.

Usage

par3dinterpControl(fn, from, to, steps, subscene = NULL, omitConstant = TRUE, ...)

Arguments

fn

A function returned from par3dinterp.

from, to, steps

Values where fn should be evaluated.

subscene

Which subscene's properties should be modified?

omitConstant

If TRUE, do not set values that are constant across the range.

...

Additional parameters which will be passed to propertyControl.

Details

par3dinterpSetter sets parameters corresponding to values produced by the result of par3dinterp.

Value

Returns controller data in a list of class "rglControl".

Author(s)

Duncan Murdoch

Examples

example(plot3d)
M <- r3dDefaults$userMatrix
fn <- par3dinterp(times = (0:2)*0.75, userMatrix = list(M,
                                      rotate3d(M, pi/2, 1, 0, 0),
                                      rotate3d(M, pi/2, 0, 1, 0)),
                                      scale = c(0.5, 1, 2))
control <- par3dinterpControl(fn, 0, 3, steps = 15)
control      
if (interactive() || in_pkgdown_example()) 
  rglwidget(width = 500, height = 250) %>%
  playwidget(control,
       step = 0.01, loop = TRUE, rate = 0.5)

rgl

3D Visualization Using OpenGL

v0.106.8
GPL
Authors
Duncan Murdoch [aut, cre], Daniel Adler [aut], Oleg Nenadic [ctb], Simon Urbanek [ctb], Ming Chen [ctb], Albrecht Gebhardt [ctb], Ben Bolker [ctb], Gabor Csardi [ctb], Adam Strzelecki [ctb], Alexander Senger [ctb], The R Core Team [ctb, cph], Dirk Eddelbuettel [ctb], The authors of Shiny [cph], The authors of knitr [cph], Jeroen Ooms [ctb], Yohann Demont [ctb], Joshua Ulrich [ctb], Xavier Fernandez i Marin [ctb], George Helffrich [ctb], Ivan Krylov [ctb]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.