Skip to main content
Tweeted twitter.com/StackMma/status/1206589978811228160
Became Hot Network Question
Formatted code, special characters, tags
Source Link
MarcoB
  • 67.7k
  • 18
  • 96
  • 198

Create a gifsGIF from the animationanimated plots

ss1 = NDSolve[{x'[
  t]x'[t] == (1 - (x[t]^2 + y[t]^2))*x[t] + \[Omega][t]*y[t]ω[t]*y[t] + 
  1.3*Sin[11*t], 
               y'[t] == (1 - (x[t]^2 + y[t]^2))*y[t] - \[Omega][t]*ω[t]*x[t],
   x[t], \[Omega]'[t] == 
          ω'[t] == 1.3*Sin[11*t]*y[t]/(Sqrt[x[t]^2 + y[t]^2]), 
               x[0] == 1, 
 y[0] == 0, \[Omega][0]ω[0] == 2}, {x, y, \[Omega]ω}, {t, 0, 200*Pi}];
Animate[Show[Animate[
ParametricPlot[Evaluate[  Show[
    ParametricPlot[
      Evaluate[{x[t], y[t]} /. ss1], {t, tmax - 1, tmax}, 
      PlotStyle -> {Thick, Green}, PlotRange -> 1.4, AspectRatio -> 1, 
      PerformanceGoal -> "Quality"]"Quality"
    ], 
    Graphics[{PointSize[.03], Red, Point@{x[tmax], y[tmax]} /. ss1}, 
 PlotRange -> 1.4], 
ParametricPlot[Evaluate[    ParametricPlot[
      Evaluate[{x[t], y[t]} /. ss1], {t, 626, 200*Pi}, 
      PlotRange -> 1.2, PlotStyle -> {Thick, Orange}, 
      ImageSize -> Medium, Frame -> True, 
      FrameLabel -> {{Style["V", Bold], None}, {Style["X", Bold], 
  None}}]]
    ]
  ], 
  {tmax, 1, 200*Pi}, DefaultDuration -> 200 \[Pi]π, 
 AnimationRate -> 0.03]03
]

I would like to export my animation as the gifsa GIF (a good visualization for presentation), while. I tried a lot of different ways of making it work, but unfortunately I could not make it. any help from anyone will be very grateful.

Create a gifs from the animation plots

ss1 = NDSolve[{x'[
  t] == (1 - (x[t]^2 + y[t]^2))*x[t] + \[Omega][t]*y[t] + 
  1.3*Sin[11*t], 
y'[t] == (1 - (x[t]^2 + y[t]^2))*y[t] - \[Omega][t]*
   x[t], \[Omega]'[t] == 
  1.3*Sin[11*t]*y[t]/(Sqrt[x[t]^2 + y[t]^2]), x[0] == 1, 
 y[0] == 0, \[Omega][0] == 2}, {x, y, \[Omega]}, {t, 0, 200*Pi}];
Animate[Show[
ParametricPlot[Evaluate[{x[t], y[t]} /. ss1], {t, tmax - 1, tmax}, 
PlotStyle -> {Thick, Green}, PlotRange -> 1.4, AspectRatio -> 1, 
PerformanceGoal -> "Quality"], 
Graphics[{PointSize[.03], Red, Point@{x[tmax], y[tmax]} /. ss1}, 
 PlotRange -> 1.4], 
ParametricPlot[Evaluate[{x[t], y[t]} /. ss1], {t, 626, 200*Pi}, 
PlotRange -> 1.2, PlotStyle -> {Thick, Orange}, 
ImageSize -> Medium, Frame -> True, 
FrameLabel -> {{Style["V", Bold], None}, {Style["X", Bold], 
  None}}]], {tmax, 1, 200*Pi}, DefaultDuration -> 200 \[Pi], 
 AnimationRate -> 0.03]

I would like to export my animation as the gifs(a good visualization for presentation), while I tried a lot of different ways of making it work, unfortunately I could not make it. any help from anyone will be very grateful.

Create a GIF from animated plots

ss1 = NDSolve[{x'[t] == (1 - (x[t]^2 + y[t]^2))*x[t] + ω[t]*y[t] + 1.3*Sin[11*t], 
               y'[t] == (1 - (x[t]^2 + y[t]^2))*y[t] - ω[t]*x[t],
               ω'[t] == 1.3*Sin[11*t]*y[t]/(Sqrt[x[t]^2 + y[t]^2]), 
               x[0] == 1, y[0] == 0, ω[0] == 2}, {x, y, ω}, {t, 0, 200*Pi}];
Animate[
  Show[
    ParametricPlot[
      Evaluate[{x[t], y[t]} /. ss1], {t, tmax - 1, tmax}, 
      PlotStyle -> {Thick, Green}, PlotRange -> 1.4, AspectRatio -> 1, 
      PerformanceGoal -> "Quality"
    ], 
    Graphics[{PointSize[.03], Red, Point@{x[tmax], y[tmax]} /. ss1}, PlotRange -> 1.4], 
    ParametricPlot[
      Evaluate[{x[t], y[t]} /. ss1], {t, 626, 200*Pi}, 
      PlotRange -> 1.2, PlotStyle -> {Thick, Orange}, 
      ImageSize -> Medium, Frame -> True, 
      FrameLabel -> {{Style["V", Bold], None}, {Style["X", Bold], None}}
    ]
  ], 
  {tmax, 1, 200*Pi}, DefaultDuration -> 200 π, AnimationRate -> 0.03
]

I would like to export my animation as a GIF (a good visualization for presentation). I tried a lot of different ways of making it work but unfortunately I could not make it.

Source Link

Create a gifs from the animation plots

ss1 = NDSolve[{x'[
  t] == (1 - (x[t]^2 + y[t]^2))*x[t] + \[Omega][t]*y[t] + 
  1.3*Sin[11*t], 
y'[t] == (1 - (x[t]^2 + y[t]^2))*y[t] - \[Omega][t]*
   x[t], \[Omega]'[t] == 
 1.3*Sin[11*t]*y[t]/(Sqrt[x[t]^2 + y[t]^2]), x[0] == 1, 
y[0] == 0, \[Omega][0] == 2}, {x, y, \[Omega]}, {t, 0, 200*Pi}];
Animate[Show[
ParametricPlot[Evaluate[{x[t], y[t]} /. ss1], {t, tmax - 1, tmax}, 
PlotStyle -> {Thick, Green}, PlotRange -> 1.4, AspectRatio -> 1, 
PerformanceGoal -> "Quality"], 
Graphics[{PointSize[.03], Red, Point@{x[tmax], y[tmax]} /. ss1}, 
PlotRange -> 1.4], 
ParametricPlot[Evaluate[{x[t], y[t]} /. ss1], {t, 626, 200*Pi}, 
PlotRange -> 1.2, PlotStyle -> {Thick, Orange}, 
ImageSize -> Medium, Frame -> True, 
FrameLabel -> {{Style["V", Bold], None}, {Style["X", Bold], 
  None}}]], {tmax, 1, 200*Pi}, DefaultDuration -> 200 \[Pi], 
AnimationRate -> 0.03]

I would like to export my animation as the gifs(a good visualization for presentation), while I tried a lot of different ways of making it work, unfortunately I could not make it. any help from anyone will be very grateful.