MathGroup Archive 2003

[Date Index] [Thread Index] [Author Index]

Search the Archive

Export Gif animation bug?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg39148] Export Gif animation bug?
  • From: Don Taylor <dont at agora.rdrop.com>
  • Date: Fri, 31 Jan 2003 04:37:11 -0500 (EST)
  • Sender: owner-wri-mathgroup at wolfram.com

I think I've found a bug in exporting GIF animation
(Mathematica Version 4.0.2.0 under Windows 98 with MS patches)

I don't know what the problem is with this.  I've trimmed down what
I'm doing to what seems to be the bare minimum that shows the bug.
Tiny changes in the value of z or in the step size for the table
will make the background of the gif dark black or brilliant green,
change the resulting file size by a factor of 16x, etc.  These three
examples show a sample of the range of behavior that I've seen with this.

This simulates some axes and then draws a moving point which is
colored green at the bottom of each cycle and black elsewhere.

All these examples are identical code, except for the value of z.
It takes a couple of minutes to generate each example.

111 kbytes and what seems to be pretty much a correct plot

z = 1; Export["1.gif", Table[Graphics3D[{
        Line[{{0, 1, 0}, {0, -1, 0}}], Line[{{0, 0, z}, {0, 0, -z}}], 
        Line[{{0, 0, 0}, {4Pi, 0, 0}}],
        If[Sin[t] <= -0.8, RGBColor[0, 1, 0], RGBColor[0, 0, 0]],
        Point[{t, Cos[t], z Sin[t]}]},
      PlotRange -> {{0, 4Pi}, {-1.05, 1.05}, {-1.05z, 1.05z}}, 
      ImageSize -> 800, Boxed -> False], {t, 0, 4Pi, Pi/16}], "GIF"]

1598 kbytes! with bright green graph and lots of artifacts scattered
across the entire graph as it displays

z = 2; Export["2.gif", Table[Graphics3D[{
        Line[{{0, 1, 0}, {0, -1, 0}}], Line[{{0, 0, z}, {0, 0, -z}}], 
        Line[{{0, 0, 0}, {4Pi, 0, 0}}],
        If[Sin[t] <= -0.8, RGBColor[0, 1, 0], RGBColor[0, 0, 0]],
        Point[{t, Cos[t], z Sin[t]}]},
      PlotRange -> {{0, 4Pi}, {-1.05, 1.05}, {-1.05z, 1.05z}}, 
      ImageSize -> 800, Boxed -> False], {t, 0, 4Pi, Pi/16}], "GIF"]

72 kbytes with entire graph nearly completely black

z = N[\[ExponentialE]]; Export["e.gif", Table[Graphics3D[{
        Line[{{0, 1, 0}, {0, -1, 0}}], Line[{{0, 0, z}, {0, 0, -z}}], 
        Line[{{0, 0, 0}, {4Pi, 0, 0}}],
        If[Sin[t] <= -0.8, RGBColor[0, 1, 0], RGBColor[0, 0, 0]],
        Point[{t, Cos[t], z Sin[t]}]},
      PlotRange -> {{0, 4Pi}, {-1.05, 1.05}, {-1.05z, 1.05z}}, 
      ImageSize -> 800, Boxed -> False], {t, 0, 4Pi, Pi/16}], "GIF"]

I searched newsgroup postings and Wolfram and didn't find any mention
of such behavior.  I presume this is a bug in the gif export code.

If anyone can confirm that this is a bug and that it has been fixed
that would be good.  If anyone can describe a dependable workaround
for the moment that would be even better, waiting a good part of
an hour for an animation to grind out and then discovering that it
is another "black cat in a dark room" is getting a little old.

Thank you



  • Prev by Date: RE: Re: Re: Lower Floor
  • Next by Date: Re: Fixing the legend
  • Previous by thread: Text scaling in graphics
  • Next by thread: Re: Export Gif animation bug?