tic <- function(x) {sec <-proc.time()[3]; while(proc.time()[3] < sec+x) sec <- sec}
f <- function(x) (20-2*x)^2*x-300
for (i in 1:30) {plot(f,0,10,n=20*i,type="p",pch=20); abline(h=0,v=0,col="red"); tic(0.5)}
g <- function(x) trunc(x)
for (i in 1:15) {plot(g,-3,6,n=20*i,type="p",pch=20); abline(h=0,v=0,col="red"); tic(0.5)}
text(2,-2.3,"una funzione continua e una discontinua")