Problem using a table with Dynamic variables
- To: mathgroup at smc.vnet.net
- Subject: [mg118699] Problem using a table with Dynamic variables
- From: "Christopher O. Young" <cy56 at comcast.net>
- Date: Sat, 7 May 2011 07:35:09 -0400 (EDT)
Do I have to use "With" or something like that to access the "k" iteration
variable for the Table of Locators?
GraphicsGrid[
{
{
"Z-coordinate",
"Radius"
},
{
Slider[Dynamic[h], {-2, 2, 0.25}, Appearance -> "Labeled"],
Slider[Dynamic[r], {0, 1, 0.25}, Appearance -> "Labeled"]
},
{
Graphics[
Table[Locator[Dynamic[\[ScriptCapitalP][[j]]]], {j, 1, 4}],
PlotRange -> 5,
Frame -> True,
Axes -> True
],
Dynamic[
Graphics3D[
{
Sphere[{\[ScriptCapitalP][[1, 1]],\[ScriptCapitalP][[1, 2]],
h}, r],
Sphere[{\[ScriptCapitalP][[2, 1]], \[ScriptCapitalP][[2, 2]],
h}, r],
Sphere[{\[ScriptCapitalP][[3, 1]], \[ScriptCapitalP][[3, 2]],
h}, r],
Sphere[{\[ScriptCapitalP][[4, 1]], \[ScriptCapitalP][[4, 2]],
h}, r]
},
PlotRange -> 5,
Axes -> True,
AxesLabel -> {"x", "y", "z"}
]
]
}
},
ItemAspectRatio -> {0.02, 0.025, 1},
Dividers -> {All, {True, False, True, True}},
Spacings -> {20, 20}
]