I can't animate this code, what's wrong and how can I write omega, theta,...
If I copy XG1 and YG1 directly in animate it works properly but when I use defined function(XG1 and YG1) it can't works.
ClearAll[L, t, V, θ1]
m1 = 1;
m2 = 1;
I1 = 1;
L1 = 1;
LC1 = L1/2;
R = 0.3;
L2 = 1;
XG1[t_] := +R*Sin[θ1[t]] - LC1*Cos[θ1[t]];
YG1[t_] := -R*Cos[θ1[t]] - LC1*Sin[θ1[t]];
ω1[t_] = D[θ1[t], t];
T1 = 0;
T = 1/2*m1*((D[XG1, t])^2 + (D[YG1, t])^2) + 1/2*I1*ω1^2;
V = m1*g*YG1;
L = T - V;
Eq = D[D[L, θ1'[t]], t] - D[L, θ1[t]] == T1;
ics = {θ1[0] == 0, θ1'[0] == 0};
eqs = Join[{Eq}, ics];
s = First@NDSolve[eqs, {θ1[t], θ1'[t]}, {t, 0, 100}];
Animate[Graphics[{Line[{{0,0},{XG1, YG1}}]}], {t, 0.01, 50}] /. s
Animate
command does not produced anything. $\endgroup$ – zhk Jan 10 '17 at 9:21