0
$\begingroup$

Observe the following Wolfram Mathematica (11) code. Essentially I'm just creating a parametric plot with another parameter a to be varied with time and then animating it to be ten seconds long by exporting 601 .eps images, or frames (the first and last frames identical), meant to be played back at 60FPS (I import all the frames into After Effects).

f1[t_, a_] := {Sin[3*t + a], Tan[t + a]}
f2[t_, a_] := {Sin[Exp[1.3*Sin[t - a]]] - Pi, Tan[t]}
f3[t_, a_] := {-Sin[Exp[1.3*Sin[t - a]]] + Pi, Tan[t]}
f4[t_, a_] := {Sin[2*t - a] + 1.75*Pi, Tan[t] + 1.2*Sin[t]}
f5[t_, a_] := {-Sin[2*t - a] - 1.75*Pi, Tan[t] + 1.2*Sin[t]}
g[a_] := ParametricPlot[{f1[t, a], f2[t, a], f3[t, a], f4[t, a], 
   f5[t, a]}, {t, 0, 2 Pi}, 
  PlotRange -> {{-3 Pi, 3 Pi}, {-1.5 Pi, 1.5 Pi}}, Axes -> False, 
  PlotStyle -> {{Blue, Thickness[0.01]}}]
duration := 600
For[i = 0, i <= duration, i++, 
 Export["out" <> ToString[i] <> ".eps", g[E + 2 Pi*i/duration], 
  ImageResolution -> 600]]

If you run this for yourself, you will see that there are a few frames in which the dimensions are NOT the same as the previous. For example, most of the frames have dimensions 252x180, but out197.eps is 254x180 for some reason. There are several others that aren't the same size as well, such as out255.eps.

Since I'm trying to create an animation out of these frames, naturally these lead to the plots jumping around and appear to be flickering when playing them back at 60fps, which is NOT desirable.

So here's my question; how can I fix the dimensions of the exported EPS file to ensure that the plot doesn't have those few frames where it jumps around?

For example, when I export PNG images instead, I do not have the jumping problem. It only happens when exporting the .eps files.

$\endgroup$

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.