Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #8782 > unrolled thread

Disabling ContourPlot updating in Manipulate and Show commands

Started byGalen Craven <gcraven98@gmail.com>
First post2012-02-29 12:23 +0000
Last post2012-03-01 10:35 +0000
Articles 2 — 2 participants

Back to article view | Back to comp.soft-sys.math.mathematica


Contents

  Disabling ContourPlot updating in Manipulate and Show commands Galen Craven <gcraven98@gmail.com> - 2012-02-29 12:23 +0000
    Re: Disabling ContourPlot updating in Manipulate and Show commands Alan <alan.isaac@gmail.com> - 2012-03-01 10:35 +0000

#8782 — Disabling ContourPlot updating in Manipulate and Show commands

FromGalen Craven <gcraven98@gmail.com>
Date2012-02-29 12:23 +0000
SubjectDisabling ContourPlot updating in Manipulate and Show commands
Message-ID<jil5cf$rmh$1@smc.vnet.net>
In the below example, I would like to stop updating of the ContourPlot
when moving the T variable slider while still updating the
ParametricPlot. The ContourPlot does not depend on the T variable, but
it still updates whenever the slider is moved continuously or when the
slider is automated by pushing play. Does anyone know how to do this?
Thanks.

Manipulate[
 system = {m Q1''[t] == MBderQ1, m Q2''[t] == MBderQ2};
 Show[ContourPlot[ MB[Q1, Q2],
   {Q1, -1.5, 1.0}, {Q2, -0.5, 2.0}, Contours -> 15,
   ClippingStyle -> Automatic, FrameTicks -> None],
  ParametricPlot[
   Evaluate[{Q1[t], Q2[t]} /. solution[pt, system], {t, 0, T}],
   AxesLabel -> {Subscript[Q, 1], Subscript[Q, 2]},
   LabelStyle -> Directive[Black, Large], Ticks -> False,
   PerformanceGoal -> "Quality", PlotStyle -> {Red, Thickness[0.001]},
    ImageSize -> {400, 400}]],
 Delimiter,
 {T, 0.001, maxtime},
 {{pt, {{0, 0}}}, {-2, -2}, {2, 2}, Locator},
 Delimiter,
 ControlPlacement -> Left, SynchronousUpdating -> False,
 Initialization :>
  (m = 100; maxtime = 100;
   MB[x_, y_] := -200 Exp[-1 (x - 1)^2 - 10 y^2] -
     100 Exp[-1 x^2 - 10 (y - 0.5)^2] -
     170 Exp[-6.5 (x + 0.5)^2 + 11 (x + 0.5) (y - 1.5) -
        6.5 (y - 1.5)^2] +
     15 Exp[0.7 (x + 1)^2 + 0.6 (x + 1) (y - 1) + 0.7 (y - 1)^2];
   MBderQ1 = -D[MB[Q1[t], Q2[t]], Q1[t]];
   MBderQ2 = -D[MB[Q1[t], Q2[t]], Q2[t]];
   solvesystem[{Q1init_, Q2init_}, localsystem_] :=
    Quiet[NDSolve[
      Join[localsystem, {Q1[0] == Q1init, Q2[0] == Q2init,
        Q1'[0] == 0, Q2'[0] == 0}],
      {Q1, Q2}, {t, 0, maxtime}, MaxSteps -> \[Infinity]]];
   solution[initialpositions_, localsystem_] :=
    Map[solvesystem[#, localsystem] &, initialpositions])]

[toc] | [next] | [standalone]


#8808

FromAlan <alan.isaac@gmail.com>
Date2012-03-01 10:35 +0000
Message-ID<jinjdt$cuu$1@smc.vnet.net>
In reply to#8782
http://reference.wolfram.com/mathematica/ref/ContinuousAction.html

hth,
Alan Isaac

[toc] | [prev] | [standalone]


Back to top | Article view | comp.soft-sys.math.mathematica


csiph-web