Re: forming continuous "trail" with Locator
- To: mathgroup at smc.vnet.net
- Subject: [mg79910] Re: forming continuous "trail" with Locator
- From: Mariusz Jankowski <mjankowski at usm.maine.edu>
- Date: Wed, 8 Aug 2007 04:58:50 -0400 (EDT)
- References: <f96jsd$qh3$1@smc.vnet.net> <f990nd$c0s$1@smc.vnet.net>
Mark, you made the first argument of Manipulate a list, the three
elements are AppendTo, LocatorPane, and FinishDynamic. You suppressed
the output of the first and the output of the third is Null - which is
exactly what you see in the Manipulate panel.
Bye, Mariusz
markholtuk at googlemail.com wrote:
> 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
>
>
>