Services & Resources / Wolfram Forums
MathGroup Archive
*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
  • Subject: [mg79863] Re: forming continuous "trail" with Locator
  • From: markholtuk at
  • Date: Tue, 7 Aug 2007 01:30:51 -0400 (EDT)
  • References: <f96jsd$qh3$>

Hi Murray,
Does this do what you want?:

list = {};
Manipulate[{AppendTo[list, pnt];
   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> 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
> 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 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
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