Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

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

Dynamic[FAnimated[{p1,p2,etc}]].

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?"

share|improve this question
3  
Can you include your full code in your post, or at least a stripped down version of it that exhibits the behavior? –  Mr.Wizard Mar 19 '12 at 2:23
1  
I 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 Mar 19 '12 at 15:00
    
I'll get some code but it may be a few days before I can do it. I'm a bit busy right now. –  braydenware Mar 19 '12 at 19:20
add comment

1 Answer 1

up vote 3 down vote accepted

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:

screenshots

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.