Ndsolve solution cant manipulate parametric plot!!
ClearAll[x, y, θ];
L = 1;
v1[t_] := 5 UnitStep[t - 10] - 5 UnitStep[t - 30];
v2[t_] := 4 UnitStep[t - 20] - 4 UnitStep[t - 50];
v3[t_] := 6 UnitStep[t - 50] - 6 UnitStep[t - 80];
eq1 = -2/3*Sin[θ[t]]*v1[t] -
2/3*Sin[Pi/3 - θ[t]]*v2[t] +
2/3*Sin[Pi/3 + θ[t]]*v3[t] - x'[t] == 0;
eq2 = 2/3*Cos[θ[t]]*v1[t] -
2/3*Cos[Pi/3 - θ[t]]*v2[t] -
2/3*Cos[Pi/3 + θ[t]]*v3[t] - y'[t] == 0;
eq3 = 1/3 L*(v1[t] + v2[t] + v3[t]) - θ'[t] == 0;
ics = {x[0] == 1, y[0] == 0, θ[0] == 0};
eqs = Join[{eq1, eq2, eq3}, ics];
sol = First@NDSolve[eqs, {x[t], y[t], θ[t]}, {t, 0, 100}];
Plot[Evaluate[{x[t], y[t], θ[t]} /. sol], {t, 0, 100},
PlotStyle -> {{Thick, Red}, {Thick, Blue, Dashed}, {Thick, Black, Dotted}}]
Manipulate[
Graphics[Rotate[
Rectangle[{Evaluate[{x[a]} /. sol], Evaluate[{y[a]} /. sol]}],
Evaluate[{θ[a]} /. sol]]], {a, 0.1, 100}]
{x[t], y[t], θ[t]}
with{x, y, θ}
inNDSolve
, and get rid of the{}
's surroundingx[a]
,y[a]
, andθ[a]
in yourManipulate
expression. $\endgroup$