# Making animation smoother

s = NDSolve[{
Derivative[1][x][t] == (40/14) x[t] - y[t] z[t] + 18,
Derivative[1][y][t] == -10 y[t] + x[t] z[t],
Derivative[1][z][t] == -4 z[t] + x[t] y[t],
x[0] == 1, z[0] == 1, y[0] == 1},
{x, y, z},
{t, 0, 40},
MaxSteps -> \[Infinity]
];

Animate[
ParametricPlot3D[
Evaluate[{x[t], y[t], z[t]} /. s],
{t, 0, tend},
ImageSize -> 700,
Boxed -> False,
PlotPoints -> 2000,
ColorFunction -> (ColorData["SolarColors", #3] &),
PlotRange -> {{-16, 25}, {-20, 25}, {-2, 40}}
],
{tend, .1, 200},
AnimationRate -> 1
]


This animation is very jerky. I would like the line to progress more smoothly.

Animate should be jerky with long calculations.

You might want to store the frames in a Table and use ListAnimate, instead.

The difference is that Animate does calculations inbetween frames, meaning it:

• Displays a frame;
• Generates the next one;
• Displays a frame;
• Generates the next one;

and so on. And depending on how hard the frame generation process and how good your computer is, it can seriously affect the output speed and quality.

ListAnimate, on the other hand, uses a table of pre-generated frames and the only thing your program needs to do when ListAnimate is called is to display the already generated frames one by one and it goes more smoothly.

• This is a great answer. The PlotPoints->2000 are likely what really slows this down. If you require that setting, then computing it in real time would take forever. Computing it beforehand could still take quite a while, but the ListAnimate after should be smoother. Also wrapping Rasterize around your plots might speed up the rendering of the animation, as displaying a 2D image is faster than a 3D graphic (in my experience). – user6014 Nov 18 '18 at 1:57