R library rgl cannot find image magick although it is installed and executes from within a cmd shell.
So this does not work:
require(rgl)
open3d()
rgl.bringtotop()
plot3d(foo$x,foo$y,foo$thing,col =heat.colors(256)[1+round(foo$z*255)],xlab = '',ylab='',zlab='',radius=3,size=3,box=T,axes=F)
play3d(spin3d(axis = c(1, 1, 1), rpm = 10), duration = 2)
movie3d(spin3d(axis = c(1, 1, 1), rpm = 10), duration = 1)
As it barfs:
riting 'movie200.png'Writing 'movie003.png'
Error in movie3d(spin3d(axis = c(1, 1, 1), rpm = 10), duration = 20) :
'ImageMagick' not found
In addition: Warning message:
running command 'C:\Windows\system32\cmd.exe /c convert --version' had status 4
The real issue here is that convert is a windows command. On Windows, I believe Imagemagick uses magick for its commands.
So I think rgl needs to use the windows command.
Any ideas?
Work around
movie3d(spin3d(axis = c(1, 1, 1), rpm = 10), duration = 12,movie='un1qu3',dir = getwd())
system('magick -delay 10 un1qu3*.png out.gif')
file.remove(grep('un1qu\\d+\\.png',list.files(),value = T))