f(x,y) = 3*(1-x)**2*exp(-x**2 - (y+1)**2)\
         - 10*(x/5.0 - x**3 - y**5)*exp(-x**2 - y**2)\
         - exp(-(x+1)**2 - y**2)/3
c = 3
#
set pm3d depth lighting primary 0.6
set palette rgbformulae 5,7,15
set samples 128
set isosamples 128
unset border
unset tics
unset colorbox
unset key
set xyplane 0
set view 45,15, 1.5,
set term pngcairo size 360,360 background "#003344"

set xrange [-c:c]
set yrange [-c:c]
set zrange [-9:9]

N = 60
do for [i = 0:N-1] {
   t = 2*pi/N * i
   set out sprintf("im%03d.png",i)
   set view 45,(15+360/N*i)%360, 1.5,
   splot f(x,y)*cos(2*t) w pm3d
}
system("convert -adjoin -delay 10 im*.png func1m.gif")
system("rm im*.png")