I'm trying to plot the trajectory of a particle:
Vx = 741.61;
ay = 9.81;
Sx[t_] = Vx * t;
Sy[t_] = 1.5 - 1/2 * ay * t^2;
Vy[t_] = -ay * t;
Sy2[x_] = Sy[x/Vx];
Manipulate[
Show[
Graphics[ Arrow[{{Sx[t], Sy[t]}, {Sx[t] + Vx/10, Sy[t]}}],
Axes -> True, PlotRange -> {{0, 500}, {-1, 2}},
AspectRatio -> Full, ImageSize -> {500, 300}],
Graphics[Arrow[{{Sx[t], Sy[t]}, {Sx[t], Sy[t] + Vy[t]/10}}],
Axes -> True, PlotRange -> {{0, 500}, {-1, 2}},
AspectRatio -> Full, ImageSize -> {500, 300}],
Plot[Sy2[x], {x, 0, Sx[0.553]}]
]
, {t, 0, 0.553}]
I would like the plot to be drawn as the projectile flies, but when I replace Plot[Sy2[x], {x, 0, Sx[0.553]}]
with Plot[Sy2[x], {x, 0, Sx[t]}]
Mathematica complains.
How can I change the range of the plot with Manipulate
?