## Animations generated in R version 3.3.1 (2016-06-21) using
##   the package animation
library(animation)
library(plotrix)
library(plot3D)
for (i in 1:100) {
    x = y = seq(0, 2 * pi, length.out = 100)
    z = mesh(x, y)
    u = z$x
    v = z$y
    m = (sin(u) * sin(2 * v)/2)
    n = (sin(2 * u) * cos(v) * cos(v))
    o = (cos(2 * u) * cos(v) * cos(v))
    surf3D(m, n, o, colvar = o, border = "black", colkey = FALSE, 
        theta = i, box = TRUE)
}
## R version 3.3.1 (2016-06-21)
## Platform: x86_64-w64-mingw32/x64 (64-bit)
## Other packages: animation 2.5, plotrix 3.6-4, plot3D 1.1