Mathematica 9 is now available
Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2008

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

Search the Archive

Re: ListAnimate or movie with No AppearanceElements

  • To: mathgroup at smc.vnet.net
  • Subject: [mg89455] Re: ListAnimate or movie with No AppearanceElements
  • From: Albert Retey <awnl at arcor.net>
  • Date: Tue, 10 Jun 2008 03:39:23 -0400 (EDT)
  • References: <g2fuc1$2gl$1@smc.vnet.net>

Hi,

> I wish to show a movie/animation in a notebook, but I do not want any
> of the Mathematica 6 additions showing up.  What I want is just a plain
> flip through the frames without a panel, slider, etc. etc.
> 
> As a self-contained example:
> 
> table = Table[ Plot[ x^n, {x, -5, 5}], {n, 1, 5, 1}];
> Export[$HomeDirectory <>"/table.avi", table];
> movie=Import[$HomeDirectory <> "//table.avi", {"AVI", "Animation"}]
> 
> I have tried playing with AppearanceElements, Panel, Dynamic, etc. but
> no luck.  The best I was able to do was to get the slider to disappear,
> but it left behind a grey frame.
> 
> Does someone have a solution to this seemingly simple problem?

I think the trick is to not import the Animation but only the list of
Graphics-objects, which can be done with:

frames=Import[
 ToFileName[{$HomeDirectory, "Desktop"}, "table.avi"], {"AVI",
  "GraphicsList"}
 ]

then you can make better use of the various functions and mechanism that
are available. The first thing that comes to mind is something like

ListAnimation[frames]

using AnimatorElements->None, but this still has a panel and take ages
on my computer to finish. So I came up with this  minimal low level
animate which you can use as a starting point to build a solution of
your taste:

Print[FlipView[movie, Dynamic[i]]];
Do[i = Mod[k, 5] + 1; Pause[0.25], {k, 1, 5*Length[movie]}]

This seems to be quite fast, at least on my machine and changing the
last line gives you possibilities to control the details of animation
speed, repetitions etc.

hth,

albert


  • Prev by Date: Re: Show and 6.0
  • Next by Date: Re: Major problem with 6.0.2.1
  • Previous by thread: Re: ListAnimate or movie with No AppearanceElements
  • Next by thread: A question about N[...]