I've been searching all around the "Documentation Center" and other forums and just can't get to solve this issue. I'd like to dynamically locate a point (get it's coordinates) inside a Manipulate. This point is in fact a function of another parameter (hence the Manipulate).
Here's the setup. First I create the functions that will provide with the points coordinates :
T01[q1_] = {{Cos[q1 Degree], 0, Sin[q1 Degree], 0}, {0, 1, 0,
0}, {-Sin[q1 Degree], 0, Cos[q1 Degree], 0}, {0, 0, 0,
1}}; (*Matrice de passage de R0 à R1*)
T12[q2_, l1_] = {{Cos[q2 Degree], 0, Sin[q2 Degree], 0}, {0, 1, 0,
0}, {-Sin[q2 Degree], 0, Cos[q2 Degree], -l1}, {0, 0, 0,
1}}; (*Matrice de passage de R1 à R2*)
T02[q1_, q2_, l1_] =
T01[q1].T12[q2, l1]; (*Matrice de passage de R0 à R2*)
E2[l2_] = {0, 0, -l2, 1}; (*position de l'effecteur dans le repère R2*)
E0[q1_, q2_, l1_, l2_] =
T02[q1, q2, l1].E2[l2]; (*position de l'effecteur dans R0*)
O22 = {0, 0, 0, 1};(*position du centre articulaire O2 dans R2*)
O20[q1_, q2_, l1_] = T02[q1, q2, l1].O22;(*position de 02 dans R0*)
O11 = {0, 0, 0, 1};(*position de O1 dans R1*)
O10[q1_, q2_] = T01[q1].O11;(*position de O1 dans R0*)
I'm in fact interested in showing the $E_0$ coordinates dynamically if possible inside the manipulate window...
So then I create the Manipulate environment which shows a double pendulum parameterized by the $q_1$ and $q_2$ variables :
Manipulate[
ListLinePlot[
{
{O10[q1, q2][[1]], O10[q1, q2][[3]]}, {O20[q1, q2, 400][[1]],
O20[q1, q2, 400][[3]]}, {E0[q1, q2, 400, 300][[1]],
E0[q1, q2, 400, 300][[3]]}
}, PlotRange -> {{-710, 710}, {-710, 710}},
AspectRatio -> Automatic, PlotMarkers -> Automatic, Ticks -> None
], {{q1, 5, "\!\(\*SubscriptBox[\(q\), \(1\)]\)"}, -170,
170}, {{q2, 5, "\!\(\*SubscriptBox[\(q\), \(2\)]\)"}, -170, 170}
]
I tried the Locator function without success, also I tried the Dynamic function but I just couldn't get to make it work for the $E_0$ variable...
Does anybody has any idea that might help?
Thanks in advance.