# Manipulate showing the trajectory of a particle along a parametric curve

I have a particle which follows a certain trajectory given by rx and ry

rx = E0*q*(-T*w*Cos[T* w] + Sin[T* w])/(2*m*w^2)
ry = E0*q*(-1 + Cos[T*w] + T*w]*Sin[T* w])/(2*m*w^2)


I am able to plot rx and ry but I need to have an animation of a particle (a point) which follows this path from T = 0 to T = 10 microsec. Here is the code.:

Manipulate[
ParametricPlot[{
(E0*q*1.6*10^-19*(-T*ω*Cos[T*ω] + Sin[T*ω]))/(2*m*1.6*10^-27*ω^2),
(E0*q*1.6*10^-19*(-1 + Cos[T*ω] + T*ω*Sin[T*ω]))/(2*m*1.6*10^-27*ω^2)
},
{T, 0, temp},
AxesLabel -> {Row[{Style["rx", Italic], " (cm)"}], Row[{Style["ry", Italic], " (cm)"}]},
PerformanceGoal -> "Quality",
Epilog -> {
PointSize[0.04],
Point[{
(E0*q*1.6*10^-19*(-temp*ω*Cos[temp*ω] + Sin[temp*ω]))/(2*m*1.6*10^-27*ω^2),
(E0*q*1.6*10^-19*(-1 + Cos[temp*ω] + temp*ω*Sin[temp*ω]))/(2*m*1.6*10^-27*ω^2)
}]
}],
Style["horizontal", Bold],
{{m, 1, "mass"}, 1, 4, 1, ImageSize -> Tiny, Appearance -> "Labeled"},
{{ω, 200*2*π*1000, "frequency"}, 200*2*π*1000, 400*2*π*1000, 1*2*π*1000,
ImageSize -> Tiny, Appearance -> "Labeled"},
{{E0, 40, "amplitude"}, 40, 80, 1, ImageSize -> Tiny, Appearance -> "Labeled"},
{{q, 1, "charge"}, 1, 7, 1, ImageSize -> Tiny, Appearance -> "Labeled"},
Delimiter,
{{temp, 1*10^-6, "pulselength"}, 10^10 - 6, 20*10^-6, 10*10^-6, ControlType -> Trigger},
ControlPlacement -> Left]


Any help will be appreciated.

• There is are syntax errors in your code. Aug 9, 2013 at 15:03
• Dear @Akansha Sehgal Please, can you correct the code above? It is not working when pasting in MMA. Aug 9, 2013 at 15:07
• I fixed the code so it runs. Looks like the OP needs to fix the size of the image to keep it from jumping around. Aug 9, 2013 at 15:46
• I changed {{temp, 1*10^-6, "pulselength"}, 10^10 - 6, 20*10^-6, 10*10^-6, ControlType -> Trigger} to {{temp, 1*10^-6, "pulselength"}, 10*10^-6, 20*10^-6, 10^-6, ControlType -> Trigger}. This produces what might be the animation the OP is looking for. Not sure because I don't understand the OP's physics. Aug 9, 2013 at 22:02

I haven't looked at your code closely, but perhaps you can use the following approach:

Manipulate[
ParametricPlot[
{4 Sin[t] Cos[t], 3 Cos[t]},
{t, 0, 2 Pi},
PerformanceGoal -> "Quality",
Epilog -> {Red,
PointSize -> .05,
Point[{4 Sin[anotherT] Cos[anotherT], 3 Cos[anotherT]}]}],
{{anotherT, 0}, 0, 2 Pi, Pi/64,
ControlType -> Trigger}
] • @AkanshaSehgal So when are you getting back to us? Dec 5, 2015 at 2:16