In[]:=
time:=21xinital:=0yinital:=0a:=-9.8u:=100Angle:=85ux:=1uy:=1x:=0y:=0t:=0dataset:={}Forstage=1,stage<=time,t++,stage++;uy=u*Sin[AngleDegree]//N;ux=u*Cos[AngleDegree]//N;y=(uy*t)+*a*+yinital;x=(ux*t)+xinital;AppendTo[dataset,{x,y}];Pause[0.01];Echo[y,x];Print["dataset: ",dataset]Print["final coords: ",{x,y}]m:=ListLinePlot[{dataset},PlotRange->All,AspectRatio->1,PlotStyle->Black]b:=Graphics[{PointSize[Medium],Red,Point[dataset]}]Show[m,b]
1
2
2
t
»
0.0.
»
8.7155794.7195
»
17.4311179.639
»
26.1467254.758
»
34.8623320.078
»
43.5779375.597
»
52.2934421.317
»
61.009457.236
»
69.7246483.356
»
78.4402499.675
»
87.1557506.195
»
95.8713502.914
»
104.587489.834
»
113.302466.953
»
122.018434.273
»
130.734391.792
»
139.449339.512
»
148.165277.431
»
156.88205.55
»
165.596123.87
»
174.31132.3894
dataset: {{0.,0.},{8.71557,94.7195},{17.4311,179.639},{26.1467,254.758},{34.8623,320.078},{43.5779,375.597},{52.2934,421.317},{61.009,457.236},{69.7246,483.356},{78.4402,499.675},{87.1557,506.195},{95.8713,502.914},{104.587,489.834},{113.302,466.953},{122.018,434.273},{130.734,391.792},{139.449,339.512},{148.165,277.431},{156.88,205.55},{165.596,123.87},{174.311,32.3894}}
final coords: {174.311,32.3894}
Out[]=