Animation
A couple hours work and we now have animations of the global anomalies:
Created with the animation package in R. Once I figured out the code examples and fiddling about I was able to get the program to output an Html animation complete with java based playback controls.
A little work in iPhoto and we have a movie with stupid colors, bad music and a slow frame rate
Write if you wanna know how it works and I’ll integrate this code into the system
library("animation")
source("Global.R")
world <- loadGlobe("LandOcean")
layerNames(world)<- as.character(TIMELINE)
dir <- "Animation"
if(file.exists(dir))stop(cat(dir, "exists create new dir"))
dir.create(dir)
ani.options(nmax=nlayers(world),ani.width=1080,ani.height=540,
ani.type ="png",outdir=dir,imgdir="IMAGES",
filename = "world.html",ani.dev=png,title="Global Anomaly",
description ="world animation",autobrowse=TRUE,interval=.1)
ani.start()
aninmateWorldMap(world)
ani.stop()
Very simply. We start by loading animation package. Now, one nasty thing is that this package loads MASS package which them summarily CLOBBERS the key routine in raster that I use ( “area”) That bug destroyed about 2 days of my time, but once I figured it out there are various solutions. I employ one of them here ( a Hack ) where I allow “raster” to load second and CLOBBER the package that clobbered it. take that namespace thief.
next we set up animation configuration. ani.options(). Then we call start. ani.start() Then we make any drawing commands we want. In this case I cycled through the layers of the brick and plot each out as a *.png 1320 frames. Then we call ani.stop() and a browser is launched to see the page. The html page comes with player controls. then I pulled the images into IPhoto and merely output them as a .mov. I ws going to fuss around with ImageMagick or graphicsmagick but my luck at doing unix compiles on this MAC has been close to ZERO ( I think my linux partition may be toast) I should probably give Wolfgang Spraul or Jon Phillips a hollar.

Thanks for the idea about using iPhoto!–that worked smoothly.