# L'intersezione di x^2+y^2 <= 9 e di x <= -y^2 dev.new(width=3,height=3); par(mai=c(0.64,0.64,0.1,0.1)) x1 <- -4; x2 <- 4; y1 <- -4; y2 <- 4 plot(c(x1,x2),c(y1,y2),type="n",xlab="", ylab="", asp=1) fxy <- function(x,y) x*x+y*y-9 vx <- (x2-x1)/100; vy <- (y2-y1)/100; I <- 0:100; J <- 0:100 for(i in I)for(j in J){x<- x1+vx*i; y<- y1+vy*j; if(fxy(x,y) <= 0) points(x,y,pch=".",col="blue")} fxy <- function(x,y) x+y*y X1 <- x1+vx/2; Y1 <- y1+vy/2 for(i in I)for(j in J){x<- X1+vx*i; y<- Y1+vy*j; if(fxy(x,y) <= 0) points(x,y,pch=".",col="green4")} axis(1,pos=0,label=FALSE,col="brown"); axis(2,pos=0,label=FALSE,col="brown")