Question: How to modify the speed of an animated gif produced with maple

As far as I know -- knowledge gleaned from various past mapleprimes posts I was able to read on the matter -- the recommended way to produce animated gifs is (1) to produce the animation within maple, (2) to save the relevant part of the worksheet as html, and (3) to retrieve the gif that the conversion produces (located in a folder typically named 'images' and that is attached to the html file created by conversion). It is then recommended to use other software to modify the gif -- my interest here was in selecting the number of frames per second.

I found that the animated gif file could not be read by the freeware/shareware I tried, to name a few I tried: ImageMagick, Microsoft Gif Animator, GifMation, 2&3DAnimator, EasyGifAnimator, FlexGifAnimator, BenetonMovieGif, PYsoftware Animator. I have by now lost track of which are freeware and which are shareware. I was going a little mad installing them and uninstalling them. None of them could read the animated gif file produced by the maple html converter (Maple 12). I had expected imagemagick or microsoft gif animator to be up to the task -- but no. Now, I cannot say if this is a general issue or machine-specific. Whatever the case may be, let me tell you the workaround I have found.

Step 1.

Produce the animated gif within maple. Assuming you have a 3-D plot named "p", something like:

> spin := [seq(display3d({p},orientation=[10*i,45]),i=0..36)]:
> display(spin,insequence=true);

The gif produced by this command spins (for me) with standard image viewers, such as irfanview, and within standard browsers. The issue I had with the maple gif produced with the above command is that the number of frames per second was very large. The animation was too quick to understand. So I decided to use another sofware to modify the gif, and set the number of frames per second to something smaller than the default.

Step 2.

Open the gif within irfanview (freeware)
Select Options->Extract all frames
Make sure to save each frame as gif pictures (as opposed to jpeg or other).

Step 3.

Use a freeware gif animator to recreate the gif. Here is what I did. I found that a very small piece of freeware named "UNFREEZ", which does not require an install, does the trick very fast. In one or two seconds I was able to recreate an animated gif with the original frames. In the process, the animated gif lost about 70% of its size without any noticeable loss in quality. Note that if you wish to upload to mapleprimes, there is currently a limit to the size of the files you can post -- I was well above that limit with the default maple gif I had produced (36 frames of approx 24MB each).

The 3 steps above took less than a minute to execute.

Further remarks.

If you are going to use "unfreez" note that when you drag and drop the frames (.gif pictures) into unfreez, it is important to have the pointer on the first frame in the series, otherwise the original order of the frames will be modified. You can just drag and drop all the frames at once. Unfreez allows you to select two options -- loop animation (yes/no) and frame delay (in one hundredth of a second for each frame, i.e. 100 for 1 second). For more options, you will need to find another gif creator.

N.B. I am not in any way related to unfreez or to any of the other software I have quoted. I just want to share my (limited) experience about gif creation: the above has worked for me and hopefully this information may save you a few hours of installing/uninstalling gif editors that can't read your maple-produced gif.

As an aside, note that
> plotsetup(gif, plotoutput=`3Dspin.gif`, plotoptions=`color, portrait, noborder, axiswidth=400pt, axisheight=400pt`):
> display(spin,insequence=true);
did not, for some reason, produce a 3-D gif; instead it "flattened" the 3-D into 2-D. Maybe some option I didn't set up properly.

It would be nice to be able to control the number of frames per second that go into the gif animation from within maple. As far as I'm aware it is not possible. Please correct me if I'm wrong.

I'll try to stick the animated gif here. Let's see if it spins...

Please Wait...