MathGroup Archive 2011

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

Search the Archive

Re: One slider for two animations

  • To: mathgroup at smc.vnet.net
  • Subject: [mg120846] Re: One slider for two animations
  • From: Martin Vavpotič <martin.vavpotic at gmail.com>
  • Date: Sat, 13 Aug 2011 06:46:19 -0400 (EDT)
  • Delivered-to: l-mathgroup@mail-archive0.wolfram.com
  • References: <4DE4A630.1080308@iee.lu>

Hello and sorry for not responding earlier.

I have tried what you suggested but I'm afraid there was an error in
understanding the problem. What you suggest gives me two animations that
begin at the same, but they still have separate sliders and I can pause only
one at a time. I need two animations to respond to a single slider so I can
pause them both simultaneously and manipulate the slider through the
interesting area of both animations.

I appreciate your effort.

Martin

2011/5/31 Alexei Boulbitch <alexei.boulbitch at iee.lu>

> Hi, Martin,
>
> It is straightforward. Have a look at the example below:
>
> (* This pre-defines some graphics *)
> x0[t_] := Cos[t/5];
> z[x_, t_] := (x - x0[t])^2*(3 - (x - x0[t]))*0.1*Sin[t];
> t = 10*\[Pi]*i/30;
>
> (* This makes a table of some graphics to be animated on the next step *)
> tab = Table[
>   Show[{Plot[z[x, t], {x, x0[t], 1 + x0[t] - z[1 + x0[t], t]^2},
>      PlotStyle ->  Thickness[0.02],
>      PlotRange ->  {{-1, 2.3}, {-1, 1}}, Frame ->  False,
>      Ticks ->  None, Axes ->  None],
>     Graphics[Disk[{x0[t] + 1, z[x0[t] + 1, t]}, 0.1]]},
>    ImageSize ->  260], {i, 0, 30, 1}];
>
> (* This makes your animation both by Animate and ListAnimate *)
> Row[{
>  Animate[
>   Graphics3D[Rotate[Cuboid[{0, 0, 0}, {1, 1, 1}], 18*i, {1, -1, 0}],
>    ImagePadding ->  All, ImageSize ->  150, PlotRange ->  1.5], {i, 0,
>    30}],
>
>  ListAnimate[tab]
>  }]
>
> I do not know, why do you need the slider running simultaneously, if not
> for beauty. In some cases (say, for a presentation) it may be better without
> any. Consider this:
>
> (* This makes your animation both by Animate and ListAnimate, but \
> without sliders *)
> Row[{
>  Animate[
>   Graphics3D[Rotate[Cuboid[{0, 0, 0}, {1, 1, 1}], 18*i, {1, -1, 0}],
>    ImagePadding ->  All, ImageSize ->  150, PlotRange ->  1.5], {i, 0,
>    30}, AnimatorElements ->  None],
>
>  ListAnimate[tab, AnimatorElements ->  None]
>  }]
>
> You may also remove a panel.
>
> Have fun, Alexei
>
> Hello, everyone.
>
> I have prepared an animation with the function ListAnimate. I also
> have an animated graph that was done with Manipulate. Both animations
> use a slider. I would like to link them in a way to operate both
> animations with a single slider.
>
> Is it possible?
>
> Thanks.
> Martin
>
> --
> Alexei Boulbitch, Dr. habil.
> Senior Scientist
> Material Development
>
> IEE S.A.
> ZAE Weiergewan
> 11, rue Edmond Reuter
> L-5326 CONTERN
> Luxembourg
>
> Tel: +352 2454 2566
> Fax: +352 2454 3566
> Mobile: +49 (0) 151 52 40 66 44
>
> e-mail: alexei.boulbitch at iee.lu
>
> www.iee.lu
>
> --
>
> This e-mail may contain trade secrets or privileged, undisclosed or
> otherwise confidential information. If you are not the intended
> recipient and have received this e-mail in error, you are hereby
> notified that any review, copying or distribution of it is strictly
> prohibited. Please inform us immediately and destroy the original
> transmittal from your system. Thank you for your co-operation.
>
>



  • Prev by Date: Re: Odd glitch opening Mathematica notebook on a Mac
  • Next by Date: Re: NMinimize fails to find a minimum value
  • Previous by thread: Re: Basic questions on _Plus and recursion
  • Next by thread: Build error in windows 7