Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2007
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2007

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

Search the Archive

Re: forming continuous "trail" with Locator

  • To: mathgroup at smc.vnet.net
  • Subject: [mg79863] Re: forming continuous "trail" with Locator
  • From: markholtuk at googlemail.com
  • Date: Tue, 7 Aug 2007 01:30:51 -0400 (EDT)
  • References: <f96jsd$qh3$1@smc.vnet.net>

Hi Murray,
Does this do what you want?:

list = {};
Manipulate[{AppendTo[list, pnt];
  LocatorPane[
   Dynamic[pnt], {Graphics[{{Gray, Disk[{32, 32}, 32]},
      Dynamic[{Hue[0], Point /@ DeleteCases[list, Null]}]}]}],
  FinishDynamic[]}, {pnt}]

- sorry about the Null next to the graphic - not sure why it's there!

To plot the trace afterwards:

ListPlot[DeleteCases[list, Null], Joined -> True, PlotRange -> All,
 AspectRatio -> Automatic]

On Aug 6, 8:50 am, Murray Eisenberg <mur... at math.umass.edu> wrote:
> Is there some way in Mathematica 6 to use a Locator so as to create a
> continuous-appearing "trail" after you click and then drag the cursor
> around?
>
> Of course one could write code allowing addition of points through
> successive clicks, and then one could try to click repeatedly on
> successive points very near one another, but that could get very tedious.
>
> I mean the sort of thing one gets in drawing programs (and with the
> Mathematica 6 2D Drawing Tools).
>
> --
> Murray Eisenberg                     mur... at math.umass.edu
> Mathematics & Statistics Dept.
> Lederle Graduate Research Tower      phone 413 549-1020 (H)
> University of Massachusetts                413 545-2859 (W)
> 710 North Pleasant Street            fax   413 545-1801
> Amherst, MA 01003-9305

Best wishes,

Mark
___________________
Mark R. Holt, BA, PhD
Cardiovascular Division and
Randall Division of Cell and Molecular Biophysics
New Hunt's House
King's College London
Guy's Hospital Campus
LONDON, U.K., SE1 1UL
Phone: +44 20 7848 6438
Fax:     +44 20 7848 6435




  • Prev by Date: Re: Convective diffusion equation in 2D
  • Next by Date: web Mathematica installation problem
  • Previous by thread: Re: forming continuous "trail" with Locator
  • Next by thread: Re: forming continuous "trail" with Locator