I want to create an animation of a surface when some parameter is changing, using for loop in maple to create a sequence of frames and they display them as sequence of plots. I was able to obtain an animation, however some of the frames are missing their middle portion. For example these are the i=11th and i=12th frames:
One can see that 11th frame has a cut in the middle. Here is the animation
Since the surface on some of the frames is cut, the middle portion of the surface dissappears and then appears again.
Q: How to make this animation smooth so that the whole surface appears on each frame of the animation?
I attach the maple code I used to create the animation:
with(plots);
r := 'r';
theta := 'theta';
z := 'z';
for i from 0 to 50 do
p || i := plots[implicitplot3d](abs(z) = EllipticE(sqrt(1-r^2/(1+(1/50)*i)), sqrt(1+(1/50)*i)), r = sqrt((1/50)*i) .. sqrt(1+(1/50)*i), theta = 0 .. 2*Pi, z = -1 .. 1, coords = cylindrical, numpoints = 1600)
end do;
plots[display](p || (0 .. 50), insequence = true);
Increasing numpoints doesn't solve the problem. In the displayed animation the value numpoints=16000 has been used.


Roundoff error introduces imaginary artefacts near the boundary. One simple solution for this example is to wrap with the
Recommand.Another way to deal with imaginary components (being more careful about how they are discarded, based on magnitude) is to make use of the
fnormalcommand instead of simply wrapping the expression in a call toRe.I changed how the frames are stored, just for my own convenience. In the code above you can change the
by 1to sayby 5and get only one fifth as many frames but with the same end-point values fori.In general you will get better performance and smaller plot structures and exported gifs if you can use
plot3d(with coordinate system, say) than if you useimplicitplot3d.