Mathematica Animation Drives Me Crazy!
- To: mathgroup at smc.vnet.net
- Subject: [mg95604] Mathematica Animation Drives Me Crazy!
- From: "David Park" <djmpark at comcast.net>
- Date: Thu, 22 Jan 2009 07:03:27 -0500 (EST)
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/
- Follow-Ups:
- Re: Mathematica Animation Drives Me Crazy!
- From: peter <plindsay.0@gmail.com>
- Re: Mathematica Animation Drives Me Crazy!