tic <- function(x) {sec <- proc.time()[3]; while(proc.time()[3] < sec+x) sec < -sec}
x <- y <- seq(-10, 10, length= 30)
f <- function(x,y) { r <- sqrt(x^2+y^2); 10 * sin(r)/r }
z <- outer(x, y, f); a1 <- 30; da <- 40; n <- 50
for(i in 0:n) {a<-(a1+da*i/n); persp(x,y,z, theta=a, phi=30, expand=0.5, col="lightblue");tic(0.02)}
for(i in 0:n) {a<-(a1+da*i/n); persp(x,y,z, theta=a1+da, phi=a, expand=0.5, col="lightblue");tic(0.02)}
for(i in 0:n) {a<-(a1+da-da*i/n); persp(x,y,z, theta=a, phi=a, expand=0.5, col="lightblue");tic(0.02)}