Skip to contents

Use this function to make a manually manipulated rgl view reproducible, within sessions or across sessions. Within an R session, simply use par3d.save to record the par3d parameters for the view(s) to named objects. Across sessions, use the filename argument to save these to .rds files

Usage

par3d.save(
  params = c("userMatrix", "scale", "zoom", "FOV"),
  filename,
  dev = rgl.cur()
)

par3d.restore(parms, filename)

Arguments

params

A list of par3d parameters to save

filename

Name of a .rds file to save to or restore from

dev

The rgl device. Currently unused

parms

A list of par3d parameters to restore

Value

par3d.save returns a list with the current values of the par3d parameters named in params.

See also

Author

Michael Friendly

Examples


if (FALSE) { # \dontrun{
  library(rgl)
  open3d()
  # ...
  parms <- par3d.save()
  # ....
  par3d.restore(parms)
  
} # }