Re: Mathematica Animation Drives Me Crazy!

• To: mathgroup at smc.vnet.net
• Subject: [mg95681] Re: [mg95604] Mathematica Animation Drives Me Crazy!
• From: "David Park" <djmpark at comcast.net>
• Date: Sat, 24 Jan 2009 06:22:36 -0500 (EST)
• References: <15010445.1232628718537.JavaMail.root@m02>

```This may be a platform dependent problem. In any case, I'm working on a
32-bit Windows Vista, Version 7.

Here are some typical results of repeated Trigger activation (Trigger
controls omitted) with the first form of the Trigger example:

Module[{n = 0, nevals = 0, nlist = {}, calcnevals},
calcnevals[] :=
If[n == 0, nevals = 1; nlist = {n}, nevals = nevals + 1;
nlist = Append[nlist, n]];
{Trigger[Dynamic[n, (n = #; calcnevals[]) &], {0, 10, 1}],
Dynamic[n], Dynamic[nevals], Dynamic[nlist]}]

4,10,{0,1,1,1,2,2,2,3,3,4}
10,23,{0,1,1,1,2,2,2,3,3,3,3,4,4,4,5,6,7,7,8,8,9,10,10}
10,13,{0,1,2,3,4,5,6,7,8,9,9,10,10}
10,12,{0,1,2,3,4,5,6,7,8,9,10,10}
10,15,{0,1,1,2,3,4,5,6,7,7,8,8,9,10,10}
1,2,{0,1}

Notice that in the first and last case the animation 'froze' at n = 4 and n
= 1. The first number is the last value of n, the second number is the
number of values that were actually produced (it should be equal to 11) and
the third item is the list of values produced, which should be
{0,1,2,3,4,5,6,7,8,9,10}.

I would be very thankful if users on Windows Vista could try this out.

David Park
djmpark at comcast.net
http://home.comcast.net/~djmpark/

From: David Park [mailto:djmpark at comcast.net]

I have never ending problems with Mathematica animation since Version 6.
This takes the forms:

1) Sometimes (maybe about 10% if the time) an animation will 'stick' without
finishing or repeating.

2) It does not seem possible to control the actual number of points or
evaluations in the animation.

3) The documentation for the control of timing and precise steps is quite
poor and this may be a reflection of actual buggy animation routines.

Here is an example using Trigger, which is a kind of once-through animation.
I am using an integer range, 0 to 10 in steps of 1. I would therefore like
to have exactly 11 evaluations. But I always get an extra evaluation at the
end, and even worse I often obtain repeat evaluations for some intermediate
value. The following displays the value of n, the number of evaluations, and
the actual list of n values for the evaluations.

Module[{n = 0, nevals = 0, nlist = {}, calcnevals},

calcnevals[] :=

If[n == 0, nevals = 1; nlist = {n}, nevals = nevals + 1;

nlist = Append[nlist, n]];

{Trigger[Dynamic[n, (n = #; calcnevals[]) &], {0, 10, 1}],

Dynamic[n], Dynamic[nevals], Dynamic[nlist]}

]

The following uses DisplayAllSteps -> True but seems to have the same
problem.

Module[{n = 0, nevals = 0, nlist = {}, calcnevals},

calcnevals[] :=

If[n == 0, nevals = 1; nlist = {n}, nevals = nevals + 1;

nlist = Append[nlist, n]];

{Trigger[Dynamic[n, (n = #; calcnevals[]) &], {0, 10, 1},

DisplayAllSteps -> True],

Dynamic[n], Dynamic[nevals], Dynamic[nlist]}

]

Do other users see these kind of problems, especially repeat evaluations for
some values of n?

David Park

djmpark at comcast.net

<http://home.comcast.net/~djmpark> http://home.comcast.net/~djmpark/

```

• Prev by Date: Re: Re: 0^0 = 1?
• Next by Date: Re: Basic questions on list manipulation in the
• Previous by thread: Re: Mathematica Animation Drives Me Crazy!
• Next by thread: Re: Mathematica Animation Drives Me Crazy!