Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2009

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Manipulate Issue - resend with code

  • To: mathgroup at smc.vnet.net
  • Subject: [mg99675] Re: [mg99610] Manipulate Issue - resend with code
  • From: George Woodrow III <georgevw3 at mac.com>
  • Date: Sun, 10 May 2009 05:21:06 -0400 (EDT)
  • References: <200905090720.DAA29975@smc.vnet.net>

The option to use is PerformanceGoal. By Default, the performance goal  
is set to "Speed" when the control is being manipulated and "Quality"  
when it is not, equivalent to

PerformanceGoal -> ControlActive["Speed", "Quality"]

You can force a manipulate to always go for "Quality" with

PerformanceGoal -> "Quality"

There may be more values for PerformanceGoal, but they are not  
documented.

NOTE: the option goes with the Function, not the Manipulate:

Manipulate[
  ContourPlot[
   q1/Norm[{x, y} - p[[1]]] + q2/Norm[{x, y} - p[[2]]], {x, -2,
    2}, {y, -2, 2}, Contours -> 10,
   PerformanceGoal -> "Quality"], {{q1, -1}, -3, 3}, {{q2, 1}, -3,
   3}, {{p, {{-1, 0}, {1, 0}}}, {-1, -1}, {1, 1}, Locator},
  Deployed -> True]

In this case, the Performance Goal is an option for ContourPlot, NOT  
Manipulate.

You can also use ControlActive[] to specify other parameters that are  
used used when the control is being manipulated or not. By default,  
Mathematica will make a low-res image with the control is moving, but  
you can override at the cost of some loss of responsiveness.

You could, for example, set the number of PlotPoints to a low number  
when scrubbing a slider, and a high value when the slider stops. The  
Documentation Center has examples.

The same goes for an animation sequence.

george woodrow


On May 9, 2009, at 3:20 AM, Kevin J. McCann wrote:

> Below is the "Neat Example" from the Manipulate Help. My issue is that
> when one of the charges is dragged around, the contour plot is really
> crummy, i.e. very low res, until you take your finger off the mouse.
> Similarly when the manipulate is allowed to run movie-style. Any ideas
> about how to get this to "look nice"?
>
> Thanks,
>
> Kevin
>
>
> Manipulate[
>  ContourPlot[
>   q1/Norm[{x, y} - p[[1]]] + q2/Norm[{x, y} - p[[2]]], {x, -2,
>    2}, {y, -2, 2}, Contours -> 10], {{q1, -1}, -3, 3}, {{q2, 1}, -3,
>   3}, {{p, {{-1, 0}, {1, 0}}}, {-1, -1}, {1, 1}, Locator},
>  Deployed -> True]
>



  • Prev by Date: Re: math glyphs from non-Mathematica font
  • Next by Date: Re: Re: TraditionForm Appears to be Inconsistent
  • Previous by thread: Manipulate Issue - resend with code
  • Next by thread: Re: Manipulate Issue - resend with code