Re: Can a Locator be Made to Track a Curve?
- To: mathgroup at smc.vnet.net
- Subject: [mg120741] Re: Can a Locator be Made to Track a Curve?
- From: DrMajorBob <btreat1 at austin.rr.com>
- Date: Mon, 8 Aug 2011 04:20:59 -0400 (EDT)
- Delivered-to: l-mathgroup@mail-archive0.wolfram.com
- References: <201108060612.CAA13010@smc.vnet.net>
- Reply-to: drmajorbob at yahoo.com
A bit simpler, I think, is: f[x_] := Sin[x]; g[{x_, _}] := {x, f@x} pt = {0, 0}; LocatorPane[Dynamic[pt, (pt = g@#) &], Plot[Sin[x], {x, 0, 2 Pi}]] Bobby On Sun, 07 Aug 2011 05:14:52 -0500, Heike Gramberg <heike.gramberg at gmail.com> wrote: > You could do something like > > f[x_] := Sin[x]; > pt = {0, 0}; > LocatorPane[Dynamic[pt, (pt[[1]] = #[[1]]; pt[[2]] = f[#[[1]]]) &], > Plot[Sin[x], {x, 0, 2 Pi}]] > > Heike > > On 6 Aug 2011, at 08:12, Gregory Lypny wrote: > >> Hello everyone, >> >> Can a locator be constrained so that it tracks a curve? >> >> Regards, >> >> Gregory >> > > -- DrMajorBob at yahoo.com
- Follow-Ups:
- Re: Can a Locator be Made to Track a Curve?
- From: "E. Martin-Serrano" <eMartinSerrano@telefonica.net>
- Re: Can a Locator be Made to Track a Curve?
- References:
- Can a Locator be Made to Track a Curve?
- From: Gregory Lypny <gregory.lypny@videotron.ca>
- Can a Locator be Made to Track a Curve?