Animating a Rocket Trajectory

ClearAll["Global`*"];

g=9.8;(* gravitational acceleration in m/(s^2)*)
len=3; (* length of rocket in meters. Be Careful! If vo is too slow or len is too big, it won't even travel one rocket length! *)
v0=20; (* initial speed in m/s*)
θ0=50.0 (π/180); (* initial angle in degrees, and converted to radians *)
height = ((((v0 Sin[θ0]))^2)/(2 g));  (* A Basic Physics 1 formula using v0, g, and θ0 *)
range=XXXXXXXXXX; (* Aonther Basic Physics 1 formula *)
duration=XXXXXXXXXX; (* Another Basic Physics 1 formula *)
x[t_]:=XXXXXXXXXX; (* Another Basic Physics 1 formula *)
y[t_]:=v0 Sin[θ0]t - (1/2)g (t^2); (* Another Basic Physics 1 formula *)
θ[t_]:=XXXXXXXXXX[v0 Cos[θ0],v0 Sin[θ0]-g t];  (* Another Basic Physics 1 formula *)
xpoints=len{-0.5, 0.5, 0.65, 0.5, -0.5, -0.5};  (* x coordinates of rocket drawing when rocket is horizontal *)
ypoints=len{-0.1, -0.1, 0, 0.1, 0.1, -0.1}; (* y coordinates of rocket drawing when rocket is horizontal *)
ListPlot[Table[{xpoints[[i]],ypoints[[i]]},{i,1,6}],Joined->True,PlotRange->{{-2,2},{-2,2}}] (* show rocket drawing alone *)

xnew[t_]:=xpoints Cos[θ[t]] - ypoints Sin[θ[t]]; (* this applies a rotation to the rocket's x-coordinates *)
ynew[t_]:=xpoints Sin[θ[t]] + ypoints Cos[θ[t]]; (* this applies a rotation to the rocket's y-coordinates *)
line0 = {Thick,Green,Line[{{0,0},{range,0}}]}; (* This is the ground *)
line1[t_]:= {Thin,Blue,Line[{{xnew[t][[1]]+x[t],ynew[t][[1]]+y[t]},{xnew[t][[2]]+x[t],ynew[t][[2]]+y[t]}}]}; 
line2[t_]:= {Thin,Blue,Line[{{xnew[t][[2]]+x[t],ynew[t][[2]]+y[t]},{xnew[t][[3]]+x[t],ynew[t][[3]]+y[t]}}]}; 
line3[t_]:= XXXXXXXXXX; 
line4[t_]:= XXXXXXXXXX ;
line5[t_]:= XXXXXXXXXX;
lines[t_]:={line0,line1[t],line2[t],line3[t],line4[t],line5[t]}

trajectory[tmax_]:=Animate[Graphics[{lines[t]},Frame->False, PlotRange ->{{-.1 range,1.2 range},{-.1 height,1.2 height}}],{t,0,tmax},AnimationRate->(duration/2)]

(* First, make something we can see directly *)
trajplot=trajectory[duration] (* show the animation *)

(* next, save this to a movie file *)
movietraj[t1_]:=Graphics[{lines[t]},Frame->False, PlotRange ->{{-.1 range,1.2 range},{-.1 height,1.2 height}}]
myframes=Table[movietraj[t],{t,0,duration,(duration/100)}];
path = "C:\\Users\\pogo\\Desktop\\MMA\\rocket.gif";
(* You'll obviously need to put in a path that's appropriate to your own computer!! *)
Export[path,myframes];