MathGroup Archive 2003

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

Search the Archive

Re: Export Gif animation bug?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg39158] Re: Export Gif animation bug?
  • From: "pr0phet73" <xxxpr0phet73xxx at att.net>
  • Date: Fri, 31 Jan 2003 19:57:15 -0500 (EST)
  • Organization: University of Utah
  • References: <b1dgkm$7en$1@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

Don-

I can confirm that I get similar behavior under Windows 2000 using 4.2.0.
The following partial workaround may be able to get you there, however.

As I investigated the behavior, I found that I could plot up parts of the
full animation without a problem.  For example:

z = 1; test = 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}]

Export["1.gif",Thread[Part[test,Table[i,{i,1,10}]]],"GIF"]

This successfully exports the first 10 frames to an animated GIF.  I tried
the same trick with the threading over the full list, however, and got
garbage out.  If you have an editor like Fireworks, Photoshop, etc, you
should be able to stitch the full animation together.  If anyone knows more
about the inner workings of Export, I also would be interested in what's
going wrong here.

--
M. G. BARTLETT
Note: Remove x's from email address when replying

"Don Taylor" <dont at agora.rdrop.com> wrote in message
news:b1dgkm$7en$1 at smc.vnet.net...
> 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: Export Gif animation bug?
  • Next by Date: question about size...
  • Previous by thread: Re: Export Gif animation bug?
  • Next by thread: Coordinates from an Implicit Plot ?