Dear r-helpers, Can one save a dynamic graphic produced by rgl, e.g.: open3d(); x <- sort(rnorm(1000)); y <- rnorm(1000); z <- rnorm(1000) + atan2(x,y); plot3d(x, y, z, col=rainbow(1000), size=2) as a dynamic figure that can be embedded in a pdf? _____________________________ Professor Michael Kubovy University of Virginia Department of Psychology USPS: P.O.Box 400400 Charlottesville, VA 22904-4400 Parcels: Room 102 Gilmer Hall McCormick Road Charlottesville, VA 22903 Office: B011 +1-434-982-4729 Lab: B019 +1-434-982-4751 Fax: +1-434-982-4766 WWW: http://www.people.virginia.edu/~mk9y/
?rgl.snapshot Michael Kubovy wrote:> > Dear r-helpers, > > Can one save a dynamic graphic produced by rgl, e.g.: > open3d(); x <- sort(rnorm(1000)); y <- rnorm(1000); z <- > rnorm(1000) + atan2(x,y); plot3d(x, y, z, col=rainbow(1000), size=2) > as a dynamic figure that can be embedded in a pdf? > _____________________________ > Professor Michael Kubovy > University of Virginia > Department of Psychology > USPS: P.O.Box 400400 Charlottesville, VA 22904-4400 > Parcels: Room 102 Gilmer Hall > McCormick Road Charlottesville, VA 22903 > Office: B011 +1-434-982-4729 > Lab: B019 +1-434-982-4751 > Fax: +1-434-982-4766 > WWW: http://www.people.virginia.edu/~mk9y/ > > ______________________________________________ > R-help at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide > http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. > >-- View this message in context: http://www.nabble.com/Can-a-dynamic-graphic-produced-by-rgl-be-saved--tp14649977p14650635.html Sent from the R help mailing list archive at Nabble.com.
On 06/01/2008 10:46 AM, Michael Kubovy wrote:> Dear r-helpers, > > Can one save a dynamic graphic produced by rgl, e.g.: > open3d(); x <- sort(rnorm(1000)); y <- rnorm(1000); z <- > rnorm(1000) + atan2(x,y); plot3d(x, y, z, col=rainbow(1000), size=2) > as a dynamic figure that can be embedded in a pdf?rgl doesn't produce any format that remains dynamic. You can produce bitmap or (with some limitations) vector format snapshots, and you can put multiple bitmaps together into a movie (see movie3d(), for example). I don't know how to embed a movie into a pdf, but I assume it's possible. Duncan Murdoch
Dear list, I am attempting to utilize the function "movie3d" in the package "rgl" to create a .gif animation of a 3d graphic. I understand that this function requires that the program "ImageMagik" is installed, and I have recently downloaded and installed this program. The R console does not report any errors, however all the .png files as well as the .gif files that are created by the function are all completely black. My OS is Windows Vista Home, R v2.7.2, IMDisplay v1.0. I have verified that IMDisplay is functioning by running this program for a different task. Sample code (taken from ?movie3d): open3d() plot3d( cube3d(col="green") ) M <- par3d("userMatrix") movie3d( spin3d(), duration=5, dir="C:/R/R-2.7.2/bin/movie", clean=FALSE ) ##R console reports the following Writing movie000.png Writing movie001.png ... Writing movie050.png Will create: C:/R/R-2.7.2/bin/movie/movie.gif Executing: convert -delay 1x10 movie*.png movie.gif Any help on this would be appreciated. Thanks, Dan -- Daniel J. McGlinn, Botany Department, Oklahoma State University http://ecology.okstate.edu/Libra/