I developed a program in python to plot the following parametric function:
with 0<= u,v <= 2pi and r = 1. Here the code
import numpy
import matplotlib.pyplot as plt
from mpl_toolkits.mplot3d import Axes3D
r=1
fig=plt.figure()
ax=fig.gca(projection='3d')
u,v=numpy.mgrid[0:2*numpy.pi:100j,0:2*numpy.pi:100j]
x=(r+numpy.cos(u/2)*numpy.sin(v)-numpy.sin(u/2)*numpy.sin(2*v))*numpy.cos(u)
y=(r+numpy.cos(u/2)*numpy.sin(v)-numpy.sin(u/2)*numpy.sin(2*v))*numpy.sin(u)
z=numpy.sin(u/2)*numpy.sin(v)+numpy.cos(u/2)*numpy.sin(2*v)
ax.plot_wireframe(x,y,z,color='b')
plt.show()
Now I would like to create an animation in order to rotate the surface around the axis z of the sequence phi=i2*pi/360 where i=1, .... 360. I think that I should use the 'matplotlib.animation.funcAnimation' function but I don't know how to invoke it with the parametric functions.