AML for animating ARC/INFO images (the glacier)

Created June 9, 1995
I'm just putting the AML portion here, as the mpeg_encode stuff is no different from what I have described elsewhere.

This AML makes a series of frames that are saved with the screensave command. The animation part comes from incrementally darkening one coverage while drawing the other.


/* animateglac.aml /* Produce an animation between two glacial periods. /* The important variables are the beginning and ending glacial coverage, /* the beginning frame number, and the number of frames /* to create between the two periods. /* arcplot display 9999 size canvase 200 200 &call setup /*make the first frame, and save it shadeset color clearselect clear reselect $FM/base/glac18 poly glac18-id = 1 arcs $FM/base/base arcs $FM/base/states arcs $FM/base/country polygonshades $FM/base/glac18 1 move .29 .28 text '18\kya' screensave glac1.ras screensave glac2.ras screensave glac3.ras /* now do a series of transitions between glacial extent /* coverages that we have digitized &call setup &s start = 18 &s finish = 14 &s number = 14 &s frame = 4 &s halfway = %number% / 2 &call runframes &call setup &s start = 14 &s finish = 13 &s number = 10 &s halfway = %number% / 2 &call runframes &call setup &s start = 13 &s finish = 12 &s number = 10 &s halfway = %number% / 2 &call runframes &call setup &s start = 12 &s finish = 11 &s number = 10 &s halfway = %number% / 2 &call runframes &call setup &s start = 11 &s finish = 10 &s number = 10 &s halfway = %number% / 2 &call runframes &call setup &s start = 10 &s finish = 9 &s number = 10 &s halfway = %number% / 2 &call runframes &call setup &s start = 9 &s finish = 8 &s number = 10 &s halfway = %number% / 2 &call runframes /*end of main routine &return /* subroutines /* The setup routine just resets things, and puts them back the same /* way. I did this because I found in the past the Arc/Info Rev 6.1.1 /* chokes a little if you do too many screensaves in one arcplot session. &routine setup reset shadeset colornames mape 1019844,952925,6066914,6043846 textset font textsymbol 3 textcolor hls 240 100 100 &return /* This is the real guts of the aml. &routine runframes &do counter = 1 &to %number% &by 1 shadecolorramp 1 %number% black white clearselect clear /* /* Reselect for polygons coded as Glacial Ice /* reselect $FM/base/glac%start% poly glac%start%-id = 1 reselect $FM/base/glac%finish% poly glac%finish%-id = 1 &s tempno = %number% - %counter% polygonshades $FM/base/glac%start% %tempno% polygonshades $FM/base/glac%finish% %number% clearselect /* /* Reselect for polygons coded as Periglacial Lakes\ /* and shade them in cyan /* reselect $FM/base/glac%start% poly glac%start%-id = 4 reselect $FM/base/glac%finish% poly glac%finish%-id = 4 shadecolorramp 1 %number% black cyan polygonshades $FM/base/glac%start% %tempno% polygonshades $FM/base/glac%finish% %number% arcs $FM/base/base arcs $FM/base/states arcs $FM/base/country /* /* I found this to be the trickiest part. This is a method for /* putting in the time label. The version here makes a sort of /* pulsating label. I'm not sure that I like it, so this part /* may change in the future. /* move .29 .28 &if %counter% le %halfway% &then &do &s temptxtno = %counter% / %halfway% * 100 &s temptxtno = 100 - %temptxtno% textcolor hls 240 %temptxtno% 100 text [quote %start%\kya] &end &else &do &s temptxtno = %counter% - %halfway% &s temptxtno = %temptxtno% / %halfway% * 100 textcolor hls 240 %temptxtno% 100 text [quote %finish%\kya] &end screensave glac%frame%.ras &s frame = %frame% + 1 &end screensave glac%frame%.ras &s frame = %frame% + 1 &return
I hope this is of interest. Please let me know if you have any comments erich@museum.state.il.us
ISM Welcome Page.