# copia e incolla in R e clicca man mano l'immagine
par( mai = c(0.5,0.5,0.1,0.1) )
plot(c(-2,12),c(-2,2),type="n",asp=1)
polygon(c(-5,0,0,-5),c(-8,-8,8,8),col="grey85",border="white")
abline(h=seq(-2,2,1/2),v=seq(-2,0,1),lty=3,col="blue")
abline(v=seq(0,12,pi/4),lty=3,col="blue")
abline(v=0,h=0,col="blue")
symbols(-1, 0, circles=1, inches=FALSE, add=TRUE, fg="red")
for(x in seq(0,12,0.1)) {
 plot(c(-2,12),c(-2,2),type="n",asp=1)
 polygon(c(-5,0,0,-5),c(-8,-8,8,8),col="grey85",border="white")
 abline(h=seq(-2,2,1/2),v=seq(-2,0,1),lty=3,col="blue")
 abline(v=seq(0,12,pi/4),lty=3,col="blue"); abline(v=0,h=0,col="blue")
 symbols(-1, 0, circles=1, inches=FALSE, add=TRUE, fg="red")
 c <- "brown"; text(cos(x)*1.3-1,sin(x)*1.3,"a"); text(x,-0.3,"a")
 lines(c(cos(x)-1,x),c(sin(x),sin(x)),lty=2)
 for (xx in seq(0,x,0.1)) { if (xx > 2*pi) c <- "red";
  points(cos(xx)-1,sin(xx),pch=20,col=c); points(xx,sin(xx),pch=20,col=c)}
  text(pi,0.35,expression(pi)); text(pi,0.85,"180")
  text(2*pi,0.35,expression(2*pi)); text(2*pi,0.85,"360")
  text(3*pi,0.35,expression(3*pi)); text(3*pi,0.85,"540")
  locator(1) }