Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.soft-sys.math.mathematica > #4192 > unrolled thread
| Started by | Gregory Lypny <gregory.lypny@videotron.ca> |
|---|---|
| First post | 2011-08-06 06:15 +0000 |
| Last post | 2011-08-07 10:19 +0000 |
| Articles | 2 — 2 participants |
Back to article view | Back to comp.soft-sys.math.mathematica
Can a Locator be Made to Track a Curve? Gregory Lypny <gregory.lypny@videotron.ca> - 2011-08-06 06:15 +0000
Re: Can a Locator be Made to Track a Curve? "Oleksandr Rasputinov" <oleksandr_rasputinov@hmamail.com> - 2011-08-07 10:19 +0000
| From | Gregory Lypny <gregory.lypny@videotron.ca> |
|---|---|
| Date | 2011-08-06 06:15 +0000 |
| Subject | Can a Locator be Made to Track a Curve? |
| Message-ID | <j1im6k$co2$1@smc.vnet.net> |
Hello everyone, Can a locator be constrained so that it tracks a curve? Regards, Gregory
[toc] | [next] | [standalone]
| From | "Oleksandr Rasputinov" <oleksandr_rasputinov@hmamail.com> |
|---|---|
| Date | 2011-08-07 10:19 +0000 |
| Message-ID | <j1los8$nnv$1@smc.vnet.net> |
| In reply to | #4192 |
On Sat, 06 Aug 2011 07:15:48 +0100, Gregory Lypny
<gregory.lypny@videotron.ca> wrote:
> Hello everyone,
>
> Can a locator be constrained so that it tracks a curve?
>
> Regards,
>
> Gregory
>
Yes:
f = Sin;
DynamicModule[{p = {0, f[0]}},
Show[{
Plot[f[x], {x, -Pi, Pi}],
Graphics@
Locator@Dynamic[
p, (p = Through@{First, Composition[f, First]}@#) &]
}]
]
[toc] | [prev] | [standalone]
Back to top | Article view | comp.soft-sys.math.mathematica
csiph-web