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


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

Re: Slow Locator in Manipulate

From "E. Martín-Serrano" <eMartinSerrano@telefonica.net>
Newsgroups comp.soft-sys.math.mathematica
Subject Re: Slow Locator in Manipulate
Date 2012-05-24 07:32 +0000
Organization Steven M. Christensen and Associates, Inc and MathTensor, Inc.
Message-ID <jpko6j$el8$1@smc.vnet.net> (permalink)
References <201205230728.DAA04967@smc.vnet.net>

Show all headers | View raw


Kevin,

I have reported similar problems in several occasions, with the Locator
construct, even outside Manipulate but mostly inside Dynamic constructs. I
guess, and now I insist, on that these problems would be connected to some
underlying design issues in the construct.

Other explanation could be that the documentation for Locator lacks
information about non-explained restrictions on the way it should be used to
avoid unexpected conflicts or behaviors. An  especial and evident case occur
when dealing with Bezier curves, where if you drag a locator (a point in the
control polygon) all  other locators conforming the control polygon  move as
if they were being dragged  too.

To summarize my experience with Locator: as soon as one goes beyond a toy (I
mean, beyond something rather simple), Locator becomes almost useless and 2D
sliders must be used instead.

E. Mart=EDn-Serrano

-----Mensaje original-----
De: Kevin J. McCann [mailto:kjm@KevinMcCann.com]
Enviado el: mi=E9rcoles, 23 de mayo de 2012 9:29
Para: mathgroup@smc.vnet.net
Asunto: Slow Locator in Manipulate

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 | Find similar | Unroll thread


Thread

Re: Slow Locator in Manipulate "E. Martín-Serrano" <eMartinSerrano@telefonica.net> - 2012-05-24 07:32 +0000

csiph-web