| Author |
Comment/Response |
Ali
|
01/29/11 09:57am
Hi there,
Is there any way to define pure functions in an array or table or anything that will make it easier that writing them one by one.
More specifically I am trying to get bunch of Dynamic items without having to write all of them, e.g.:
pt = {{0, 1}, {0, 0.5}, {0, 0.25}}
Graphics[{Circle[{0, 0}, 1],
Locator[Dynamic[pt[[1]], (pt[[1]] = Normalize[#]) &]],
Circle[{0, 0}, 1/2],
Locator[Dynamic[pt[[2]], (pt[[2]] = Normalize[#]/2) &]],
Circle[{0, 0}, 1/4],
Locator[Dynamic[pt[[3]], (pt[[3]] = Normalize[#]/4) &]]},
PlotRange -> 2]
Many thanks,
URL: , |
|