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


Groups > comp.soft-sys.math.mathematica > #10205

Re: Slow Locator in Manipulate

From "Kevin J. McCann" <kjm@KevinMcCann.com>
Newsgroups comp.soft-sys.math.mathematica
Subject Re: Slow Locator in Manipulate
Date 2012-05-25 08:59 +0000
Organization Steven M. Christensen and Associates, Inc and MathTensor, Inc.
Message-ID <jpnhm3$qbi$1@smc.vnet.net> (permalink)
References <jpi3lf$4rt$1@smc.vnet.net>

Show all headers | View raw


Thanks to David Park, E. Martin-Serrano, and Fred Simons for responses.

The work around for this seems to be to use a Rasterized image of the 
figure. It is not at all clear to me why this should be more CPU 
efficient, but there is little or no documentation that helps. A lengthy 
tutorial with examples on how Dynamic and its relatives work with 
graphical output would be a big plus.

Kevin

On 5/23/2012 3:29 AM, Kevin J. McCann wrote:
> The following is a simple example of the use of a Locator on a graphic:
>
> p1 = ContourPlot[
>      Sin[x y], {x, -3 \[Pi], 3 \[Pi]}, {y, -3 \[Pi], 3 \[Pi]},
>      ContourShading ->  False];
>
> Manipulate[
>    Show[p1, Graphics[{Red, AbsolutePointSize[5], Dynamic@Point[pt1]}],
>     PlotRange ->  {{-3 \[Pi], 3 \[Pi]}, {-3 \[Pi], 3 \[Pi]}}],
>    {{pt1, {0, 0}}, {-3 \[Pi], -3 \[Pi]}, {3 \[Pi], 3 \[Pi]}, Locator}
>
>    ]
>
> I find that the Locator moves slowly and in a jerky fashion; however, if
> I leave the underlying plot, i.e. p1, out of the Show, then it moves as
> I would expect. I had thought the use of Dynamic on the Point would keep
> Mathematica from constantly redrawing the graphic, but my guess is that the
> slowness indicates this is not the case.
>
> Anyone have an idea about how to make the locator move faster?
>
> Thanks,
>
> Kevin
>

Back to comp.soft-sys.math.mathematica | Previous | Next — Previous in thread | Find similar | Unroll thread


Thread

Slow Locator in Manipulate "Kevin J. McCann" <kjm@KevinMcCann.com> - 2012-05-23 07:29 +0000
  Re: Slow Locator in Manipulate "Kevin J. McCann" <kjm@KevinMcCann.com> - 2012-05-25 08:59 +0000

csiph-web