[R] movie3d in rgl object 'movie' not found
harryxgordon
michellev.tran at gmail.com
Sat Jun 4 01:30:47 CEST 2011
Hello,
I am trying to save a .gif movie using movie3d from the package {rgl}. I am
using the following code combined with the globe example on the ?movie3d
page. I've installed ImageMagick and the directory seems to be working
properly, i.e. when I do Sys.getenv("PATH"), C:\\Program Files
(x86)\\ImageMagick-6.7.0-Q16 shows up.
####
library(rgl)
open3d()
lat <- matrix(seq(90,-90, len=50)*pi/180, 50, 50, byrow=TRUE)
long <- matrix(seq(-180, 180, len=50)*pi/180, 50, 50)
r <- 6378.1 # radius of Earth in km
x <- r*cos(lat)*cos(long)
y <- r*cos(lat)*sin(long)
z <- r*sin(lat)
persp3d(x, y, z, col="white",
texture=system.file("textures/world.png",package="rgl"),
specular="black", axes=FALSE, box=FALSE, xlab="", ylab="", zlab="",
normal_x=x, normal_y=y, normal_z=z)
#I run the above, note the device ID and then enter the following with
rgl.cur(1) if my device ID is 1.
movie3d(par3dinterp(par3dsave(params = c("userMatrix", "scale", "zoom",
"FOV"), times = FALSE, dev = rgl.cur(1))), duration = 5, fps = 10, movie =
"movie", frames = movie, dir=tempdir(), type = "gif")
#The par3d window pops up, I move the globe around a bit and press "record"
a few times. Then when I press "quit", I get the following error:
Error in sprintf("%s%03d.png", frames, i) : object 'movie' not found
####
Sorry if I've made a silly mistake; I'm kind of a newb. I haven't found any
record of this same issue on the web.
Many Thanks!
Michelle
--
View this message in context: http://r.789695.n4.nabble.com/movie3d-in-rgl-object-movie-not-found-tp3572316p3572316.html
Sent from the R help mailing list archive at Nabble.com.
More information about the R-help
mailing list