What changes in Dynamic have occurred from Mathematica 7 to Mathematica 8 that might induce incompatibilities?



I have a function that outputs a Manipulate (say

 FAnimated[params_]:= Manipulate[F[params,t], {Time, Animator[t]}]

where F is some function that takes params and t and makes a plot.

Suppose I make some sliders that control various of the params:

Slider[Dynamic[p1], {3, 7}]

and call


The hope is that the sliders should let me vary parameters in my plots while they run their animation. In Mathematica 7, this works great, and runs very smoothly. In Mathematica 8, the exact same code no longer lets me drag the sliders while the animation is running, and also doesn't let me drag the sliders smoothly even when the animation is paused!

So the question is, "What changes (either in Dynamic functionality or in some options that might possibly be set different by default) might cause this code to break?"


Posted 2012-03-18T23:53:02.417

Reputation: 53

3Can you include your full code in your post, or at least a stripped down version of it that exhibits the behavior? – Mr.Wizard – 2012-03-19T02:23:16.270

1I can also attest to substantial differences in the performance of Dynamic between v7 and v8 -- with v8 coming out poorly. If no-one else chimes in, I'll try to find a minimal example (although it will likely be a few days before I can get to it). – WReach – 2012-03-19T15:00:32.590

I'll get some code but it may be a few days before I can do it. I'm a bit busy right now. – deemaregee – 2012-03-19T19:20:18.040



The following does something similar to OP's parametric manipulate function. It works without issue in version 8.0.4:

    animFunc[Dynamic[freq1_], Dynamic[freq2_]] := Manipulate[
    ParametricPlot[{a1 Sin[freq1 (x + p1)], 
    a2 Cos[freq2 (x + p2)]}, {x, 0, 20 Pi}, PlotRange -> 1, 
    PerformanceGoal -> "Quality"],
    {{a1, 1}, 0, 1, Animator, AnimationRunning -> False}, {p1, 0, 2 Pi,
    Animator, AnimationRunning -> False}, {{a2, 1}, 0, 1, Animator, 
    AnimationRunning -> False}, {p2, 0, 2 Pi, Animator, 
    AnimationRunning -> False}, ControlPlacement -> Top];

Usage example:

    Column[{Slider[Dynamic[y1], {1, 4, .1}], 
    Slider[Dynamic[y2], {1, 4, .1}], animFunc[Dynamic@y1, Dynamic@y2]}]

Screenshots with two different settings:



Posted 2012-03-18T23:53:02.417

Reputation: 302 076