[R] movie3d function in the rgl package

Duncan Murdoch murdoch at stats.uwo.ca
Wed Oct 1 18:44:20 CEST 2008


Daniel McGlinn wrote:
> 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.
>   

Why are you using IMDisplay?  You should be able to view gif or png 
files in lots of standard Windows programs, e.g. Internet Explorer or 
Firefox.

> 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 )
>   

Do you have write permission in that directory?  Try running R as an 
administrator, or try writing into a directory you're sure you can write 
to.  Normally writing to the bin directory is a bad idea, and Vista 
might be protecting you from that. 

Duncan Murdoch


> ##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
>
>



More information about the R-help mailing list