1
$\begingroup$

I need to create an animated gif for the following function.

rx1=((-T ω Cos[T ω] + Sin[T ω]))/(2ω^2)
ry1=(-2 + 2 Cos[T ω] + T ω Sin[T ω])/(2ω^2)
pulsefrequency=200000*π; τpulse1= 20*10^-6;

When I use

   Animate[
  Show[ParametricPlot[{rx1, ry1}/. ω -> pulsefrequency, 
  {T,0,u},PlotStyle -> {Thick, Red}],
   Graphics[
   {Blue, PointSize[0.02], 
    Point[{rx1, ry1}  /. ω -> 
          pulsefrequency /. T -> u]}]], 
   {u, 0, τpulse1}, AnimationRepetitions -> 1]

It works well but when for getting an animated gif, I replace Animate command with Table and then it ceases to work

Table[ Show[
ParametricPlot[{rx1, ry1}  /. ω -> pulsefrequency, {T, 0, u /. u -> s}, AspectRatio -> 1, PlotRange -> {{-0.010, 0.010}, {-0.010, 0.010}}, Background -> RGBColor[100.0, 100.0, 100.0]],Graphics[{PointSize[.025], Hue[0], Point[{rx1, ry1}  /. ω -> pulsefrequency  /. T -> s]}]] , {s, 0, τpulse1, τpulse1/10}]

The output that I recieve is

{Show[ParametricPlot[{rx1, ry1} /. E0 -> pulseamp /. ω -> 
   pulsefrequency /. m -> mass /. q -> charge, {T, 0, 
u /. u -> s}, AspectRatio -> 1, PlotRange -> {{-0.01, 0.01}, {-0.01, 0.01}}, Background -> RGBColor[100., 100., 100.]], \!\(\*GraphicsBox[{Hue[0], PointSize[0.025], PointBox[{0., 0.}]}]\)], **followed by the list of the images** 

I have spend hours to figure out how to just get the animated image rather than the command. I am not sure whats going wrong. Any help would be appreciated.

Regards

$\endgroup$
1
  • $\begingroup$ Welcome to Mathematica.SE! I suggest the following: 1) As you receive help, try to give it too, by answering questions in your area of expertise. 2) Read the faq! 3) When you see good questions and answers, vote them up by clicking the gray triangles, because the credibility of the system is based on the reputation gained by users sharing their knowledge. Also, please remember to accept the answer, if any, that solves your problem, by clicking the checkmark sign! $\endgroup$ Sep 7, 2014 at 15:10

1 Answer 1

7
$\begingroup$

I believe the issue relates to increment size., e.g.

   an = Table[
   Show[ParametricPlot[{rx1, ry1} /. \[Omega] -> pulsefrequency, {T, 
      0, u}, PlotStyle -> {Thick, Red}], 
    Graphics[{Blue, PointSize[0.02], 
      Point[{rx1, ry1} /. \[Omega] -> pulsefrequency /. T -> u]}], 
    PlotRange -> {{-1.5 10^-11, 1.4 10^-11}, {-1.6  10^-11, 
       10^-11}}], {u, 10^-6, \[Tau]pulse1, 10^-7}];

enter image description here

You can modify gif as required. The above was just exported as gif.

$\endgroup$
1
  • $\begingroup$ Many thanks ubpdqn. U solved my problem $\endgroup$
    – AkS
    Sep 7, 2014 at 14:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.