# Plot trajectory of a point using Mathematica

I'm new with Mathematica and I want to make a simple animation to plot the trajectory of a point.

For example, the parameter function is sin(t) and cos(t) and a point starts from (0,1) so that the animation can show the point starts from (0,1) and after time $$2\pi$$ there will be a unit circle.

I don't know how to make such animation. Any help would be appreciated. Thank you!

• What have you tried so far? – user6014 Feb 19 '19 at 5:48
• Animate[Graphics[Circle[{0,0},1,{0,t}],PlotRange->{{-1,1},{-1,1}}],{t,0,2Pi}, AnimationRepetitions->1] Look up each of those words in the help system. Try each of the examples. See which examples have anything like what you want to do. See what functions they use. Look up those functions in the help system. Click on "Details and Options" and study each of the options you can use to modify the function. Try making small changes and see what happens when you modify or remove an option. Then try making something different using what you have learned from this. – Bill Feb 19 '19 at 6:45
• You are looking for something like ParametricPlot[{Sin[t], Cos[t]}, {t, 0, 2 \[Pi]}]. – Carl Lange Feb 19 '19 at 8:29

Such code:

t0 = Pi/2;
Manipulate[
ParametricPlot[{Cos@t, Sin@t}, {t, t0, \[Tau]},
AxesOrigin -> {0, 0},
PlotRange -> {-1.1, 1.1},
Epilog -> {Red, PointSize[0.025],
Point@{Cos@\[Tau], Sin@\[Tau]}}], {\[Tau], 1.000001 t0,
t0 + 2 \[Pi]}] Of course, the Manipulate makes a manually driven animation but changing the code to

t0 = Pi/2;
an = Table[
ParametricPlot[{Cos@t, Sin@t}, {t, t0, \[Tau]},
AxesOrigin -> {0, 0},
PlotRange -> {-1.1, 1.1},
Epilog -> {Red, PointSize[0.025],Point@{Cos@\[Tau], Sin@\[Tau]}}],
{\[Tau], 1.000001 t0,
t0 + 2 \[Pi], \[Pi]/180}];

Export["filepath/filename.gif", an, "DisplayDurations" -> 0.1]


You will have the gif as an uploaded here.

• Thank you so much! – Yifei Xiao Feb 19 '19 at 15:20