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

tkpar3dsave

Modal dialog for saving par3d settings


Description

This function opens a TCL/TK modal dialog to allow particular views of an RGL scene to be saved.

Usage

tkpar3dsave(params = c("userMatrix", "scale", "zoom", "FOV"),
          times = FALSE, dev = cur3d(), ...)

Arguments

params

Which parameters to save

times

Should times be saved as well?

dev

Which RGL device to work with

...

Additional parameters to pass to tktoplevel

Details

This opens a TCL/TK modal dialog box with Record and Quit buttons. Each time Record is clicked, a snapshot is taken of current par3d settings. When Quit is clicked, the dialog closes and the values are returned in a list.

If times == TRUE, then the times at which the views are recorded will also be saved, so that the play3d function will play back with the same timing.

Value

A list of the requested components. Each one will consist of a list of values that were current when the Record button was clicked. These are suitable to be passed directly to the par3dinterp function.

Author(s)

Duncan Murdoch

See Also

Examples

if (interactive() && !in_pkgdown_example()) {

  # Record a series of positions, and then play them back immediately
  # at evenly spaced times, in an oscillating loop
  example(plot3d)
  play3d( par3dinterp( tkpar3dsave() ) )

  # As above, but preserve the click timings

  # play3d( par3dinterp( tkpar3dsave(times=TRUE) ) )
}

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.